Smalot\PdfParser\Document::getObjectsByType PHP Method

getObjectsByType() public method

public getObjectsByType ( string $type, string $subtype = null ) : Smalot\PdfParser\Object[]
$type string
$subtype string
return Smalot\PdfParser\Object[]
    public function getObjectsByType($type, $subtype = null)
    {
        $objects = array();
        foreach ($this->objects as $id => $object) {
            if ($object->getHeader()->get('Type') == $type && (is_null($subtype) || $object->getHeader()->get('Subtype') == $subtype)) {
                $objects[$id] = $object;
            }
        }
        return $objects;
    }