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

Source for file Drawing.php

Documentation is available at Drawing.php

  1. <?php
  2. /**
  3.  * PHPPowerPoint
  4.  *
  5.  * Copyright (c) 2009 - 2010 PHPPowerPoint
  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   PHPPowerPoint
  22.  * @package    PHPPowerPoint_Writer_PowerPoint2007
  23.  * @copyright  Copyright (c) 2009 - 2010 PHPPowerPoint (http://www.codeplex.com/PHPPowerPoint)
  24.  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL
  25.  * @version    0.1.0, 2009-04-27
  26.  */
  27.  
  28.  
  29. /** PHPPowerPoint */
  30. require_once 'PHPPowerPoint.php';
  31.  
  32. /** PHPPowerPoint_Writer_PowerPoint2007 */
  33. require_once 'PHPPowerPoint/Writer/PowerPoint2007.php';
  34.  
  35. /** PHPPowerPoint_Writer_PowerPoint2007_WriterPart */
  36. require_once 'PHPPowerPoint/Writer/PowerPoint2007/WriterPart.php';
  37.  
  38. /** PHPPowerPoint_Shape_BaseDrawing */
  39. require_once 'PHPPowerPoint/Shape/BaseDrawing.php';
  40.  
  41. /** PHPPowerPoint_Shape_Drawing */
  42. require_once 'PHPPowerPoint/Shape/Drawing.php';
  43.  
  44. /** PHPPowerPoint_Shape_MemoryDrawing */
  45. require_once 'PHPPowerPoint/Shape/MemoryDrawing.php';
  46.  
  47. /** PHPPowerPoint_Slide */
  48. require_once 'PHPPowerPoint/Slide.php';
  49.  
  50. /** PHPPowerPoint_Shared_Drawing */
  51. require_once 'PHPPowerPoint/Shared/Drawing.php';
  52.  
  53. /** PHPPowerPoint_Shared_XMLWriter */
  54. require_once 'PHPPowerPoint/Shared/XMLWriter.php';
  55.  
  56.  
  57. /**
  58.  * PHPPowerPoint_Writer_PowerPoint2007_Drawing
  59.  *
  60.  * @category   PHPPowerPoint
  61.  * @package    PHPPowerPoint_Writer_PowerPoint2007
  62.  * @copyright  Copyright (c) 2009 - 2010 PHPPowerPoint (http://www.codeplex.com/PHPPowerPoint)
  63.  */
  64. {
  65.     /**
  66.      * Get an array of all drawings
  67.      *
  68.      * @param     PHPPowerPoint                            $pPHPPowerPoint 
  69.      * @return     PHPPowerPoint_Slide_Drawing[]        All drawings in PHPPowerPoint
  70.      * @throws     Exception
  71.      */
  72.     public function allDrawings(PHPPowerPoint $pPHPPowerPoint null)
  73.     {
  74.         // Get an array of all drawings
  75.         $aDrawings    array();
  76.  
  77.         // Loop trough PHPPowerPoint
  78.         $slideCount $pPHPPowerPoint->getSlideCount();
  79.         for ($i 0$i $slideCount++$i{
  80.             // Loop trough images and add to array
  81.             $iterator $pPHPPowerPoint->getSlide($i)->getShapeCollection()->getIterator();
  82.             while ($iterator->valid()) {
  83.                 if ($iterator->current(instanceof PHPPowerPoint_Shape_BaseDrawing{
  84.                     $aDrawings[$iterator->current();
  85.                 }
  86.                 
  87.                   $iterator->next();
  88.             }
  89.         }
  90.  
  91.         return $aDrawings;
  92.     }
  93. }

Documentation generated on Sat, 25 Apr 2009 11:37:11 +0200 by phpDocumentor 1.4.1