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


PHP ReflectionExtension::getDependencies方法代碼示例

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


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

示例1: getDependencies

 /**
  * Returns an array containing all names of all extensions this extension
  * depends on
  * @return string[]
  */
 public function getDependencies()
 {
     if ($this->reflectionSource) {
         return $this->reflectionSource->getDependencies();
     } else {
         return parent::getDependencies();
     }
 }
開發者ID:naderman,項目名稱:pflow,代碼行數:13,代碼來源:extension.php

示例2: _getExtension

 /**
  * Get all info about function
  * @param string|function $extensionName Function or function name
  * @return array|bool
  */
 protected static function _getExtension($extensionName)
 {
     if (!extension_loaded($extensionName)) {
         return false;
     }
     $ext = new ReflectionExtension($extensionName);
     $result = array();
     $result['name'] = $ext->name;
     $result['version'] = $ext->getVersion();
     if ($constants = $ext->getConstants()) {
         $result['constants'] = $constants;
     }
     if ($classesName = $ext->getClassNames()) {
         $result['classesName'] = $classesName;
     }
     if ($functions = $ext->getFunctions()) {
         $result['functions'] = $functions;
     }
     if ($dependencies = $ext->getDependencies()) {
         $result['dependencies'] = $dependencies;
     }
     if ($INIEntries = $ext->getINIEntries()) {
         $result['INIEntries'] = $INIEntries;
     }
     $functions = $ext->getFunctions();
     if (is_array($functions) && count($functions) > 0) {
         $result['functions'] = array();
         foreach ($functions as $function) {
             $funcName = $function->getName();
             $result['functions'][$funcName] = self::_getFunction($funcName);
         }
     }
     return $result;
 }
開發者ID:CB9TOIIIA,項目名稱:JBDump,代碼行數:39,代碼來源:class.jbdump.php

示例3: ReflectionExtension

<?php

$standard = new ReflectionExtension('standard');
var_dump($standard->getDependencies());
?>
==DONE==
開發者ID:badlamer,項目名稱:hhvm,代碼行數:6,代碼來源:ReflectionExtension_getDependencies_variation2.php

示例4: testGetDependencies

 public function testGetDependencies()
 {
     self::assertEquals($this->phpExtRef->getDependencies(), $this->extRef->getDependencies());
     self::assertEquals($this->phpExtSpl->getDependencies(), $this->extSpl->getDependencies());
 }
開發者ID:naderman,項目名稱:ezc-reflection,代碼行數:5,代碼來源:extension_test.php

示例5: dirname

<?php

/**
 * php-mecab/examples
 * show module dependencies, ini entries, constants, functions
 * and methods provided by mecab extension (use ReflectionExtension)
 * charset=utf-8
 */
require_once dirname(__FILE__) . '/common.inc.php';
$linebreak = PHP_EOL . PHP_EOL;
$reflector = new ReflectionExtension('mecab');
$mapper = create_function('$m', 'return $m->getName();');
border();
echo 'Module dependencies:', $linebreak;
print_r($reflector->getDependencies());
border();
echo 'INI entries:', $linebreak;
print_r($reflector->getINIEntries());
border();
echo 'Constants:', $linebreak;
print_r($reflector->getConstants());
border();
echo 'Functions:', $linebreak;
print_r(array_keys($reflector->getFunctions()));
border();
echo 'Classes:', $linebreak;
$classes = array();
foreach ($reflector->getClasses() as $className => $class) {
    $classes[$className] = array('interfaces' => null, 'constants' => $class->getConstants(), 'properties' => $class->getProperties(), 'methods' => array_map($mapper, $class->getMethods()));
    if (method_exists($class, 'getInterfaceNames')) {
        $classes[$className]['interfaces'] = $class->getInterfaceNames();
開發者ID:knmasuda,項目名稱:php-mecab,代碼行數:31,代碼來源:provides-r.php

示例6: ReflectionExtension

<?php

$ext = new ReflectionExtension("xml");
$deps = $ext->getDependencies();
var_dump($deps);
開發者ID:badlamer,項目名稱:hhvm,代碼行數:5,代碼來源:016.php

示例7: ReflectionExtension

<?php

$dom = new ReflectionExtension('dom');
var_dump($dom->getDependencies());
?>
==DONE==
開發者ID:badlamer,項目名稱:hhvm,代碼行數:6,代碼來源:ReflectionExtension_getDependencies_basic.php


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