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


PHP Ak::profile方法代码示例

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


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

示例1: AkObject

 /**
  * A hack to support __construct() on PHP 4
  *
  * Hint: descendant classes have no PHP4 class_name()
  * constructors, so this one gets called first and calls the
  * top-layer __construct() which (if present) should call
  * parent::__construct()
  *
  * @access public
  * @return void
  */
 function AkObject()
 {
     Ak::profile('Instantiating ' . get_class($this));
     $args = func_get_args();
     ____ak_shutdown_function(&$this);
     call_user_func_array(array(&$this, '__construct'), $args);
     ____ak_shutdown_function(true);
 }
开发者ID:joeymetal,项目名称:v1,代码行数:19,代码来源:AkObject.php

示例2: dispatch

 function dispatch()
 {
     AK_ENABLE_PROFILER &&  Ak::profile(__CLASS__.'::'.__FUNCTION__.'() call');
     $this->Request =& AkRequest();
     $this->Response =& AkResponse();
     $this->Controller =& $this->Request->recognize();
     AK_ENABLE_PROFILER &&  Ak::profile('Request::recognize() completed');
     $this->Controller->process($this->Request, $this->Response);
 }
开发者ID:joeymetal,项目名称:v1,代码行数:9,代码来源:AkDispatcher.php

示例3: outputResults

 function outputResults()
 {
     Ak::profile('Started sending response' . __CLASS__ . '::' . __FUNCTION__ . ' ' . __FILE__ . ' on line ' . __LINE__);
     $this->sendHeaders();
     if (is_object($this->body) && method_exists($this->body, 'stream')) {
         $this->body->stream();
     } else {
         echo $this->body;
     }
 }
开发者ID:joeymetal,项目名称:v1,代码行数:10,代码来源:AkResponse.php

示例4: AkObject

 /**
  * A hack to support __construct() on PHP 4
  *
  * Hint: descendant classes have no PHP4 class_name()
  * constructors, so this one gets called first and calls the
  * top-layer __construct() which (if present) should call
  * parent::__construct()
  *
  * @access public
  * @return void
  */
 function AkObject()
 {
     static $_callback_called;
     Ak::profile('Instantiating ' . get_class($this));
     $args = func_get_args();
     // register_shutdown_function(array(&$this, '__destruct'));
     ____ak_shutdown_function(&$this);
     call_user_func_array(array(&$this, '__construct'), $args);
     if (empty($_callback_called)) {
         $_callback_called = true;
         register_shutdown_function('____ak_shutdown_function');
     }
 }
开发者ID:joeymetal,项目名称:v1,代码行数:24,代码来源:AkObject.php

示例5: getSettings

    function getSettings($namespace, $raise_error_if_config_file_not_found = true, $environment = AK_ENVIRONMENT)
    {
        static $_config;
        if (!in_array($environment, Ak::toArray(AK_AVAILABLE_ENVIRONMENTS))) {
            trigger_error('The environment ' . $environment . ' is not allowed. Allowed environments: ' . AK_AVAILABLE_ENVIRONMENTS);
            return false;
        }
        if (!isset($_config)) {
            require_once AK_LIB_DIR . DS . 'AkConfig.php';
            $_config = new AkConfig();
        }
        return $_config->get($namespace, $environment, $raise_error_if_config_file_not_found);
    }
    function getSetting($namespace, $variable, $default_value = null)
    {
        if ($settings = Ak::getSettings($namespace)) {
            return isset($settings[$variable]) ? $settings[$variable] : $default_value;
        }
        return $default_value;
    }
    function _parseSettingsConstants($settingsStr)
    {
        return preg_replace_callback('/\\$\\{(AK_.*?)\\}/', array('Ak', '_getConstant'), $settingsStr);
    }
    function _getConstant($name)
    {
        return defined($name[1]) ? constant($name[1]) : '';
    }
}
Ak::profile('Ak.php class included' . __FILE__);
开发者ID:joeymetal,项目名称:v1,代码行数:30,代码来源:Ak.php

