本文整理汇总了PHP中Pimple::getEnvironment方法的典型用法代码示例。如果您正苦于以下问题:PHP Pimple::getEnvironment方法的具体用法?PHP Pimple::getEnvironment怎么用?PHP Pimple::getEnvironment使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pimple
的用法示例。
在下文中一共展示了Pimple::getEnvironment方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ref
/**
* Show pimple reference (only available in dev mode)
*/
public function ref()
{
if (Pimple::getEnvironment() != 'development') {
Pimple::end('Not allowed');
}
include_once 'ref/RefReader.php';
$this->setSkipLayout(true);
$reader = new RefReader();
//$reader->read(PIMPLEBASE.'/lib/taglib/FormTagLib.php','RefTagLib','RefTagLibMethod');
$reader->read(BASEDIR . '/taglib/', 'RefTagLib', 'RefTagLibMethod');
$reader->read(PIMPLEBASE . '/lib/taglib/', 'RefTagLib', 'RefTagLibMethod');
$tags = $reader->getClass('FormTagLib')->getTags();
$taglibs = $reader->getClasses();
$reader = new RefReader();
$reader->read(BASEDIR . '/controller/', 'RefController', 'RefControllerMethod');
$reader->read(PIMPLEBASE . '/lib/controller/', 'RefController', 'RefControllerMethod');
$controllers = $reader->getClasses();
return array('taglibs' => $taglibs, 'controllers' => $controllers);
}