From 312f18a20a2fb3401f56514f3bfa3d415f77adda Mon Sep 17 00:00:00 2001 From: origami11 Date: Fri, 17 Feb 2017 15:28:36 +0300 Subject: [PATCH] =?UTF-8?q?=D0=95=D1=89=D0=B5=20=D1=80=D0=B5=D1=84=D0=B0?= =?UTF-8?q?=D0=BA=D1=82=D0=BE=D1=80=D0=B8=D0=BD=D0=B3=20=D0=B8=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Connection/HttpRequest.php | 2 +- src/Connection/HttpResponse.php | 5 ++++- src/Controller/Action.php | 10 +++++----- src/{idna_convert.php => IdnaConvert.php} | 2 +- src/Validator/Validator.php | 2 +- src/View/Top.php | 4 ++-- src/View/View.php | 2 +- 7 files changed, 15 insertions(+), 12 deletions(-) rename src/{idna_convert.php => IdnaConvert.php} (99%) diff --git a/src/Connection/HttpRequest.php b/src/Connection/HttpRequest.php index 534be58..6a98719 100644 --- a/src/Connection/HttpRequest.php +++ b/src/Connection/HttpRequest.php @@ -1,6 +1,6 @@ viewPath, 'help', $name . '.suggest'); if (file_exists($file) && include($file)) { - $view->addScriptRaw("add_suggest(".json::encode($suggest).");\n"); + $view->addScriptRaw("add_suggest(".json_encode($suggest).");\n"); } } @@ -140,7 +140,7 @@ class Controller_Action * 2. Использовать наследование чтобы добавить к старому обработчику новое поведение * @param $request Обьект запроса */ - public function execute1(HTTPRequest $request) + public function execute1(HttpRequest $request) { $action = self::ACTION_PREFIX . ucfirst($request->getAction()); if (method_exists($this, $action)) { @@ -150,7 +150,7 @@ class Controller_Action } } - public function execute(HTTPRequest $request) + public function execute(HttpRequest $request) { $result = $this->execute1($request); if ($result) { @@ -159,7 +159,7 @@ class Controller_Action return $this->render(); } - public function forward($action, HTTPRequest $args) + public function forward($action, HttpRequest $args) { // Действия до вызова основного обработчика /*foreach($this->_aspect as $aspect) { diff --git a/src/idna_convert.php b/src/IdnaConvert.php similarity index 99% rename from src/idna_convert.php rename to src/IdnaConvert.php index 6d5acbe..8f9b07c 100644 --- a/src/idna_convert.php +++ b/src/IdnaConvert.php @@ -53,7 +53,7 @@ * @changelog since 0.5.1 class updated to PHP5/6 style should be compatible to PHP 4.3+ * - added a missing replace mapping for THAI CHARACTER SARA AM */ -class idna_convert +class IdnaConvert { // NP See below diff --git a/src/Validator/Validator.php b/src/Validator/Validator.php index 4e0be40..8feebe6 100644 --- a/src/Validator/Validator.php +++ b/src/Validator/Validator.php @@ -3,7 +3,7 @@ /** * Проверка коллекции */ -class Validator +class Validator_Validator { protected $chain = array(); // Массив правил protected $errorMsg = array(); // Массив ошибок diff --git a/src/View/Top.php b/src/View/Top.php index 5e3477f..776d6d4 100644 --- a/src/View/Top.php +++ b/src/View/Top.php @@ -29,12 +29,12 @@ class View_Top // AbstractCompositeView public function jGrowl($message, $args) { - $this->addScriptRaw('$.jGrowl("' . $message . '", ' . json::encode($args) . ");\n", true); + $this->addScriptRaw('$.jGrowl("' . $message . '", ' . json_encode($args) . ");\n", true); } public function setGlobal($name, $args) { - $this->addScriptRaw("var " . $name . " = " . json::encode($args) . ";\n", false); + $this->addScriptRaw("var " . $name . " = " . json_encode($args) . ";\n", false); } /** diff --git a/src/View/View.php b/src/View/View.php index bacc54e..979cae0 100644 --- a/src/View/View.php +++ b/src/View/View.php @@ -3,7 +3,7 @@ // Класс отображения // CompositeView !! Composite pattern -class View +class View_View { protected $document; protected $values;