Open franzholz opened 11 years ago
It would be easier to use the "self" statement instead of the full namespace path and class name.
AbstractController.php:
$tsConf = \DmitryDulepov\Simplemvc\Controller\AbstractController::getConfigurationValueFromArray($config, $tsPath . '.', '');
could be
$tsConf = self::getConfigurationValueFromArray($config, $tsPath . '.', '');
public function renderTSObject($tsPath, array $data = null, $tableName = '_NO_TABLE') { if ($tsPath{0} == '.') { $tsPath = substr($tsPath, 1); $tsType = $this->getConfigurationValue($tsPath, ''); $tsConf = $this->getConfigurationValue($tsPath . '.', ''); } else { $config = $GLOBALS['TSFE']->tmpl->setup; $tsType = \DmitryDulepov\Simplemvc\Controller\AbstractController::getConfigurationValueFromArray($config, $tsPath, ''); $tsConf = \DmitryDulepov\Simplemvc\Controller\AbstractController::getConfigurationValueFromArray($config, $tsPath . '.', ''); }
It would be easier to use the "self" statement instead of the full namespace path and class name.
AbstractController.php:
$tsConf = \DmitryDulepov\Simplemvc\Controller\AbstractController::getConfigurationValueFromArray($config, $tsPath . '.', '');
could be
$tsConf = self::getConfigurationValueFromArray($config, $tsPath . '.', '');
public function renderTSObject($tsPath, array $data = null, $tableName = '_NO_TABLE') { if ($tsPath{0} == '.') { $tsPath = substr($tsPath, 1); $tsType = $this->getConfigurationValue($tsPath, ''); $tsConf = $this->getConfigurationValue($tsPath . '.', ''); } else { $config = $GLOBALS['TSFE']->tmpl->setup; $tsType = \DmitryDulepov\Simplemvc\Controller\AbstractController::getConfigurationValueFromArray($config, $tsPath, ''); $tsConf = \DmitryDulepov\Simplemvc\Controller\AbstractController::getConfigurationValueFromArray($config, $tsPath . '.', ''); }
...