public function createLineShape($fromX, $fromY, $toX, $toY) { $shape = new Line($fromX, $fromY, $toX, $toY); $this->addShape($shape); return $shape; }