本文整理汇总了PHP中Zend_Reflection_Class::getConstants方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Reflection_Class::getConstants方法的具体用法?PHP Zend_Reflection_Class::getConstants怎么用?PHP Zend_Reflection_Class::getConstants使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Reflection_Class
的用法示例。
在下文中一共展示了Zend_Reflection_Class::getConstants方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCodeKeys
public static function getCodeKeys()
{
if (null === self::$_codeKeys) {
$r = new Zend_Reflection_Class(__CLASS__);
self::$_codeKeys = array_flip($r->getConstants());
}
return self::$_codeKeys;
}
示例2: getSupportedKeys
public static function getSupportedKeys()
{
if (null === self::$_supportedKeys) {
$r = new Zend_Reflection_Class(__CLASS__);
self::$_supportedKeys = array_values($r->getConstants());
}
return self::$_supportedKeys;
}
示例3: _getRecipients
/**
* Parse observer class for contstants containing recipients names
* @param $pluginName
* @return array List of recipients
*/
private function _getRecipients($pluginName)
{
$triggers = array();
$observers = $this->_getPluginObserversList($pluginName);
if (is_array($observers) && !empty($observers)) {
foreach ($observers as $observerName) {
$reflection = new Zend_Reflection_Class($observerName);
$propList = $reflection->getConstants();
if (!empty($propList)) {
foreach ($propList as $constName => $trigger) {
if (strpos($constName, 'RECIPIENT_') !== 0) {
continue;
}
$triggers[] = $trigger;
}
}
}
}
return $triggers;
}