title: Strict Standards: Declaration of My_Pdf_Document::save() should be compatible with that of Zend_Pdf::save()
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3115388/declaration-of-methods-should-be-compatible-with-parent-methods-in-php">Declaration of Methods should be Compatible with Parent Methods in PHP</a>  </p>
  </blockquote>
  
  
  
  <p>I am implementing PDF (Zend_Pdf_Table), downloaded from  <a href="http://sourceforge.net/projects/zendpdftable/" rel="nofollow noreferrer">SourceForge</a></p>
  
  <p>now the problem is that its giving me following errors.</p>
  
  <pre><code> Error 1=Strict Standards: Declaration of My_Pdf_Document::save() should be compatible 
   with that of Zend_Pdf::save() in D:\SVN data\WebClient_PHP\trunk\library
  \My\Pdf\Document.php on line 2
  </code></pre>
  
  <p>Line#2 is</p>
  
  <pre><code>class My_Pdf_Document extends My_Pdf{
  </code></pre>
  
  <p>the second error is</p>
  
  <pre><code>Error 2=Fatal error: Declaration of My_Pdf_Page::drawImage() must be compatible with
  that of Zend_Pdf_Canvas_Interface::drawImage() in D:\SVN data\WebClient_PHP\trunk
  \library\My\Pdf\Page.php on line 369
  </code></pre>
  
  <p>some code from my action</p>
  
  <pre><code>  $instance   = new abc();
   $select     = $instance-&gt;Get_xyz($p);
  
    try {
  
    // create PDF
         $pdf = new My_Pdf_Document('Call Logs Details.pdf', '.');
  
                    // create page
                    $page = $pdf-&gt;createPage();
  
                    // define font resource
                    $font = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA);
  
                    // set font
                    $page-&gt;setFont($font, 24);
  
                    // create table
                    $table = new My_Pdf_Table(3);
  
                    // iterate over record set
                    // set up table content
                    while ($record = $select-&gt;fetch()) {
                      $row = new My_Pdf_Table_Row();
                      $cols = array();
                      foreach ($record as $k =&gt; $v) {
                        $col = new My_Pdf_Table_Column();
                        $col-&gt;setText($v);
                        $cols[] = $col;
                      }
                      $row-&gt;setColumns($cols);
                      $row-&gt;setFont($font, 14);
                      $row-&gt;setBorder(My_Pdf::TOP, new Zend_Pdf_Style());
                      $row-&gt;setBorder(My_Pdf::BOTTOM, new Zend_Pdf_Style());
                      $row-&gt;setBorder(My_Pdf::LEFT, new Zend_Pdf_Style());
                      $row-&gt;setCellPaddings(array(10,10,10,10));
                      $table-&gt;addRow($row);
                    }
  
                    // add table to page
                    $page-&gt;addTable($table, 0, 0);
  
                    // add page to document
                    $pdf-&gt;addPage($page);
  
                    // save as file
                    $pdf-&gt;save();
                    echo 'SUCCESS: Document saved!';
                  } catch (Zend_Pdf_Exception $e) {
                    die ('PDF error: ' . $e-&gt;getMessage());
                  } catch (Exception $e) {
                    die ('Application error: ' . $e-&gt;getMessage());
                  }
  </code></pre>
  
  <p>Any idea why i am getting following errors.What i am missing ?? i am using latest Zend framework.</p>