PhpOffice\PhpPresentation\Writer\PowerPoint2007\AbstractSlide::writeShapeCollection PHP Method

writeShapeCollection() protected method

protected writeShapeCollection ( PhpOffice\Common\XMLWriter $objWriter, ArrayObject | AbstractShape[] $shapes = [], integer &$shapeId )
$objWriter PhpOffice\Common\XMLWriter
$shapes ArrayObject | PhpOffice\PhpPresentation\AbstractShape[]
$shapeId integer
    protected function writeShapeCollection(XMLWriter $objWriter, $shapes = array(), &$shapeId = 0)
    {
        if (count($shapes) == 0) {
            return;
        }
        foreach ($shapes as $shape) {
            // Increment $shapeId
            ++$shapeId;
            // Check type
            if ($shape instanceof RichText) {
                $this->writeShapeText($objWriter, $shape, $shapeId);
            } elseif ($shape instanceof ShapeTable) {
                $this->writeShapeTable($objWriter, $shape, $shapeId);
            } elseif ($shape instanceof Line) {
                $this->writeShapeLine($objWriter, $shape, $shapeId);
            } elseif ($shape instanceof ShapeChart) {
                $this->writeShapeChart($objWriter, $shape, $shapeId);
            } elseif ($shape instanceof AbstractGraphic) {
                $this->writeShapePic($objWriter, $shape, $shapeId);
            } elseif ($shape instanceof Group) {
                $this->writeShapeGroup($objWriter, $shape, $shapeId);
            } elseif ($shape instanceof Comment) {
                return;
            } else {
                throw new \Exception("Unknown Shape type: {get_class({$shape})}");
            }
        }
    }