PhpOffice\PhpPresentation\Reader\PowerPoint2007::canRead PHP Method

canRead() public method

Can the current \PhpOffice\PhpPresentation\Reader\ReaderInterface read the file?
public canRead ( string $pFilename ) : boolean
$pFilename string
return boolean
    public function canRead($pFilename)
    {
        return $this->fileSupportsUnserializePhpPresentation($pFilename);
    }

Usage Example

 /**
  * Test can read
  */
 public function testCanRead()
 {
     $object = new PowerPoint2007();
     $file = PHPPRESENTATION_TESTS_BASE_DIR . '/resources/files/Sample_00_01.ppt';
     $this->assertFalse($object->canRead($file));
     $file = PHPPRESENTATION_TESTS_BASE_DIR . '/resources/files/serialized.phppt';
     $this->assertFalse($object->canRead($file));
     $file = PHPPRESENTATION_TESTS_BASE_DIR . '/resources/files/Sample_12.pptx';
     $this->assertTrue($object->canRead($file));
 }