type = "arrow"; $this->start = array("x"=>$x, "y"=>$y); $this->end = array("x"=>$a, "y"=>$b); $this->colour($colour); $this->{"barb-length"} = $barb_length; $this->{"stroke"} = $stroke; } function colour( $colour ) { $this->colour = $colour; return $this; } }