setPath() 공개 메소드

Set Path
public setPath ( string $pValue = '' ) : PhpOffice\PhpPresentation\Shape\Drawing
$pValue string File path
리턴 PhpOffice\PhpPresentation\Shape\Drawing
예제 #1
0
 /**
  * @expectedException \Exception
  * @expectedExceptionMessage does not exist
  */
 public function testDrawingZipException()
 {
     $oPhpPresentation = new PhpPresentation();
     $oSlide = $oPhpPresentation->getActiveSlide();
     $oDrawing = new Drawing\ZipFile();
     $oDrawing->setPath('zip://' . PHPPRESENTATION_TESTS_BASE_DIR . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR . 'files' . DIRECTORY_SEPARATOR . 'filedoesntexist.zip#secondpath', false);
     $oSlide->addShape($oDrawing);
     TestHelperDOCX::getDocument($oPhpPresentation, 'PowerPoint2007');
 }
예제 #2
0
 public function testMimeType()
 {
     $oDrawing = new ZipFile();
     $oDrawing->setPath($this->fileOk);
     $this->assertEquals('image/gif', $oDrawing->getMimeType());
 }