コード例 #1
0
 /**
  * Get a list of plugins on construct for later use
  */
 public function __construct()
 {
     foreach (CakePlugin::loaded() as $plugin) {
         $this->_pluginPaths[$plugin] = CakePlugin::path($plugin);
     }
     parent::__construct();
 }
コード例 #2
0
 public function __construct(IRouter $router, IHttpRequest $httpRequest)
 {
     $this->router = $router;
     $this->httpRequest = $httpRequest;
     $this->routers = new ArrayObject();
     parent::__construct('RoutingDebugger', array($this, 'renderTab'), array($this, 'renderPanel'));
 }
コード例 #3
0
ファイル: LogPanel.php プロジェクト: gjcamacho/blog_test
 /**
  * Constructor - sets up the log listener.
  *
  * @return \LogPanel
  */
 public function __construct()
 {
     parent::__construct();
     $existing = CakeLog::configured();
     if (empty($existing)) {
         CakeLog::config('default', array('engine' => 'FileLog'));
     }
     CakeLog::config('debug_kit_log_panel', array('engine' => 'DebugKit.DebugKitLog', 'panel' => $this));
 }
コード例 #4
0
 /**
  * beforeRender - Get necessary data about environment to pass back to controller
  *
  * @return array
  */
 public function beforeRender(Controller $controller)
 {
     parent::beforeRender($controller);
     $return = array();
     // PHP Data
     $phpVer = phpversion();
     $return['php'] = array_merge(array('PHP_VERSION' => $phpVer), $_SERVER);
     unset($return['php']['argv']);
     // CakePHP Data
     $return['cake'] = array('APP' => APP, 'APP_DIR' => APP_DIR, 'APPLIBS' => APPLIBS, 'CACHE' => CACHE, 'CAKE' => CAKE, 'CAKE_CORE_INCLUDE_PATH' => CAKE_CORE_INCLUDE_PATH, 'CORE_PATH' => CORE_PATH, 'CAKE_VERSION' => Configure::version(), 'CSS' => CSS, 'CSS_URL' => CSS_URL, 'DS' => DS, 'FULL_BASE_URL' => FULL_BASE_URL, 'IMAGES' => IMAGES, 'IMAGES_URL' => IMAGES_URL, 'JS' => JS, 'JS_URL' => JS_URL, 'LOGS' => LOGS, 'ROOT' => ROOT, 'TESTS' => TESTS, 'TMP' => TMP, 'VENDORS' => VENDORS, 'WEBROOT_DIR' => WEBROOT_DIR, 'WWW_ROOT' => WWW_ROOT);
     return $return;
 }
コード例 #5
0
ファイル: EnvironmentPanel.php プロジェクト: renan/debug_kit
 /**
  * beforeRender - Get necessary data about environment to pass back to controller
  *
  * @return array
  */
 public function beforeRender(Controller $controller)
 {
     parent::beforeRender($controller);
     $return = array();
     // PHP Data
     $phpVer = phpversion();
     $return['php'] = array_merge(array('PHP_VERSION' => $phpVer), $_SERVER);
     unset($return['php']['argv']);
     // CakePHP Data
     $return['cake'] = array('APP' => APP, 'APP_DIR' => APP_DIR, 'APPLIBS' => APPLIBS, 'CACHE' => CACHE, 'CAKE' => CAKE, 'CAKE_CORE_INCLUDE_PATH' => CAKE_CORE_INCLUDE_PATH, 'CORE_PATH' => CORE_PATH, 'CAKE_VERSION' => Configure::version(), 'CSS' => CSS, 'CSS_URL' => CSS_URL, 'DS' => DS, 'FULL_BASE_URL' => FULL_BASE_URL, 'IMAGES' => IMAGES, 'IMAGES_URL' => IMAGES_URL, 'JS' => JS, 'JS_URL' => JS_URL, 'LOGS' => LOGS, 'ROOT' => ROOT, 'TESTS' => TESTS, 'TMP' => TMP, 'VENDORS' => VENDORS, 'WEBROOT_DIR' => WEBROOT_DIR, 'WWW_ROOT' => WWW_ROOT);
     $cakeConstants = array_fill_keys(array('DS', 'ROOT', 'FULL_BASE_URL', 'TIME_START', 'SECOND', 'MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'YEAR', 'LOG_ERROR', 'FULL_BASE_URL'), '');
     $var = get_defined_constants(true);
     $return['app'] = array_diff_key($var['user'], $return['cake'], $cakeConstants);
     return $return;
 }
コード例 #6
0
 /**
  * Constructor
  *
  * @param array $settings Array of settings.
  * @return void
  */
 public function __construct($settings)
 {
     parent::__construct();
     $this->title = __d('clear_cache', 'Clear Cache');
     foreach (glob(CACHE . '*', GLOB_ONLYDIR) as $folder) {
         $length = strrpos($folder, DS) + 1;
         $this->folders[] = substr($folder, $length);
     }
     $configured = array_diff(Cache::configured(), array('debug_kit'));
     $this->engines = array_merge($this->engines, $configured);
     foreach (array('folders', 'engines') as $property) {
         if (isset($settings['clear_cache'][$property])) {
             $this->{$property} = (array) $settings['clear_cache'][$property];
         }
     }
 }
コード例 #7
0
ファイル: debug_panel.php プロジェクト: Volkodav-vvs/Micron
                    </tr>
                    <?php 
foreach (ini_get_all() as $k => $v) {
    ?>
                                <tr>
                                    <td><?php 
    echo $k;
    ?>
</td>
                                    <td><?php 
    echo VarDump($v['global_value']);
    ?>
</td>
                                    <td><?php 
    echo VarDump($v['local_value']);
    ?>
</td>
                                    <td><?php 
    echo DebugPanel::ShowPhpIniAccess($v['access']);
    ?>
</td>
                                </tr>
                            <?php 
}
?>
                </table>
            </div>
        </div>

        <div style="clear: both"></div>
    </div>
コード例 #8
0
ファイル: MigrationsPanel.php プロジェクト: Demired/CakeWX
 /**
  * startup
  *
  * @return void
  */
 function startup(Controller $controller)
 {
     return parent::startup($controller);
 }
コード例 #9
0
ファイル: toolbar.php プロジェクト: ambagasdowa/kml
 /**
  * Constructor - sets up the log listener.
  *
  * @return void
  */
 function __construct($settings)
 {
     parent::__construct();
     if (!class_exists('CakeLog')) {
         App::import('Core', 'CakeLog');
     }
     $existing = CakeLog::configured();
     if (empty($existing)) {
         CakeLog::config('default', array('engine' => 'FileLog'));
     }
     CakeLog::config('debug_kit_log_panel', array('engine' => 'DebugKitLogListener', 'panel' => $this));
 }
コード例 #10
0
ファイル: ResourcesPanel.php プロジェクト: rubn-g/debugbar
 public function __construct()
 {
     parent::__construct();
 }