Closed popovserhii closed 7 years ago
@popovsergiy you mean the fluent interface
?
https://github.com/domnikl/DesignPatternsPHP/tree/master/Structural/FluentInterface
@ThaDafinser, yes but you are called this differently :-)
I meant call chain of methods
(new \ZfcDatagrid\Column\Formatter\Link())
->setAttribute('class', 'pencil-edit')
->setAttribute('data-href', '/some/link')
->setLink('/other/link')
I see your point.
In ZfcDatagrid, indeed, most of setters are not fluent (means that they don't return $this) you can't chain them.
Why not adding return $this.
This issue was moved to zfc-datagrid/zfc-datagrid#28
Since PHP 5.4 appears awesomeness "class member access on instantiation"
It would be very useful add something like this to your library: