本文整理匯總了PHP中XML::setCollection方法的典型用法代碼示例。如果您正苦於以下問題:PHP XML::setCollection方法的具體用法?PHP XML::setCollection怎麽用?PHP XML::setCollection使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類XML
的用法示例。
在下文中一共展示了XML::setCollection方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: lCV3
public function lCV3($id = -1, $returnCollector = true)
{
if ($this->Adapter == null) {
$this->loadAdapter();
}
if ($this->xml == null and $this->collection != null) {
if (is_object($this->collection)) {
$this->collection->lCV3();
$XML = new XML();
$XML->setCollection($this->collection);
$this->xml = $XML->getXML();
} elseif (is_string($this->collection)) {
$handle = @fopen($this->collection, "r");
if ($handle) {
while (!feof($handle)) {
$this->xml .= fgets($handle, 4096);
}
fclose($handle);
} else {
die('error');
}
}
}
$this->Adapter->setXML($this->xml);
if ($returnCollector) {
$this->collector = $this->Adapter->lCV4();
} else {
return $this->Adapter->lCV4();
}
}
示例2: getXML
public function getXML()
{
#$this->addAssocV3("PatchNummer","<", "1000000");
$this->lCV3();
$XML = new XML();
$XML->setCollection($this);
$XML->setXMLHeader();
echo $XML->getXML();
}
示例3: asXML
public function asXML()
{
$xml = new XML();
$xml->setCollection($this);
return $xml->getXML();
}