當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Spoon::setDebug方法代碼示例

本文整理匯總了PHP中Spoon::setDebug方法的典型用法代碼示例。如果您正苦於以下問題:PHP Spoon::setDebug方法的具體用法?PHP Spoon::setDebug怎麽用?PHP Spoon::setDebug使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Spoon的用法示例。


在下文中一共展示了Spoon::setDebug方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: defineForkConstants

 /**
  * This will disappear in time in favour of container-driven parameters.
  * @deprecated
  */
 public function defineForkConstants()
 {
     $container = $this->getContainer();
     Spoon::setDebug($container->getParameter('kernel.debug'));
     Spoon::setDebugEmail($container->getParameter('fork.debug_email'));
     Spoon::setDebugMessage($container->getParameter('fork.debug_message'));
     Spoon::setCharset($container->getParameter('kernel.charset'));
     /**
      * @deprecated SPOON_* constants are deprecated in favor of Spoon::set*().
      * Will be removed in the next major release.
      */
     defined('SPOON_DEBUG') || define('SPOON_DEBUG', $container->getParameter('kernel.debug'));
     defined('SPOON_DEBUG_EMAIL') || define('SPOON_DEBUG_EMAIL', $container->getParameter('fork.debug_email'));
     defined('SPOON_DEBUG_MESSAGE') || define('SPOON_DEBUG_MESSAGE', $container->getParameter('fork.debug_message'));
     defined('SPOON_CHARSET') || define('SPOON_CHARSET', $container->getParameter('kernel.charset'));
     defined('PATH_WWW') || define('PATH_WWW', $container->getParameter('site.path_www'));
     defined('PATH_LIBRARY') || define('PATH_LIBRARY', $container->getParameter('site.path_library'));
     defined('SITE_DEFAULT_LANGUAGE') || define('SITE_DEFAULT_LANGUAGE', $container->getParameter('site.default_language'));
     defined('SITE_DEFAULT_TITLE') || define('SITE_DEFAULT_TITLE', $container->getParameter('site.default_title'));
     defined('SITE_MULTILANGUAGE') || define('SITE_MULTILANGUAGE', $container->getParameter('site.multilanguage'));
     defined('SITE_DOMAIN') || define('SITE_DOMAIN', $container->getParameter('site.domain'));
     defined('SITE_PROTOCOL') || define('SITE_PROTOCOL', $container->getParameter('site.protocol'));
     defined('SITE_URL') || define('SITE_URL', SITE_PROTOCOL . '://' . SITE_DOMAIN);
     defined('FORK_VERSION') || define('FORK_VERSION', $container->getParameter('fork.version'));
     defined('ACTION_GROUP_TAG') || define('ACTION_GROUP_TAG', $container->getParameter('action.group_tag'));
     defined('ACTION_RIGHTS_LEVEL') || define('ACTION_RIGHTS_LEVEL', $container->getParameter('action.rights_level'));
 }
開發者ID:bwgraves,項目名稱:forkcms,代碼行數:31,代碼來源:Kernel.php

示例2: runTests

 /**
  * Check if the given templates gives the wanted output in debug and non
  * debug mode
  *
  * @param  string $output   The output we want from SpoonTemplate
  * @param  string $template The filename of the template
  */
 protected function runTests($output, $template)
 {
     Spoon::setDebug(true);
     $this->assertEquals($output, $this->tpl->getContent($this->getTemplatePath($template)));
     Spoon::setDebug(false);
     $this->assertEquals($output, $this->tpl->getContent($this->getTemplatePath($template)));
 }
開發者ID:jeroendesloovere,項目名稱:library,代碼行數:14,代碼來源:SpoonCompilerTest.php


注:本文中的Spoon::setDebug方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。