has() public method

Indicate if an element name is available in header.
public has ( string $name ) : boolean
$name string The name of the element
return boolean
示例#1
0
 /**
  * Build details array.
  */
 protected function buildDetails()
 {
     // Build details array.
     $details = array();
     // Extract document info
     if ($this->trailer->has('Info')) {
         /** @var Object $info */
         $info = $this->trailer->get('Info');
         $details = $info->getHeader()->getDetails();
     }
     // Retrieve the page count
     try {
         $pages = $this->getPages();
         $details['Pages'] = count($pages);
     } catch (\Exception $e) {
         $details['Pages'] = 0;
     }
     $this->details = $details;
 }
示例#2
0
 /**
  * @param $name
  *
  * @return bool
  */
 public function has($name)
 {
     return $this->header->has($name);
 }