PhpOffice\PhpPresentation\Shape\Drawing\ZipFile::setPath PHP Méthode

setPath() public méthode

Set Path
public setPath ( string $pValue = '' ) : PhpOffice\PhpPresentation\Shape\Drawing
$pValue string File path
Résultat PhpOffice\PhpPresentation\Shape\Drawing
    public function setPath($pValue = '')
    {
        $this->path = $pValue;
        return $this;
    }

Usage Example

 /**
  * @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');
 }
All Usage Examples Of PhpOffice\PhpPresentation\Shape\Drawing\ZipFile::setPath