本文整理汇总了PHP中ZendGData\Extension类的典型用法代码示例。如果您正苦于以下问题:PHP Extension类的具体用法?PHP Extension怎么用?PHP Extension使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Extension类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDOM
/**
* Retrieves a DOMElement which corresponds to this element and all
* child properties. This is used to build an entry back into a DOM
* and eventually XML text for application storage/persistence.
*
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
* @return DOMElement The DOMElement representing this element and all
* child properties.
*/
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
{
$element = parent::getDOM($doc, $majorVersion, $minorVersion);
if ($this->_pos !== null) {
$element->appendChild($this->_pos->getDOM($element->ownerDocument));
}
return $element;
}
示例2: getDOM
/**
* Retrieves a DOMElement which corresponds to this element and all
* child properties. This is used to build an entry back into a DOM
* and eventually XML text for sending to the server upon updates, or
* for application storage/persistence.
*
* @param DOMDocument $doc The DOMDocument used to construct DOMElements
* @param int $majorVersion By default 1
* @param int $minorVersion (Optional)
* @return \DOMElement The DOMElement representing this element and all
*/
public function getDOM($doc = null, $majorVersion = 1, $minorVersion = null)
{
$element = parent::getDOM($doc, $majorVersion, $minorVersion);
if ($this->_value != null) {
$element->setAttribute('value', $this->_value);
}
return $element;
}
示例3: takeAttributeFromDOM
/**
* Given a DOMNode representing an attribute, tries to map the data into
* instance members. If no mapping is defined, the name and value are
* stored in an array.
*
* @param DOMNode $attribute The DOMNode attribute needed to be handled
*/
protected function takeAttributeFromDOM($attribute)
{
switch ($attribute->localName) {
case 'value':
$this->_value = $attribute->nodeValue;
break;
default:
parent::takeAttributeFromDOM($attribute);
}
}
示例4: takeAttributeFromDOM
/**
* Given a DOMNode representing an attribute, tries to map the data into
* instance members. If no mapping is defined, the name and value are
* stored in an array.
*
* @param DOMNode $attribute The DOMNode attribute needed to be handled
*/
protected function takeAttributeFromDOM($attribute)
{
switch ($attribute->localName) {
case 'scheme':
$this->_scheme = $attribute->nodeValue;
break;
case 'country':
$this->_country = $attribute->nodeValue;
break;
default:
parent::takeAttributeFromDOM($attribute);
}
}
示例5: takeAttributeFromDOM
/**
* Given a DOMNode representing an attribute, tries to map the data into
* instance members. If no mapping is defined, the name and value are
* stored in an array.
*
* @param DOMNode $attribute The DOMNode attribute needed to be handled
*/
protected function takeAttributeFromDOM($attribute)
{
switch ($attribute->localName) {
case 'relationship':
$this->_relationship = $attribute->nodeValue;
break;
case 'type':
$this->_type = $attribute->nodeValue;
break;
default:
parent::takeAttributeFromDOM($attribute);
}
}
示例6: takeAttributeFromDOM
/**
* Given a DOMNode representing an attribute, tries to map the data into
* instance members. If no mapping is defined, the name and value are
* stored in an array.
*
* @param DOMNode $attribute The DOMNode attribute needed to be handled
*/
protected function takeAttributeFromDOM($attribute)
{
switch ($attribute->localName) {
case 'name':
$name = explode(':', $attribute->nodeValue);
$this->_name = end($name);
break;
case 'value':
$this->_value = $attribute->nodeValue;
break;
default:
parent::takeAttributeFromDOM($attribute);
}
}
示例7: takeChildFromDOM
protected function takeChildFromDOM($child)
{
$absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
switch ($absoluteNodeName) {
case $this->lookupNamespace('gd') . ':' . 'when':
$when = new When();
$when->transferFromDOM($child);
$this->_when = $when;
break;
default:
parent::takeChildFromDOM($child);
break;
}
}
示例8: takeAttributeFromDOM
/**
* Given a DOMNode representing an attribute, tries to map the data into
* instance members. If no mapping is defined, the name and value are
* stored in an array.
*
* @param DOMNode $attribute The DOMNode attribute needed to be handled
*/
protected function takeAttributeFromDOM($attribute)
{
switch ($attribute->localName) {
case 'url':
$this->_url = $attribute->nodeValue;
break;
case 'height':
$this->_height = $attribute->nodeValue;
break;
case 'width':
$this->_width = $attribute->nodeValue;
break;
default:
parent::takeAttributeFromDOM($attribute);
}
}
示例9: takeAttributeFromDOM
/**
* Given a DOMNode representing an attribute, tries to map the data into
* instance members. If no mapping is defined, the name and value are
* stored in an array.
*
* @param DOMNode $attribute The DOMNode attribute needed to be handled
*/
protected function takeAttributeFromDOM($attribute)
{
switch ($attribute->localName) {
case 'value':
if ($attribute->nodeValue == "true") {
$this->_value = true;
} elseif ($attribute->nodeValue == "false") {
$this->_value = false;
} else {
throw new \ZendGData\App\InvalidArgumentException("Expected 'true' or 'false' for gCal:selected#value.");
}
break;
default:
parent::takeAttributeFromDOM($attribute);
}
}
示例10: takeAttributeFromDOM
protected function takeAttributeFromDOM($attribute)
{
switch ($attribute->localName) {
case 'startTime':
$this->_startTime = $attribute->nodeValue;
break;
case 'endTime':
$this->_endTime = $attribute->nodeValue;
break;
case 'valueString':
$this->_valueString = $attribute->nodeValue;
break;
default:
parent::takeAttributeFromDOM($attribute);
}
}
示例11: takeAttributeFromDOM
protected function takeAttributeFromDOM($attribute)
{
switch ($attribute->localName) {
case 'absoluteTime':
$this->_absoluteTime = $attribute->nodeValue;
break;
case 'method':
$this->_method = $attribute->nodeValue;
break;
case 'days':
$this->_days = $attribute->nodeValue;
break;
case 'hours':
$this->_hours = $attribute->nodeValue;
break;
case 'minutes':
$this->_minutes = $attribute->nodeValue;
break;
default:
parent::takeAttributeFromDOM($attribute);
}
}
示例12: takeAttributeFromDOM
/**
* Given a DOMNode representing an attribute, tries to map the data into
* instance members. If no mapping is defined, the name and value are
* stored in an array.
*
* @param DOMNode $attribute The DOMNode attribute needed to be handled
*/
protected function takeAttributeFromDOM($attribute)
{
switch ($attribute->localName) {
case 'min':
$this->_min = $attribute->nodeValue;
break;
case 'max':
$this->_max = $attribute->nodeValue;
break;
case 'numRaters':
$this->_numRaters = $attribute->nodeValue;
break;
case 'average':
$this->_average = $attribute->nodeValue;
break;
case 'value':
$this->_value = $attribute->nodeValue;
default:
parent::takeAttributeFromDOM($attribute);
}
}
示例13: __toString
public function __toString()
{
if ($this->_valueString != null) {
return $this->_valueString;
} else {
return parent::__toString();
}
}
示例14: takeAttributeFromDOM
/**
* Given a DOMNode representing an attribute, tries to map the data into
* instance members. If no mapping is defined, the name and value are
* stored in an array.
*
* @param DOMNode $attribute The DOMNode attribute needed to be handled
*/
protected function takeAttributeFromDOM($attribute)
{
switch ($attribute->localName) {
case 'url':
$this->_url = $attribute->nodeValue;
break;
case 'fileSize':
$this->_fileSize = $attribute->nodeValue;
break;
case 'type':
$this->_type = $attribute->nodeValue;
break;
case 'medium':
$this->_medium = $attribute->nodeValue;
break;
case 'isDefault':
$this->_isDefault = $attribute->nodeValue;
break;
case 'expression':
$this->_expression = $attribute->nodeValue;
break;
case 'bitrate':
$this->_bitrate = $attribute->nodeValue;
break;
case 'framerate':
$this->_framerate = $attribute->nodeValue;
break;
case 'samplingrate':
$this->_samplingrate = $attribute->nodeValue;
break;
case 'channels':
$this->_channels = $attribute->nodeValue;
break;
case 'duration':
$this->_duration = $attribute->nodeValue;
break;
case 'height':
$this->_height = $attribute->nodeValue;
break;
case 'width':
$this->_width = $attribute->nodeValue;
break;
case 'lang':
$this->_lang = $attribute->nodeValue;
break;
default:
parent::takeAttributeFromDOM($attribute);
}
}
示例15: __construct
public function __construct($text = null)
{
parent::__construct();
$this->_text = $text;
}