当前位置: 首页>>代码示例>>PHP>>正文


PHP Registry::addDebug方法代码示例

本文整理汇总了PHP中Registry::addDebug方法的典型用法代码示例。如果您正苦于以下问题:PHP Registry::addDebug方法的具体用法?PHP Registry::addDebug怎么用?PHP Registry::addDebug使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Registry的用法示例。


在下文中一共展示了Registry::addDebug方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: render

 static function render()
 {
     $args = func_get_args();
     $action = $args[0];
     $controller = isset($args[1]) ? $args[1] : self::controller_name();
     $controllerClass = $controller . 'Controller';
     $ContrArgs = isset($args[2]) ? $args[2] : '';
     if (!is_callable(array($controllerClass, $action))) {
         if (is_file('controllers/' . $controller . '_controller.php')) {
             include 'controllers/' . $controller . '_controller.php';
         }
         Registry::set('controller', $controller, true);
         //loading model
         if (is_file('models/' . $controller . '.php')) {
             include 'models/' . $controller . '.php';
         } else {
             Registry::addDebug('<div class="notice">Notice: No model For: <i>"' . $controller . '"</i> controller</div>');
         }
         $controllerClass::$action($ContrArgs);
         ob_start();
         include 'views/' . $controller . '/' . $action . '.html.php';
         Registry::set('content', ob_get_contents());
         ob_end_clean();
     }
 }
开发者ID:justgook,项目名称:phpMVC,代码行数:25,代码来源:applicationcontrollerbase.php

示例2: render

 static function render($file)
 {
     if (is_file('views/' . Registry::get('controller') . '/_' . $file . '.html.php')) {
         include 'views/' . Registry::get('controller') . '/_' . $file . '.html.php';
     } else {
         $fileEx = explode('/', $file);
         $fileExLast = array_pop($fileEx);
         if (is_file('views/' . implode('/', $fileEx) . '/_' . $fileExLast . '.html.php')) {
             include 'views/' . implode('/', $fileEx) . '/_' . $fileExLast . '.html.php';
         } elseif (is_file('views/' . implode('/', $fileEx) . '/' . $fileExLast . '.php')) {
             include 'views/' . implode('/', $fileEx) . '/' . $fileExLast . '.php';
         } else {
             Registry::addDebug('<div class="error">Error: No file (' . $file . ') loading by View::render </div>');
         }
     }
 }
开发者ID:justgook,项目名称:phpMVC,代码行数:16,代码来源:view.php

示例3: delegate

 static function delegate($debug = false)
 {
     //REST система <!-- BEGIN -->
     /*global $_PUT;
     global $_DELETE;*/
     global $_POST;
     $_PUT = array();
     $_DELETE = array();
     if (isset($_POST['_method']) || isset($_POST[0])) {
         //Реристрация Запроса (REQUEST)
         if (isset($_POST['_method'])) {
             Registry::set('method', strtolower($_POST['_method']));
             //$_SERVER['REQUEST_METHOD']=strtoupper($_POST['_method']);
             unset($_POST['_method']);
             Registry::set('request', $_POST);
             $_POST = array();
             /*$temp= "_".$_SERVER["REQUEST_METHOD"];
             	 $$temp=$_POST;*/
         } else {
             Registry::set('method', 'post');
             $_SERVER['REQUEST_METHOD'] = 'POST';
             Registry::set('request', $_POST);
         }
         //REST action decloration
         $action = constant(Registry::get('method'));
     }
     //REST система <!-- END -->
     //if($RESTaction){$controller=$RESTaction;echo "KUKARACHJA";}
     // Анализируем путь
     self::getController($file, $controller, $action, $args);
     $controllerClass = $controller . 'Controller';
     // Файл доступен?
     if (!is_readable($file)) {
         die('404 Not Found Error:unreadable');
     }
     include $file;
     //проверка на наличия правельного контролера
     if (!is_callable(array($controllerClass, $action))) {
         array_unshift($args, $action);
         $action = 'index';
         if (!is_callable(array($controllerClass, $action))) {
             die('404 Not Found Error: uncallable 2');
         }
     }
     Registry::set('controller', $controller, true);
     //добавлаем в журнал текушей контролер
     //вывод стандартной абортки... если неиспользуетса контролер
     if ($controllerClass == 'applicationController') {
         //Registry::set('controller', 'application',true); //добавлаем в журнал текушей контролер
         applicationController::index($args);
     }
     //вывод каковата модалимя и стандартной абортки...
     // Выполняем действие application
     if (!is_callable(array('applicationController', 'index'))) {
         //Registry::set('controller', 'application',true); //добавлаем в журнал текушей контролер
         include 'controllers/application_controller.php';
         applicationController::index($args);
     }
     // Выполняем действие контродира если не application
     if ($controllerClass != 'applicationController') {
         //loading model
         if (is_file('models/' . $controller . '.php')) {
             include 'models/' . $controller . '.php';
         } else {
             Registry::addDebug('<div class="notice">Notice: No model For: <i>"' . $controller . '"</i> controller</div>');
         }
         $controllerClass::$action($args);
         //loading VIEW
         if (is_file('views/' . $controller . '/' . $action . '.html.php')) {
             ob_start();
             include 'views/' . $controller . '/' . $action . '.html.php';
             $output = ob_get_contents();
             Registry::append('content', ob_get_contents());
             ob_end_clean();
         } else {
             Registry::addDebug('<div class="notice">Notice: No VIEW For: <i>"' . $controller . '/' . $action . '"</i> controller</div>');
         }
     }
 }
开发者ID:justgook,项目名称:phpMVC,代码行数:79,代码来源:route.php


注:本文中的Registry::addDebug方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。