diff --git a/src/Controller/Component.php b/src/Controller/Component.php index 3cd678d..c70c718 100644 --- a/src/Controller/Component.php +++ b/src/Controller/Component.php @@ -50,6 +50,7 @@ class Controller_Component public $templatePath; public $component_id; + public $component_title; public $COMPONENTS_WEB; public /*.Settings.*/$registry; @@ -207,6 +208,8 @@ class Controller_Component $path = Path::join (BASE_PATH, 'components', $name, $name . '.php'); $className = 'Component_' . $name; + + /*.Controller_Component.*/$component = null; if (file_exists($path)) { require_once ($path); diff --git a/src/Database.php b/src/Database.php index 836a54a..b08d864 100644 --- a/src/Database.php +++ b/src/Database.php @@ -70,7 +70,7 @@ class Database extends PDO /** * Извлекает из базы все элементы по запросу */ - public function fetchAllArray($query,$values=null) + public function fetchAllArray($query, $values = null) { /*.Database_PDOStatement.*/$sth = $this->prepare($query); $prep = $this->prepareValues($values); diff --git a/src/MailAlt.php b/src/MailAlt.php index 48f9a60..99b296d 100644 --- a/src/MailAlt.php +++ b/src/MailAlt.php @@ -48,7 +48,7 @@ class MailAlt /** * Тема письма */ - function subject($subject) + function subject(/*.string.*/$subject) { $this->mailer->Subject = $subject; } @@ -77,7 +77,7 @@ class MailAlt /** * Добавление вложения из файла */ - function addAttachment($filename, $name = false) + function addAttachment($filename, $name = null) { $this->mailer->addAttachment($filename, $name); } diff --git a/src/Validator/Rule/Abstract.php b/src/Validator/Rule/Abstract.php index cc5548f..40f5acc 100644 --- a/src/Validator/Rule/Abstract.php +++ b/src/Validator/Rule/Abstract.php @@ -6,7 +6,7 @@ abstract class Validator_Rule_Abstract protected $errorMsg; protected $ctx; - public function __construct($field, $errorMsg = false) + public function __construct($field, $errorMsg = null) { $this->field = $field; $this->errorMsg = $errorMsg; diff --git a/src/View/Top.php b/src/View/Top.php index 480f00d..d28fca0 100644 --- a/src/View/Top.php +++ b/src/View/Top.php @@ -23,9 +23,9 @@ class View_Top extends View_Composite { return false; } - private function groupFiles(array $list, $debug = true) + private function groupFiles(array $list, $debugMode = true) { - $debug = ($debug) ? 'debug=1' : ''; + $debug = ($debugMode) ? 'debug=1' : ''; $path = parse_url(WWW_PATH, PHP_URL_PATH); $groups = array(); @@ -77,12 +77,12 @@ class View_Top extends View_Composite { if (is_string($s)) { continue; } - $module = explode('_', $s->active_module, 2); - if (count($module) < 2) { + $moduleName = explode('_', $s->active_module, 2); + if (count($moduleName) < 2) { continue; } - $module = $module[1]; + $module = $moduleName[1]; $name = mb_strtolower($module); $fname = $name . '/' . $name; diff --git a/src/tales.php b/src/tales.php index 5739bef..ac34ef8 100644 --- a/src/tales.php +++ b/src/tales.php @@ -49,7 +49,7 @@ function phptal_component ($expression) { if(class_exists("Controller_Site")){ //Если мы в CMS2 $component = Controller_Site::loadComponent($expression); - }else{ + } else { global $db, $registry; // Иначе обращаемся к глобальным переменным $component = Controller_Component::loadComponent($expression, $db, $registry); } @@ -57,7 +57,7 @@ function phptal_component ($expression) { $result = $component->execute($req); - echo ""; + echo ""; return $result; }