PHPExiftool\Reader::all PHP Method

all() public method

Perform the scan and returns all the results
public all ( ) : ArrayCollection
return Doctrine\Common\Collections\ArrayCollection
    public function all()
    {
        if (!$this->collection) {
            $this->collection = $this->buildQueryAndExecute();
        }
        if ($this->readers) {
            $elements = $this->collection->toArray();
            $this->collection = null;
            foreach ($this->readers as $reader) {
                $elements = array_merge($elements, $reader->all()->toArray());
            }
            $this->collection = new ArrayCollection($elements);
        }
        return $this->collection;
    }

Usage Example

 /**
  * @covers PHPExiftool\Reader::ignoreDotFiles
  * @covers PHPExiftool\Reader::all
  */
 public function testIgnoreDotFiles()
 {
     $this->object->in(self::$tmpDir . '3');
     $this->assertEquals(1, count($this->object->all()));
     $this->object->ignoreDotFiles()->in(self::$tmpDir . '3');
     $this->assertEquals(0, count($this->object->all()));
 }