Horde_ActiveSync_Wbxml_Encoder::content PHP Method

content() public method

Output the tag content
public content ( mixed $content )
$content mixed The value to output for this tag. A string or a stream resource.
    public function content($content)
    {
        // Don't try to send a string containing \0 - it's the wbxml string
        // terminator.
        if (!is_resource($content)) {
            $content = str_replace("", '', $content);
            if ('x' . $content == 'x') {
                return;
            }
        }
        $this->_outputStack();
        $this->_content($content);
        if (is_resource($content)) {
            fclose($content);
            $content = null;
        }
    }

Usage Example

Example #1
0
 /**
  * Send WBXML to indicate provisioning is required.
  *
  * @param string $requestType  The type of request we are handling.
  * @param integer $status      The reason we need to provision.
  */
 protected function _requireProvisionWbxml($requestType, $status)
 {
     $this->_encoder->startWBXML();
     $this->_encoder->startTag($requestType);
     $this->_encoder->startTag(Horde_ActiveSync::SYNC_STATUS);
     $this->_encoder->content($status);
     $this->_encoder->endTag();
     $this->_encoder->endTag();
 }
All Usage Examples Of Horde_ActiveSync_Wbxml_Encoder::content