PhpOffice\PhpPresentation\Reader\ODPresentation::loadFile PHP Method

loadFile() protected method

Load PhpPresentation Serialized file
protected loadFile ( string $pFilename ) : PhpPresentation
$pFilename string
return PhpOffice\PhpPresentation\PhpPresentation
    protected function loadFile($pFilename)
    {
        $this->oPhpPresentation = new PhpPresentation();
        $this->oPhpPresentation->removeSlideByIndex();
        $this->oZip = new ZipArchive();
        $this->oZip->open($pFilename);
        $this->oXMLReader = new XMLReader();
        if ($this->oXMLReader->getDomFromZip($pFilename, 'meta.xml') !== false) {
            $this->loadDocumentProperties();
        }
        $this->oXMLReader = new XMLReader();
        if ($this->oXMLReader->getDomFromZip($pFilename, 'styles.xml') !== false) {
            $this->loadStylesFile();
        }
        $this->oXMLReader = new XMLReader();
        if ($this->oXMLReader->getDomFromZip($pFilename, 'content.xml') !== false) {
            $this->loadSlides();
        }
        return $this->oPhpPresentation;
    }