本文整理匯總了PHP中ArrayUtil::trimValues方法的典型用法代碼示例。如果您正苦於以下問題:PHP ArrayUtil::trimValues方法的具體用法?PHP ArrayUtil::trimValues怎麽用?PHP ArrayUtil::trimValues使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ArrayUtil
的用法示例。
在下文中一共展示了ArrayUtil::trimValues方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: readClasses
protected function readClasses($file, $contents, $classTypes, $methodTypes)
{
//echo "RGX:$this->RGX_CLASS<br/>";
preg_match_all($this->RGX_CLASS, $contents, $matches, PREG_OFFSET_CAPTURE);
$lastClass = null;
$classes = array();
foreach ($matches[0] as $i => $match) {
$class = new $classTypes();
$class->reader = $this;
$class->file = $file;
$class->offset = intval($match[1]);
$class->isAbstract = $matches[2][$i][1] != -1;
$class->name = $matches[3][$i][0];
$class->extends = $matches[4][$i][0];
$class->interfaces = !empty($matches[5][$i][0]) ? ArrayUtil::trimValues(explode(',', $matches[5][$i][0])) : array();
if ($lastClass != null) {
$lastClass->limit = $class->offset - 1;
}
$doc = $matches[1][$i][0];
$class->doc = $this->readDoc($doc);
$classes[] = $class;
$lastClass = $class;
}
if ($lastClass != null) {
$lastClass->limit = strlen(trim($contents));
}
foreach ($classes as $class) {
$class->source = substr($contents, $class->offset, $class->limit - $class->offset);
$this->readMethods($class, $methodTypes);
$class->source = '';
foreach ($class->methods as $m) {
//$m->source = substr($contents,$m->offset,$m->limit-$m->offset);
}
}
ArrayUtil::append($this->classes, $classes);
}