Smalot\PdfParser\Document::getObjectById PHP Méthode

getObjectById() public méthode

public getObjectById ( string $id ) : Smalot\PdfParser\Object
$id string
Résultat Smalot\PdfParser\Object
    public function getObjectById($id)
    {
        if (isset($this->objects[$id])) {
            return $this->objects[$id];
        } else {
            return null;
        }
    }

Usage Example

Exemple #1
0
 /**
  * Resolve XRef to object.
  *
  * @param string $name
  *
  * @return Element|Object
  * @throws \Exception
  */
 protected function resolveXRef($name)
 {
     if (($obj = $this->elements[$name]) instanceof ElementXRef && !is_null($this->document)) {
         /** @var ElementXRef $obj */
         $object = $this->document->getObjectById($obj->getId());
         if (is_null($object)) {
             return null;
         }
         // Update elements list for future calls.
         $this->elements[$name] = $object;
     }
     return $this->elements[$name];
 }
All Usage Examples Of Smalot\PdfParser\Document::getObjectById