当前位置: 首页>>代码示例>>PHP>>正文


PHP ReflectionExtension::getINIEntries方法代码示例

本文整理汇总了PHP中ReflectionExtension::getINIEntries方法的典型用法代码示例。如果您正苦于以下问题:PHP ReflectionExtension::getINIEntries方法的具体用法?PHP ReflectionExtension::getINIEntries怎么用?PHP ReflectionExtension::getINIEntries使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ReflectionExtension的用法示例。


在下文中一共展示了ReflectionExtension::getINIEntries方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getINIEntries

 /**
  * Returns an associative array containing this extension's INI entries and
  * their values
  * @return array<string,string>
  */
 public function getINIEntries()
 {
     if ($this->reflectionSource) {
         return $this->reflectionSource->getINIEntries();
     } else {
         return parent::getINIEntries();
     }
 }
开发者ID:naderman,项目名称:pflow,代码行数:13,代码来源:extension.php

示例2: opcodeCacheData

 /**
  * @return array
  */
 public function opcodeCacheData()
 {
     $cacheData = array();
     foreach (static::$opcacheExtenstions as $name => $data) {
         list($title, $iniSetting) = $data;
         if ($this->hasCache($name, $iniSetting)) {
             $cacheData['title'] = $title;
             $cacheData['name'] = $name;
             $ref = new \ReflectionExtension($name);
             $cacheData['version'] = $ref->getVersion();
             $cacheData['settings'] = $ref->getINIEntries();
             break;
         }
     }
     return $cacheData;
 }
开发者ID:nicmart,项目名称:benchmark,代码行数:19,代码来源:MachineData.php

示例3: ezcDocumentXhtml

foreach ($settings as $name => $info) {
    $w = str_repeat('-', 77);
    $xhtml = new ezcDocumentXhtml();
    $xhtml->loadString(ignore_links($info[3]));
    $docbook = $xhtml->getAsDocbook();
    // echo $docbook->save(), "\n\n";
    $convertor = new drDocumentDoctookToTextConvertor();
    $rst = $convertor->convert($docbook);
    $d = $rst->save();
    $d = join("\n; ", explode("\n", $d));
    echo <<<ENDL
; {$w}
; xdebug.{$name}
;
; Type: {$info[0]}, Default value: {$info[1]}
;
; {$d}
;
;xdebug.{$name} = {$info[1]}


ENDL;
}
/* Check for missing settings */
$extensionSettings = array_keys($ext->getINIEntries());
foreach ($extensionSettings as $settingName) {
    $sanitizedSettingName = preg_replace('/^xdebug\\./', '', $settingName);
    if (!isset($settings[$sanitizedSettingName])) {
        fprintf(STDERR, "{$settingName} is missing\n");
    }
}
开发者ID:rdohms,项目名称:xdebug.org,代码行数:31,代码来源:convert.php

