original_string: public function generateHTMLHeader($pIncludeStyles = false)
      {
          // PHPExcel object known?
          if (is_null($this->phpExcel)) {
              throw new PHPExcel_Writer_Exception('Internal PHPExcel object not set to an instance of an object.');
          }
  
          // Construct HTML
          $properties = $this->phpExcel->getProperties();
          $html = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">' . PHP_EOL;
          $html .= '<!-- Generated by PHPExcel - http://www.phpexcel.net -->' . PHP_EOL;
          $html .= '<html>' . PHP_EOL;
          $html .= '  <head>' . PHP_EOL;
          $html .= '      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">' . PHP_EOL;
          if ($properties->getTitle() > '') {
              $html .= '      <title>' . htmlspecialchars($properties->getTitle()) . '</title>' . PHP_EOL;
          }
          if ($properties->getCreator() > '') {
              $html .= '      <meta name="author" content="' . htmlspecialchars($properties->getCreator()) . '" />' . PHP_EOL;
          }
          if ($properties->getTitle() > '') {
              $html .= '      <meta name="title" content="' . htmlspecialchars($properties->getTitle()) . '" />' . PHP_EOL;
          }
          if ($properties->getDescription() > '') {
              $html .= '      <meta name="description" content="' . htmlspecialchars($properties->getDescription()) . '" />' . PHP_EOL;
          }
          if ($properties->getSubject() > '') {
              $html .= '      <meta name="subject" content="' . htmlspecialchars($properties->getSubject()) . '" />' . PHP_EOL;
          }
          if ($properties->getKeywords() > '') {
              $html .= '      <meta name="keywords" content="' . htmlspecialchars($properties->getKeywords()) . '" />' . PHP_EOL;
          }
          if ($properties->getCategory() > '') {
              $html .= '      <meta name="category" content="' . htmlspecialchars($properties->getCategory()) . '" />' . PHP_EOL;
          }
          if ($properties->getCompany() > '') {
              $html .= '      <meta name="company" content="' . htmlspecialchars($properties->getCompany()) . '" />' . PHP_EOL;
          }
          if ($properties->getManager() > '') {
              $html .= '      <meta name="manager" content="' . htmlspecialchars($properties->getManager()) . '" />' . PHP_EOL;
          }
  
          if ($pIncludeStyles) {
              $html .= $this->generateStyles(true);
          }
  
          $html .= '  </head>' . PHP_EOL;
          $html .= '' . PHP_EOL;
          $html .= '  <body>' . PHP_EOL;
  
          return $html;
      }
code: public function generateHTMLHeader($pIncludeStyles = false)
      {
          // PHPExcel object known?
          if (is_null($this->phpExcel)) {
              throw new PHPExcel_Writer_Exception('Internal PHPExcel object not set to an instance of an object.');
          }
  
          // Construct HTML
          $properties = $this->phpExcel->getProperties();
          $html = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">' . PHP_EOL;
          $html .= '<!-- Generated by PHPExcel - http://www.phpexcel.net -->' . PHP_EOL;
          $html .= '<html>' . PHP_EOL;
          $html .= '  <head>' . PHP_EOL;
          $html .= '      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">' . PHP_EOL;
          if ($properties->getTitle() > '') {
              $html .= '      <title>' . htmlspecialchars($properties->getTitle()) . '</title>' . PHP_EOL;
          }
          if ($properties->getCreator() > '') {
              $html .= '      <meta name="author" content="' . htmlspecialchars($properties->getCreator()) . '" />' . PHP_EOL;
          }
          if ($properties->getTitle() > '') {
              $html .= '      <meta name="title" content="' . htmlspecialchars($properties->getTitle()) . '" />' . PHP_EOL;
          }
          if ($properties->getDescription() > '') {
              $html .= '      <meta name="description" content="' . htmlspecialchars($properties->getDescription()) . '" />' . PHP_EOL;
          }
          if ($properties->getSubject() > '') {
              $html .= '      <meta name="subject" content="' . htmlspecialchars($properties->getSubject()) . '" />' . PHP_EOL;
          }
          if ($properties->getKeywords() > '') {
              $html .= '      <meta name="keywords" content="' . htmlspecialchars($properties->getKeywords()) . '" />' . PHP_EOL;
          }
          if ($properties->getCategory() > '') {
              $html .= '      <meta name="category" content="' . htmlspecialchars($properties->getCategory()) . '" />' . PHP_EOL;
          }
          if ($properties->getCompany() > '') {
              $html .= '      <meta name="company" content="' . htmlspecialchars($properties->getCompany()) . '" />' . PHP_EOL;
          }
          if ($properties->getManager() > '') {
              $html .= '      <meta name="manager" content="' . htmlspecialchars($properties->getManager()) . '" />' . PHP_EOL;
          }
  
          if ($pIncludeStyles) {
              $html .= $this->generateStyles(true);
          }
  
          $html .= '  </head>' . PHP_EOL;
          $html .= '' . PHP_EOL;
          $html .= '  <body>' . PHP_EOL;
  
          return $html;
      }