示例6: getLocalesReady

 static function getLocalesReady()
 {
     Ak::t('Akelos');
     TPV_ENABLE_PROFILER && Ak::profile('Got multilingual ');
 }
开发者ID:ritxi,项目名称:sermepa_tpv,代码行数:5,代码来源:config.php

示例7: getDefaultLanguageForUser

 function getDefaultLanguageForUser()
 {
     Ak::profile(__CLASS__ . '::' . __FUNCTION__);
     foreach ($this->browser_lang as $k => $browser_lang) {
         if (isset($this->available_locales[$browser_lang]) && is_array($this->available_locales[$browser_lang])) {
             return $browser_lang;
         }
     }
     return $this->_getDefaultLocale();
 }
开发者ID:joeymetal,项目名称:v1,代码行数:10,代码来源:AkLocaleManager.php

示例8: afterAction

 /**
  * Calls all the defined after-filter filters, which are added by using "afterFilter($method)".
  * If any of the filters return false, no more filters will be executed.
  */
 function afterAction($method = '')
 {
     Ak::profile('Running after controller action filters ' . __CLASS__ . '::' . __FUNCTION__ . ' ' . __LINE__);
     return $this->_callFilters(&$this->_afterFilters, $method);
 }
开发者ID:joeymetal,项目名称:v1,代码行数:9,代码来源:AkActionController.php

示例9: renderPartialCollection

 function renderPartialCollection($partial_name, $collection, $partial_spacer_template = null, $local_assigns = array())
 {
     Ak::profile('Rendering partial Collection' . $partial_name);
     $collection_of_partials = array();
     $counter_name = $this->_partialCounterName($partial_name);
     if (empty($local_assigns[$counter_name])) {
         $local_assigns[$counter_name] = 1;
     }
     foreach ($collection as $counter => $element) {
         $local_assigns[$counter_name] = $counter + 1;
         $collection_of_partials[] = $this->renderPartial($partial_name, $element, $local_assigns);
     }
     Ak::profile('Finished rendering partial Collection' . $partial_name);
     if (empty($collection_of_partials)) {
         return ' ';
     }
     if (!empty($partial_spacer_template)) {
         $spacer_path = $this->_partialPathPiece($partial_spacer_template);
         $spacer_name = $this->_partialPathName($partial_spacer_template);
         return join((empty($spacer_path) ? '' : $spacer_path . DS) . '_' . $spacer_name, $collection_of_partials);
     } else {
         return join('', $collection_of_partials);
     }
 }
开发者ID:joeymetal,项目名称:v1,代码行数:24,代码来源:AkActionView.php

示例10: _parseSettingsConstants

    }

    function _parseSettingsConstants($settingsStr)
    {
        return preg_replace_callback('/\$\{(AK_.*?)\}/',array('Ak','_getConstant'),$settingsStr);
    }

    function _getConstant($name)
    {
        return defined($name[1])?constant($name[1]):'';
    }

    /**
     * Get a models a model instance. Including and instantiating the model for us.
     *
     * This kinds mimics the ideal (new Model())->find() wich does not exist on PHP yet.
     *
     * On Akelos we can do Ak::get('Model')->find();
     */
    function get($model_name, $attributes = array())
    {
        Ak::import($model_name);
        return new $model_name($attributes);
    }

}

AK_ENABLE_PROFILER &&  Ak::profile();

?>
开发者ID:joeymetal,项目名称:v1,代码行数:30,代码来源:Ak.php

示例11: performActionWithFilters

 function performActionWithFilters($method = '')
 {
     if ($this->beforeAction($method) !== false && !$this->_hasPerformed()){
         AK_ENABLE_PROFILER &&  Ak::profile("Called $method  before filters");
         $this->performActionWithoutFilters($method);
         AK_ENABLE_PROFILER &&  Ak::profile("Performed $method  action");
         $this->afterAction($method);
         AK_ENABLE_PROFILER &&  Ak::profile("Called $method  after filters");
         return true;
     }
     return false;
 }
开发者ID:joeymetal,项目名称:v1,代码行数:12,代码来源:AkActionController.php


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