本文整理汇总了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();
}
}
示例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;
}
示例3: ReflectionExtension
<?php
$standard = new ReflectionExtension('standard');
var_dump($standard->getDependencies());
?>
==DONE==
示例4: testGetDependencies
public function testGetDependencies()
{
self::assertEquals($this->phpExtRef->getDependencies(), $this->extRef->getDependencies());
self::assertEquals($this->phpExtSpl->getDependencies(), $this->extSpl->getDependencies());
}
示例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();
示例6: ReflectionExtension
<?php
$ext = new ReflectionExtension("xml");
$deps = $ext->getDependencies();
var_dump($deps);
示例7: ReflectionExtension
<?php
$dom = new ReflectionExtension('dom');
var_dump($dom->getDependencies());
?>
==DONE==