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