示例4: fe

}
function fe($file)
{
    global $doc;
    return file_exists("{$doc}/{$file}");
}
function fg($path, &$g = NULL)
{
    global $doc;
    return count($g = glob("{$doc}/{$path}"));
}
$ext = "http";
$doc = "/home/mike/Development/src/php/phpdoc/en/trunk/reference/{$ext}";
$ref = new ReflectionExtension($ext);
printf("Undocumented INI options:\n");
foreach ($ref->getINIEntries() as $name => $tmp) {
    re("configuration.xml", "#<entry>{$name}</entry>#") or printf("\t%s (%s)\n", $name, $tmp);
}
printf("\n");
printf("Undocumented stream filters:\n");
foreach (preg_grep("/^{$ext}\\./", stream_get_filters()) as $filter) {
    fe(sprintf("streamfilters/%s.xml", substr($filter, 5))) or printf("\t%s\n", $filter);
}
printf("\n");
printf("Undocumented constants:\n");
foreach ($ref->getConstants() as $name => $tmp) {
    re("constants.xml", "#<constant>{$name}</constant>#") or printf("\t%s (%s)\n", $name, $tmp);
}
printf("\n");
printf("Undocumented functions:\n");
foreach ($ref->getFunctions() as $func) {
开发者ID:nickl-,项目名称:pecl-http,代码行数:31,代码来源:check_docs.php

示例5: _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

示例6: ReflectionExtension

<pre>
<?php 
// Создание экземпляра класса ReflectionProperty
$ext = new ReflectionExtension('standard');
// Вывод основной информации
printf("Имя           : %s\n" . "Версия        : %s\n" . "Функции       : [%d] %s\n" . "Константы     : [%d] %s\n" . "Директивы INI : [%d] %s\n" . "Классы        : [%d] %s\n", $ext->getName(), $ext->getVersion() ? $ext->getVersion() : 'NO_VERSION', sizeof($ext->getFunctions()), var_export($ext->getFunctions(), 1), sizeof($ext->getConstants()), var_export($ext->getConstants(), 1), sizeof($ext->getINIEntries()), var_export($ext->getINIEntries(), 1), sizeof($ext->getClassNames()), var_export($ext->getClassNames(), 1));
?>
</pre>
开发者ID:ralf000,项目名称:PHP4,代码行数:8,代码来源:07-extension.php

示例7: printInfo

 public function printInfo()
 {
     $info = [];
     $ion = new \ReflectionExtension('ion');
     $info[] = $ion->info();
     foreach ($ion->getINIEntries() as $ini => $value) {
         $info[] = "ini {$ini} = " . var_export($value, true);
     }
     foreach ($ion->getConstants() as $constant => $value) {
         $info[] = "const {$constant} = " . var_export($value, true);
     }
     foreach ($ion->getFunctions() as $function) {
         $info[] = $this->_scanFunction($function);
     }
     foreach ($ion->getClasses() as $class) {
         $mods = [];
         if ($class->isFinal()) {
             $mods[] = "final";
         }
         if ($class->isInterface()) {
             $mods[] = "interface";
         } elseif ($class->isTrait()) {
             $mods[] = "trait";
         } else {
             if ($class->isAbstract()) {
                 $mods[] = "abstract";
             }
             $mods[] = "class";
         }
         $info[] = implode(' ', $mods) . " {$class->name} {";
         if ($class->getParentClass()) {
             $info[] = "  extends {$class->getParentClass()->name}";
         }
         foreach ($class->getInterfaceNames() as $interface) {
             $info[] = "  implements {$interface}";
         }
         foreach ($class->getTraitNames() as $trait) {
             $info[] = "  use {$trait}";
         }
         foreach ($class->getConstants() as $constant => $value) {
             $info[] = "  const {$class->name}::{$constant} = " . var_export($value, true);
         }
         foreach ($class->getProperties() as $prop_name => $prop) {
             /** @var ReflectionProperty $prop */
             $mods = implode(' ', Reflection::getModifierNames($prop->getModifiers()));
             if ($prop->class !== $class->name) {
                 $info[] = "  prop {$mods} {$prop->class}::\${$prop->name}";
             } else {
                 $info[] = "  prop {$mods} \${$prop->name}";
             }
         }
         foreach ($class->getMethods() as $method) {
             $info[] = $this->_scanFunction($method, $class->name);
         }
         $info[] = "}";
     }
     echo implode("\n", $info) . "\n";
 }
开发者ID:php-ion,项目名称:php-ion,代码行数:58,代码来源:ionizer.php

示例8: testGetIniEntriesFromExtension

 /**
  * Test that each ini entries are defined in reference
  *
  * @depends testReference
  * @group  reference
  * @return void
  */
 public function testGetIniEntriesFromExtension()
 {
     $extname = self::$ext;
     if ('internal' == $extname) {
         // only Core is a valid extension name for API reflection
         return;
     }
     $dict = self::$obj->getIniEntries();
     $extension = new \ReflectionExtension($extname);
     $iniEntries = array_keys($extension->getINIEntries());
     $this->assertTrue(is_array($dict));
     foreach ($iniEntries as $iniEntry) {
         if (!in_array($iniEntry, self::$ignoredcfgs)) {
             $this->assertArrayHasKey($iniEntry, $dict, "Defined INI '{$iniEntry}' not known in Reference.");
         }
     }
 }
开发者ID:bjork,项目名称:php-compat-info,代码行数:24,代码来源:GenericTest.php

示例9: ReflectionExtension

<?php

$ext = new ReflectionExtension("standard");
$inis = $ext->getINIEntries();
var_dump($inis["user_agent"]);
开发者ID:badlamer,项目名称:hhvm,代码行数:5,代码来源:015.php

示例10: dirname

/**
 * 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();
    } else {
        $classes[$className]['interfaces'] = array_keys($class->getInterfaces());
开发者ID:knmasuda,项目名称:php-mecab,代码行数:31,代码来源:provides-r.php

示例11: main

 /**
  * The entry method.
  *
  * @return  int
  */
 public function main()
 {
     $sections = [];
     $mail = null;
     $diagnostic = [];
     while (false !== ($c = $this->getOption($v))) {
         switch ($c) {
             case 's':
                 $sections = $this->parser->parseSpecialValue($v);
                 break;
             case 'm':
                 $mail = $v;
                 break;
             case 'h':
             case '?':
                 return $this->usage();
             case '__ambiguous':
                 $this->resolveOptionAmbiguity($v);
                 break;
         }
     }
     $store = function ($sections, $key, $value = null) use(&$diagnostic) {
         if (is_array($key) && null === $value) {
             foreach ($key as $i => $name) {
                 $diagnostic[$sections][$i] = $name;
             }
         } else {
             $diagnostic[$sections][$key] = $value;
         }
         return;
     };
     $store('version', 'php', phpversion());
     $store('version', 'zend_engine', zend_version());
     $store('system', 'platform', php_uname());
     $store('system', 'architecture', true === S_32_BITS ? '32bits' : '64bits');
     $store('system', 'lang', isset($_SERVER['LANG']) ? $_SERVER['LANG'] : 'unknown');
     $store('bin', 'self', $_SERVER['PHP_SELF']);
     $store('bin', 'hoa', resolve('hoa://Library/Cli/Bin'));
     $store('bin', 'php_dir', PHP_BINDIR);
     $store('bin', 'php', defined('PHP_BINARY') ? PHP_BINARY : 'unknown');
     foreach (get_loaded_extensions() as $extension) {
         $reflection = new \ReflectionExtension($extension);
         $entry = 'extension-' . strtolower($extension);
         if ('extension-standard' !== $entry && 'extension-core' !== $entry) {
             $entries = [];
             foreach ($reflection->getINIEntries() as $key => $value) {
                 $entries[substr($key, strpos($key, '.') + 1)] = $value;
             }
         } else {
             $entries = $reflection->getINIEntries();
         }
         $store($entry, 'version', $reflection->getVersion() ?: 'unknown');
         $store($entry, $entries);
     }
     if (empty($sections) || in_array('all', $sections)) {
         $ini = $this->arrayToIni($diagnostic);
     } else {
         $handle = [];
         foreach ($sections as $section) {
             if (false === array_key_exists($section, $diagnostic)) {
                 return 1;
             }
             $handle[$section] = $diagnostic[$section];
         }
         $ini = $this->arrayToIni($handle);
     }
     echo $ini, "\n";
     if (null !== $mail) {
         $subject = 'Diagnostic from ' . get_current_user();
         return mail($mail, $subject, $ini) ? 0 : 1;
     }
     return;
 }
开发者ID:shulard,项目名称:Devtools,代码行数:78,代码来源:Diagnostic.php


注:本文中的ReflectionExtension::getINIEntries方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。