code_tokens: public function generateHTMLHeader ( $ pIncludeStyles = false ) { // PHPExcel object known? if ( is_null ( $ this -> phpExcel ) ) { throw new PHPExcel_Writer_Exception ( 'Internal PHPExcel object not set to an instance of an object.' ) ; } // Construct HTML $ properties = $ this -> phpExcel -> getProperties ( ) ; $ html = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">' . PHP_EOL ; $ html .= '<!-- Generated by PHPExcel - http://www.phpexcel.net -->' . PHP_EOL ; $ html .= '<html>' . PHP_EOL ; $ html .= '  <head>' . PHP_EOL ; $ html .= '      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">' . PHP_EOL ; if ( $ properties -> getTitle ( ) > '' ) { $ html .= '      <title>' . htmlspecialchars ( $ properties -> getTitle ( ) ) . '</title>' . PHP_EOL ; } if ( $ properties -> getCreator ( ) > '' ) { $ html .= '      <meta name="author" content="' . htmlspecialchars ( $ properties -> getCreator ( ) ) . '" />' . PHP_EOL ; } if ( $ properties -> getTitle ( ) > '' ) { $ html .= '      <meta name="title" content="' . htmlspecialchars ( $ properties -> getTitle ( ) ) . '" />' . PHP_EOL ; } if ( $ properties -> getDescription ( ) > '' ) { $ html .= '      <meta name="description" content="' . htmlspecialchars ( $ properties -> getDescription ( ) ) . '" />' . PHP_EOL ; } if ( $ properties -> getSubject ( ) > '' ) { $ html .= '      <meta name="subject" content="' . htmlspecialchars ( $ properties -> getSubject ( ) ) . '" />' . PHP_EOL ; } if ( $ properties -> getKeywords ( ) > '' ) { $ html .= '      <meta name="keywords" content="' . htmlspecialchars ( $ properties -> getKeywords ( ) ) . '" />' . PHP_EOL ; } if ( $ properties -> getCategory ( ) > '' ) { $ html .= '      <meta name="category" content="' . htmlspecialchars ( $ properties -> getCategory ( ) ) . '" />' . PHP_EOL ; } if ( $ properties -> getCompany ( ) > '' ) { $ html .= '      <meta name="company" content="' . htmlspecialchars ( $ properties -> getCompany ( ) ) . '" />' . PHP_EOL ; } if ( $ properties -> getManager ( ) > '' ) { $ html .= '      <meta name="manager" content="' . htmlspecialchars ( $ properties -> getManager ( ) ) . '" />' . PHP_EOL ; } if ( $ pIncludeStyles ) { $ html .= $ this -> generateStyles ( true ) ; } $ html .= '  </head>' . PHP_EOL ; $ html .= '' . PHP_EOL ; $ html .= '  <body>' . PHP_EOL ; return $ html ; }
docstring: Generate HTML header
  
  @param    boolean        $pIncludeStyles        Include styles?
  @return    string
  @throws PHPExcel_Writer_Exception
docstring_tokens: Generate HTML header