Horde_Kolab_Storage_Object::getContent PHP 메소드

getContent() 공개 메소드

Fetch the raw content representing the object data.
public getContent ( ) : resource
리턴 resource The raw object content.
    public function getContent()
    {
        if ($this->_content === null) {
            $this->_content = $this->_getDriver()->fetchBodypart($this->_getFolder(), $this->getBackendId(), $this->_getMimePartId());
        }
        return $this->_content;
    }

Usage Example

예제 #1
0
 /**
  * @expectedException Horde_Kolab_Storage_Object_Exception
  */
 public function testFetchingContentsFailsWithMissingMimeId()
 {
     $data = $this->getMock('Horde_Kolab_Storage_Object_Writer');
     $headers = $this->getMock('Horde_Mime_Headers');
     $object = new Horde_Kolab_Storage_Object();
     $this->folder->expects($this->once())->method('getType')->will($this->returnValue('event'));
     $this->folder->expects($this->once())->method('getPath')->will($this->returnValue('INBOX/Calendar'));
     $object->setDriver($this->driver);
     $this->driver->expects($this->once())->method('fetchHeaders')->with('INBOX/Calendar', '1')->will($this->returnValue($headers));
     $object->load('1', $this->folder, $data, new Horde_Mime_Part());
     $object->getContent();
 }
All Usage Examples Of Horde_Kolab_Storage_Object::getContent