/** * Constructor * @param Node $parent */ public function __construct($position = false, $text = false) { parent::__construct(); if (!$position) { $position = new Point(0, 0); } $this->position = $position; if (!$text) { $text = "Some text here"; } $this->text = $text; }
/** * Constructor * @param Node $parent */ public function __construct($start = null, $end = null) { parent::__construct(); if (!$start) { $start = new Point(0, 0); } $this->start = $start; if (!$end) { $end = new Point(100, 100); } $this->end = $end; }
/** * Main constructor */ function __construct() { parent::__construct(); // Default initialisation $this->elements = array(); $this->isLayoutVertical = false; $this->isLayoutHorizontal = false; $this->isLayoutWrapping = false; $this->hasPath = false; $this->hasLoop = false; $this->hasLoopLabel = false; $this->loopLabel = ''; $this->hasComment = false; $this->comment = ''; $this->hasCondition = false; $this->hasDots = false; $this->margin = 0; }
/** * Constructor * @param Node $parent */ public function __construct($x = 0, $y = 0) { parent::__construct(); $this->x = $x; $this->y = $y; }