PHPExcel_Writer
[ class tree: PHPExcel_Writer ] [ index: PHPExcel_Writer ] [ all elements ]

Source for file Excel5.php

Documentation is available at Excel5.php

  1. <?php
  2. /**
  3.  * PHPExcel
  4.  *
  5.  * Copyright (c) 2006 - 2008 PHPExcel
  6.  *
  7.  * This library is free software; you can redistribute it and/or
  8.  * modify it under the terms of the GNU Lesser General Public
  9.  * License as published by the Free Software Foundation; either
  10.  * version 2.1 of the License, or (at your option) any later version.
  11.  *
  12.  * This library is distributed in the hope that it will be useful,
  13.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15.  * Lesser General Public License for more details.
  16.  *
  17.  * You should have received a copy of the GNU Lesser General Public
  18.  * License along with this library; if not, write to the Free Software
  19.  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  20.  *
  21.  * @category   PHPExcel
  22.  * @package    PHPExcel_Writer
  23.  * @copyright  Copyright (c) 2006 - 2008 PHPExcel (http://www.codeplex.com/PHPExcel)
  24.  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  25.  * @version    1.6.3, 2008-08-25
  26.  */
  27.  
  28.  
  29. /** PHPExcel_IWriter */
  30. require_once 'PHPExcel/Writer/IWriter.php';
  31.  
  32. /** PHPExcel_Cell */
  33. require_once 'PHPExcel/Cell.php';
  34.  
  35. /** PHPExcel_Writer_Excel5_Writer */
  36. require_once 'PHPExcel/Writer/Excel5/Writer.php';
  37.  
  38. /** PHPExcel_RichText */
  39. require_once 'PHPExcel/RichText.php';
  40.  
  41.  
  42. /**
  43.  * PHPExcel_Writer_Excel5
  44.  *
  45.  * @category   PHPExcel
  46.  * @package    PHPExcel_Writer
  47.  * @copyright  Copyright (c) 2006 - 2008 PHPExcel (http://www.codeplex.com/PHPExcel)
  48.  */
  49. class PHPExcel_Writer_Excel5 implements PHPExcel_Writer_IWriter {
  50.     /**
  51.      * PHPExcel object
  52.      *
  53.      * @var PHPExcel 
  54.      */
  55.     private $_phpExcel;
  56.  
  57.     /**
  58.      * Temporary storage directory
  59.      *
  60.      * @var string 
  61.      */
  62.     private $_tempDir = '';
  63.  
  64.     /**
  65.      * Color cache
  66.      */
  67.     private $_colors = array();
  68.  
  69.     /**
  70.      * Create a new PHPExcel_Writer_Excel5
  71.      *
  72.      * @param    PHPExcel    $phpExcel    PHPExcel object
  73.      */
  74.     public function __construct(PHPExcel $phpExcel) {
  75.         $this->_phpExcel    = $phpExcel;
  76.         $this->_tempDir        = '';
  77.         $this->_colors        = array();
  78.     }
  79.  
  80.     /**
  81.      * Save PHPExcel to file
  82.      *
  83.      * @param    string        $pFileName 
  84.      * @throws    Exception
  85.      */
  86.     public function save($pFilename = null) {
  87.         $this->_colors        = array();
  88.  
  89.         $phpExcel = $this->_phpExcel;
  90.         $workbook = new PHPExcel_Writer_Excel5_Writer($pFilename);
  91.         $workbook->setVersion(8);
  92.  
  93.         // Set temp dir
  94.         if ($this->_tempDir != '') {
  95.             $workbook->setTempDir($this->_tempDir);
  96.         }
  97.  
  98.         $saveDateReturnType = PHPExcel_Calculation_Functions::getReturnDateType();
  99.  
  100.         // Add empty sheets
  101.         foreach ($phpExcel->getSheetNames() as $sheetIndex => $sheetName) {
  102.             $phpSheet  = $phpExcel->getSheet($sheetIndex);
  103.             $worksheet = $workbook->addWorksheet($sheetName);
  104.         }
  105.         $allWorksheets = $workbook->worksheets();
  106.  
  107.         // Add full sheet data
  108.         foreach ($phpExcel->getSheetNames() as $sheetIndex => $sheetName) {
  109.             $phpSheet  = $phpExcel->getSheet($sheetIndex);
  110.             $worksheet = $allWorksheets[$sheetIndex];
  111.             $worksheet->setInputEncoding("UTF-8");
  112.  
  113.             // Default style
  114.             $emptyStyle = $phpSheet->getDefaultStyle();
  115.  
  116.             $aStyles = $phpSheet->getStyles();
  117.  
  118.             $freeze = $phpSheet->getFreezePane();
  119.             if ($freeze) {
  120.                 list($column, $row) = PHPExcel_Cell::coordinateFromString($freeze);
  121.                 $worksheet->freezePanes(array($row - 1, PHPExcel_Cell::columnIndexFromString($column) - 1));
  122.             }
  123.  
  124.             //if ($sheetIndex == $phpExcel->getActiveSheetIndex()) {
  125.                 // $worksheet->select();
  126.             //}
  127.  
  128.             if ($phpSheet->getProtection()->getSheet()) {
  129.                 $worksheet->protect($phpSheet->getProtection()->getPassword(), true);
  130.             }
  131.  
  132.             if (!$phpSheet->getShowGridlines()) {
  133.                 $worksheet->hideGridLines();
  134.             }
  135.  
  136.             $formats = array();
  137.             foreach ($phpSheet->getCellCollection() as $cell) {
  138.                 $row = $cell->getRow() - 1;
  139.                 $column = PHPExcel_Cell::columnIndexFromString($cell->getColumn()) - 1;
  140.  
  141.                 // Don't break Excel!
  142.                 if ($row + 1 >= 65569) {
  143.                     break;
  144.                 }
  145.  
  146.                 $style = $emptyStyle;
  147.                 if (isset($aStyles[$cell->getCoordinate()])) {
  148.                     $style = $aStyles[$cell->getCoordinate()];
  149.                 }
  150.                 $styleHash = $style->getHashCode();
  151.  
  152.                 if (!isset($formats[$styleHash])) {
  153.                     $formats[$styleHash] = $workbook->addFormat(array(
  154.                         'HAlign' => $style->getAlignment()->getHorizontal(),
  155.                         'VAlign' => $this->_mapVAlign($style->getAlignment()->getVertical()),
  156.                         'TextRotation' => $style->getAlignment()->getTextRotation(),
  157.  
  158.                         'Bold' => $style->getFont()->getBold(),
  159.                         'FontFamily' => $style->getFont()->getName(),
  160.                         'Color' => $this->_addColor($workbook, $style->getFont()->getColor()->getRGB()),
  161.                         'Underline' => $this->_mapUnderline($style->getFont()->getUnderline()),
  162.                         'Size' => $style->getFont()->getSize(),
  163.                         //~ 'Script' => $style->getSuperscript(),
  164.  
  165.                         'NumFormat' => iconv("UTF-8", "Windows-1252", $style->getNumberFormat()->getFormatCode()),
  166.  
  167.                         'Bottom' => $this->_mapBorderStyle($style->getBorders()->getBottom()->getBorderStyle()),
  168.                         'Top' => $this->_mapBorderStyle($style->getBorders()->getTop()->getBorderStyle()),
  169.                         'Left' => $this->_mapBorderStyle($style->getBorders()->getLeft()->getBorderStyle()),
  170.                         'Right' => $this->_mapBorderStyle($style->getBorders()->getRight()->getBorderStyle()),
  171.                         'BottomColor' => $this->_addColor($workbook, $style->getBorders()->getBottom()->getColor()->getRGB()),
  172.                         'TopColor' => $this->_addColor($workbook, $style->getBorders()->getTop()->getColor()->getRGB()),
  173.                         'RightColor' => $this->_addColor($workbook, $style->getBorders()->getRight()->getColor()->getRGB()),
  174.                         'LeftColor' => $this->_addColor($workbook, $style->getBorders()->getLeft()->getColor()->getRGB()),
  175.  
  176.                         'FgColor' => $this->_addColor($workbook, $style->getFill()->getStartColor()->getRGB()),
  177.                         'BgColor' => $this->_addColor($workbook, $style->getFill()->getEndColor()->getRGB()),
  178.                         'Pattern' => $this->_mapFillType($style->getFill()->getFillType()),
  179.  
  180.                     ));
  181.                     if ($style->getAlignment()->getWrapText()) {
  182.                         $formats[$styleHash]->setTextWrap();
  183.                     }
  184.                     if ($style->getAlignment()->getShrinkToFit()) {
  185.                         $formats[$styleHash]->setShrinkToFit();
  186.                     }
  187.                     if ($style->getFont()->getItalic()) {
  188.                         $formats[$styleHash]->setItalic();
  189.                     }
  190.                     if ($style->getFont()->getStriketrough()) {
  191.                         $formats[$styleHash]->setStrikeOut();
  192.                     }
  193.                 }
  194.  
  195.                 // Write cell value
  196.                 if ($cell->getValue() instanceof PHPExcel_RichText) {
  197.                     $worksheet->write($row, $column, $cell->getValue()->getPlainText(), $formats[$styleHash]);
  198.                 } else {
  199.                     // Hyperlink?
  200.                     if ($cell->hasHyperlink()) {
  201.                         $worksheet->writeUrl($row, $column, str_replace('sheet://', 'internal:', $cell->getHyperlink()->getUrl()), $cell->getValue(), $formats[$styleHash]);
  202.                     } else {
  203.                         $worksheet->write($row, $column, $cell->getValue(), $formats[$styleHash],$style->getNumberFormat()->getFormatCode());
  204.                     }
  205.                 }
  206.             }
  207.  
  208.             // Column dimensions
  209.             $phpSheet->calculateColumnWidths();
  210.             $defaultWidth = null;
  211.             if ($phpSheet->getDefaultColumnDimension()->getWidth() >= 0) {
  212.                 $defaultWidth = $phpSheet->getDefaultColumnDimension()->getWidth();
  213.                 for ($column = 0; $column < PHPExcel_Cell::columnIndexFromString($phpSheet->getHighestColumn()) - 1; $column++) {
  214.                     $worksheet->setColumn( $column, $column, $defaultWidth );
  215.                 }
  216.             }
  217.             foreach ($phpSheet->getColumnDimensions() as $columnDimension) {
  218.                 $column = PHPExcel_Cell::columnIndexFromString($columnDimension->getColumnIndex()) - 1;
  219.                 $worksheet->setColumn( $column, $column, $columnDimension->getWidth(), null, ($columnDimension->getVisible() ? '0' : '1'), $columnDimension->getOutlineLevel());
  220.             }
  221.  
  222.             // Row dimensions
  223.             $defaultHeight = null;
  224.             if ($phpSheet->getDefaultRowDimension()->getRowHeight() >= 0) {
  225.                 $defaultHeight = $phpSheet->getDefaultRowDimension()->getRowHeight();
  226.                 for ($i = 0; $i < $phpSheet->getHighestRow() - 1; $i++) {
  227.                     $worksheet->setRow( $i, $defaultHeight );
  228.                 }
  229.             }
  230.             foreach ($phpSheet->getRowDimensions() as $rowDimension) {
  231.                 $worksheet->setRow( $rowDimension->getRowIndex() - 1, $rowDimension->getRowHeight(), null, ($rowDimension->getVisible() ? '0' : '1'), $rowDimension->getOutlineLevel() );
  232.             }
  233.  
  234.             foreach ($phpSheet->getMergeCells() as $cells) {
  235.                 list($first, $last) = PHPExcel_Cell::splitRange($cells);
  236.                 list($firstColumn, $firstRow) = PHPExcel_Cell::coordinateFromString($first);
  237.                 list($lastColumn, $lastRow) = PHPExcel_Cell::coordinateFromString($last);
  238.                 $worksheet->mergeCells($firstRow - 1, PHPExcel_Cell::columnIndexFromString($firstColumn) - 1, $lastRow - 1, PHPExcel_Cell::columnIndexFromString($lastColumn) - 1);
  239.             }
  240.  
  241.             foreach ($phpSheet->getDrawingCollection() as $drawing) {
  242.                 if ($drawing instanceof PHPExcel_Worksheet_BaseDrawing) {
  243.                     $filename = $drawing->getPath();
  244.                     $imagesize = getimagesize($filename);
  245.                     switch ($imagesize[2]) {
  246.                         case 1: $image = imagecreatefromgif($filename); break;
  247.                         case 2: $image = imagecreatefromjpeg($filename); break;
  248.                         case 3: $image = imagecreatefrompng($filename); break;
  249.                         default: continue 2;
  250.                     }
  251.                     list($column, $row) = PHPExcel_Cell::coordinateFromString($drawing->getCoordinates());
  252.                     $worksheet->insertBitmap($row - 1, PHPExcel_Cell::columnIndexFromString($column) - 1, $image, $drawing->getOffsetX(), $drawing->getOffsetY(), $drawing->getWidth() / $imagesize[0], $drawing->getHeight() / $imagesize[1]);
  253.                 }
  254.             }
  255.  
  256.             // page setup
  257.             if ($phpSheet->getPageSetup()->getOrientation() == PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE) {
  258.                 $worksheet->setLandscape();
  259.             }
  260.             $worksheet->setPaper($phpSheet->getPageSetup()->getPaperSize());
  261.             $worksheet->setHeader($phpSheet->getHeaderFooter()->getOddHeader(), $phpSheet->getPageMargins()->getHeader());
  262.             $worksheet->setFooter($phpSheet->getHeaderFooter()->getOddFooter(), $phpSheet->getPageMargins()->getFooter());
  263.             $worksheet->setMarginLeft($phpSheet->getPageMargins()->getLeft());
  264.             $worksheet->setMarginRight($phpSheet->getPageMargins()->getRight());
  265.             $worksheet->setMarginTop($phpSheet->getPageMargins()->getTop());
  266.             $worksheet->setMarginBottom($phpSheet->getPageMargins()->getBottom());
  267.  
  268.             // -------------------------------------------------------------------
  269.             // Commented due to bug:
  270.             // http://pear.php.net/bugs/bug.php?id=2146
  271.             // -------------------------------------------------------------------
  272.             // // repeatColumns / repeatRows
  273.             // if ($phpSheet->getPageSetup()->isColumnsToRepeatAtLeftSet() || $phpSheet->getPageSetup()->isRowsToRepeatAtTopSet()) {
  274.             //     // Columns to repeat
  275.             //     if ($phpSheet->getPageSetup()->isColumnsToRepeatAtLeftSet()) {
  276.             //         $repeat = $phpSheet->getPageSetup()->getColumnsToRepeatAtLeft();
  277.             //
  278.             //         $worksheet->repeatColumns(PHPExcel_Cell::columnIndexFromString($repeat[0] - 1), PHPExcel_Cell::columnIndexFromString($repeat[1] - 1));
  279.             //     }
  280.             //
  281.             //     // Rows to repeat
  282.             //     if ($phpSheet->getPageSetup()->isRowsToRepeatAtTopSet()) {
  283.             //         $repeat = $phpSheet->getPageSetup()->getRowsToRepeatAtTop();
  284.             //
  285.             //         $worksheet->repeatRows($repeat[0], $repeat[1]);
  286.             //     }
  287.             // }
  288.  
  289.             // -------------------------------------------------------------------
  290.             // Commented due to bug:
  291.             // http://pear.php.net/bugs/bug.php?id=2146
  292.             // -------------------------------------------------------------------
  293.             // if ($phpSheet->getPageSetup()->isPrintAreaSet()) {
  294.             //    // Print area
  295.             //    $printArea = PHPExcel_Cell::splitRange($phpSheet->getPageSetup()->getPrintArea());
  296.             //    $printArea[0] = PHPExcel_Cell::coordinateFromString($printArea[0]);
  297.             //    $printArea[1] = PHPExcel_Cell::coordinateFromString($printArea[1]);
  298.             //
  299.             //    $worksheet->printArea(
  300.             //        $printArea[0][1],
  301.             //        PHPExcel_Cell::columnIndexFromString($printArea[0][0]) - 1,
  302.             //        $printArea[1][1],
  303.             //        PHPExcel_Cell::columnIndexFromString($printArea[1][0]) - 1
  304.             //    );
  305.             // }
  306.  
  307.             // Support for print scale
  308.             if ($phpSheet->getPageSetup()->getScale()) {
  309.                 $worksheet->setPrintScale($phpSheet->getPageSetup()->getScale());
  310.             }
  311.  
  312.             // Support for fitting to pages
  313.             if ($phpSheet->getPageSetup()->getFitToWidth()) {
  314.                 if ($phpSheet->getPageSetup()->getFitToHeight()) {
  315.                     // Both properties are set, so use them
  316.                     // Note: This case is double, see below
  317.                     $worksheet->fitToPages($phpSheet->getPageSetup()->getFitToWidth(), $phpSheet->getPageSetup()->getFitToHeight());
  318.                 } else {
  319.                     // Only width given, make assumption about height
  320.                     $height = 0;
  321.                     $worksheet->fitToPages($phpSheet->getPageSetup()->getFitToWidth(), $height);
  322.                 }
  323.             } else if ($phpSheet->getPageSetup()->getFitToHeight()) {
  324.                 if ($phpSheet->getPageSetup()->getFitToWidth()) {
  325.                     // Both properties are set, so use them
  326.                     // Note: This case is double, see below
  327.                     $worksheet->fitToPages($phpSheet->getPageSetup()->getFitToWidth(), $phpSheet->getPageSetup()->getFitToHeight());
  328.                 } else {
  329.                     // Only height given, make assumption about width
  330.                     $width = 0;
  331.                     $worksheet->fitToPages($width, $phpSheet->getPageSetup()->getFitToHeight());
  332.                 }
  333.             }
  334.  
  335.             // Support for breaks
  336.             $vBreaks = array();
  337.             $hBreaks = array();
  338.             foreach ($phpSheet->getBreaks() as $cell => $breakType) {
  339.                 // Fetch coordinates
  340.                 $coordinates = PHPExcel_Cell::coordinateFromString($cell);
  341.  
  342.                 // Decide what to do by the type of break
  343.                 switch ($breakType) {
  344.                     case PHPExcel_Worksheet::BREAK_COLUMN:
  345.                         // Add to list of vertical breaks
  346.                         $vBreaks[] = $coordinates[0];
  347.                         break;
  348.  
  349.                     case PHPExcel_Worksheet::BREAK_ROW:
  350.                         // Add to list of horizontal breaks
  351.                         $hBreaks[] = $coordinates[1];
  352.                         break;
  353.  
  354.                     case PHPExcel_Worksheet::BREAK_NONE:
  355.                     default:
  356.                         // Nothing to do
  357.                         break;
  358.                 }
  359.             }
  360.             $worksheet->setVPagebreaks($vBreaks);
  361.             $worksheet->setHPagebreaks($hBreaks);
  362.         }
  363.  
  364.         PHPExcel_Calculation_Functions::setReturnDateType($saveDateReturnType);
  365.  
  366.         $workbook->close();
  367.     }
  368.  
  369.     /**
  370.      * Add color
  371.      */
  372.     private function _addColor($workbook, $rgb) {
  373.         if (!isset($this->_colors[$rgb])) {
  374.             $workbook->setCustomColor(8 + count($this->_colors), hexdec(substr($rgb, 0, 2)), hexdec(substr($rgb, 2, 2)), hexdec(substr($rgb, 4)));
  375.             $this->_colors[$rgb] = 8 + count($this->_colors);
  376.         }
  377.         return $this->_colors[$rgb];
  378.     }
  379.  
  380.     /**
  381.      * Map border style
  382.      */
  383.     private function _mapBorderStyle($borderStyle) {
  384.         switch ($borderStyle) {
  385.             case PHPExcel_Style_Border::BORDER_NONE: return 0;
  386.             case PHPExcel_Style_Border::BORDER_THICK: return 2;
  387.             default: return 1; // map others to thin
  388.         }
  389.     }
  390.  
  391.     /**
  392.      * Map underline
  393.      */
  394.     private function _mapUnderline($underline) {
  395.         switch ($underline) {
  396.             case PHPExcel_Style_Font::UNDERLINE_NONE:
  397.                 return 0;
  398.             case PHPExcel_Style_Font::UNDERLINE_DOUBLE:
  399.             case PHPExcel_Style_Font::UNDERLINE_DOUBLEACCOUNTING:
  400.                 return 2;
  401.             default:
  402.                 return 1; // map others to single
  403.         }
  404.     }
  405.  
  406.     /**
  407.      * Map fill type
  408.      */
  409.     private function _mapFillType($fillType) {
  410.         switch ($fillType) { // just a guess
  411.             case PHPExcel_Style_Fill::FILL_NONE: return 0;
  412.             case PHPExcel_Style_Fill::FILL_SOLID: return 1;
  413.             case PHPExcel_Style_Fill::FILL_GRADIENT_LINEAR: return 2;
  414.             case PHPExcel_Style_Fill::FILL_GRADIENT_PATH: return 3;
  415.             case PHPExcel_Style_Fill::FILL_PATTERN_DARKDOWN: return 4;
  416.             case PHPExcel_Style_Fill::FILL_PATTERN_DARKGRAY: return 5;
  417.             case PHPExcel_Style_Fill::FILL_PATTERN_DARKGRID: return 6;
  418.             case PHPExcel_Style_Fill::FILL_PATTERN_DARKHORIZONTAL: return 7;
  419.             case PHPExcel_Style_Fill::FILL_PATTERN_DARKTRELLIS: return 8;
  420.             case PHPExcel_Style_Fill::FILL_PATTERN_DARKUP: return 9;
  421.             case PHPExcel_Style_Fill::FILL_PATTERN_DARKVERTICAL: return 10;
  422.             case PHPExcel_Style_Fill::FILL_PATTERN_GRAY0625: return 11;
  423.             case PHPExcel_Style_Fill::FILL_PATTERN_GRAY125: return 12;
  424.             case PHPExcel_Style_Fill::FILL_PATTERN_LIGHTDOWN: return 13;
  425.             case PHPExcel_Style_Fill::FILL_PATTERN_LIGHTGRAY: return 14;
  426.             case PHPExcel_Style_Fill::FILL_PATTERN_LIGHTGRID: return 15;
  427.             case PHPExcel_Style_Fill::FILL_PATTERN_LIGHTHORIZONTAL: return 16;
  428.             case PHPExcel_Style_Fill::FILL_PATTERN_LIGHTTRELLIS: return 17;
  429.             case PHPExcel_Style_Fill::FILL_PATTERN_LIGHTUP: return 18;
  430.             case PHPExcel_Style_Fill::FILL_PATTERN_LIGHTVERTICAL: return 19;
  431.             case PHPExcel_Style_Fill::FILL_PATTERN_MEDIUMGRAY: return 20;
  432.         }
  433.  
  434.         return 0;
  435.     }
  436.  
  437.     /**
  438.      * Map VAlign
  439.      */
  440.     private function _mapVAlign($vAlign) {
  441.         return ($vAlign == 'center' || $vAlign == 'justify' ? 'v' : '') . $vAlign;
  442.     }
  443.  
  444.     /**
  445.      * Get an array of all styles
  446.      *
  447.      * @param    PHPExcel                $pPHPExcel 
  448.      * @return    PHPExcel_Style[]        All styles in PHPExcel
  449.      * @throws    Exception
  450.      */
  451.     private function _allStyles(PHPExcel $pPHPExcel = null)
  452.     {
  453.         // Get an array of all styles
  454.         $aStyles        = array();
  455.  
  456.         for ($i = 0; $i < $pPHPExcel->getSheetCount(); $i++) {
  457.             foreach ($pPHPExcel->getSheet($i)->getStyles() as $style) {
  458.                 $aStyles[] = $style;
  459.             }
  460.         }
  461.  
  462.         return $aStyles;
  463.     }
  464.  
  465.     /**
  466.      * Get temporary storage directory
  467.      *
  468.      * @return string 
  469.      */
  470.     public function getTempDir() {
  471.         return $this->_tempDir;
  472.     }
  473.  
  474.     /**
  475.      * Set temporary storage directory
  476.      *
  477.      * @param    string    $pValue        Temporary storage directory
  478.      * @throws    Exception    Exception when directory does not exist
  479.      */
  480.     public function setTempDir($pValue = '') {
  481.         if (is_dir($pValue)) {
  482.             $this->_tempDir = $pValue;
  483.         } else {
  484.             throw new Exception("Directory does not exist: $pValue");
  485.         }
  486.     }
  487. }

Documentation generated on Mon, 25 Aug 2008 13:36:40 +0200 by phpDocumentor 1.4.1