Answer the question
In order to leave comments, you need to log in
Netbeans, autocomplete, fluent interface
And how do you solve the problem with a fluid interface?
class Shape
{
/** @param type $color
* @return \Shape */
public function setPenColor($color)
{ return $this; }
/** @param type $color
* @return \Shape */
public function setBrushColor($color)
{ return $this; }
}
class Circle extends shape
{
/** @param type $x
* @param type $y
* @return \Circle */
public function setCenter($x, $y)
{ return $this; }
/** @param type $radius
* @return \Circle */
public function setRadius($radius)
{ return $this; }
}
$circle = (new Circle())
->setBrushColor($color)
->|;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question