PhpOffice\PhpPresentation\Shape\Chart\PlotArea::getType PHP Method

getType() public method

Get type
public getType ( ) : AbstractType
return PhpOffice\PhpPresentation\Shape\Chart\Type\AbstractType
    public function getType()
    {
        if (is_null($this->type)) {
            throw new \Exception('Chart type has not been set.');
        }
        return $this->type;
    }

Usage Example

Example #1
0
 /**
  * @expectedException \Exception
  * @expectedExceptionMessage Chart type has not been set.
  */
 public function testTypeException()
 {
     $object = new PlotArea();
     $object->getType();
 }