本文整理匯總了PHP中Element::__toSend方法的典型用法代碼示例。如果您正苦於以下問題:PHP Element::__toSend方法的具體用法?PHP Element::__toSend怎麽用?PHP Element::__toSend使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Element
的用法示例。
在下文中一共展示了Element::__toSend方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: appendElementToElementToSend
/**
* @param Element $element
* @param \DOMElement $element
*/
protected function appendElementToElementToSend(Element $value, \DOMElement $element)
{
$toSend = $value->__toSend(true);
if ($toSend instanceof \DOMElement) {
$element->appendChild($toSend);
}
}
示例2: __toSend
/**
* Overrides methods in order to set the values
* @param bool $asDomElement returns elements as a DOMElement or as a string
* @return string
*/
protected function __toSend($asDomElement = false)
{
$this->setValue(array($this->getUsernameToken(), $this->getTimestamp()));
return parent::__toSend($asDomElement = false);
}
示例3: __toSend
/**
* Overrides method in order to add username, password and created values if they are set
* @param bool $asDomElement returns elements as a DOMElement or as a string
* @return string
*/
protected function __toSend($asDomElement = false)
{
$this->setValue(array($this->getUsername(), $this->getPassword(), $this->getCreated(), $this->getNonce()));
return parent::__toSend($asDomElement);
}
示例4: __toSend
/**
* Overrides method in order to add created and expires values if they are set
* @param bool $asDomElement returns elements as a DOMElement or as a string
* @return string
*/
protected function __toSend($asDomElement = false)
{
$this->setValue(array($this->getCreated(), $this->getExpires()));
return parent::__toSend($asDomElement);
}