コード例 #1
0
ファイル: StreamObjectTest.php プロジェクト: marcyniu/vendors
 public function testDump()
 {
     $factory = new ObjectFactory(1);
     $obj = new InternalType\StreamObject('some data', 55, 3, $factory);
     $this->assertEquals($obj->dump($factory), "55 3 obj \n<</Length 9 >>\nstream\nsome data\nendstream\nendobj\n");
 }
コード例 #2
0
ファイル: ObjectFactory.php プロジェクト: marcyniu/vendors
 /**
  * Generate new \ZendPdf\InternalType\StreamObject
  *
  * @todo Reusage of the freed object. It's not a support of new feature, but only improvement.
  *
  * @param mixed $objectValue
  * @return \ZendPdf\InternalType\StreamObject
  */
 public function newStreamObject($streamValue)
 {
     $obj = new InternalType\StreamObject($streamValue, $this->_objectCount++, 0, $this);
     $this->_modifiedObjects[$obj->getObjNum()] = $obj;
     return $obj;
 }