本文整理汇总了PHP中ProjectConfigurator::configure方法的典型用法代码示例。如果您正苦于以下问题:PHP ProjectConfigurator::configure方法的具体用法?PHP ProjectConfigurator::configure怎么用?PHP ProjectConfigurator::configure使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProjectConfigurator
的用法示例。
在下文中一共展示了ProjectConfigurator::configure方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: maybeConfigure
/** Configure the wrapped element and all children. */
function maybeConfigure(Project $project)
{
$id = null;
// DataType configured in ProjectConfigurator
// if ( is_a($this->wrappedObject, "DataType") )
// return;
if ($this->attributes || $this->characters) {
ProjectConfigurator::configure($this->wrappedObject, $this->attributes, $project);
if (isset($this->attributes["id"])) {
$id = $this->attributes["id"];
}
$this->attributes = null;
if ($this->characters) {
ProjectConfigurator::addText($project, $this->wrappedObject, (string) $this->characters);
$this->characters = "";
}
if ($id !== null) {
$project->addReference($id, $this->wrappedObject);
}
}
if (is_array($this->children) && !empty($this->children)) {
// Configure all child of this object ...
foreach ($this->children as $child) {
$child->maybeConfigure($project);
ProjectConfigurator::storeChild($project, $this->wrappedObject, $child->wrappedObject, strtolower($child->getElementTag()));
}
}
}