本文整理汇总了PHP中ArrayUtil::append方法的典型用法代码示例。如果您正苦于以下问题:PHP ArrayUtil::append方法的具体用法?PHP ArrayUtil::append怎么用?PHP ArrayUtil::append使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ArrayUtil
的用法示例。
在下文中一共展示了ArrayUtil::append方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getElementsByTagNameNS
public function getElementsByTagNameNS($ns, $tagName)
{
$result = array();
for ($i = 0; $i < count($this->children); $i++) {
if (!$this->children[$i] instanceof XmlElement) {
continue;
}
if (strtolower($this->children[$i]->getNs()) == strtolower($ns) && strtolower($this->children[$i]->getTag()) == strtolower($tagName)) {
$result[] = $this->children[$i];
}
ArrayUtil::append($result, $this->children[$i]->getElementsByTagNameNS($ns, $tagName));
}
return $result;
}
示例2: getCssFiles
public function getCssFiles()
{
krsort($this->cssFiles);
$files = array();
foreach ($this->cssFiles as $jsfiles) {
ArrayUtil::append($files, $jsfiles);
}
return array_unique($files);
}
示例3: 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);
}