public function __construct(array $ConstantArguments = []) { parent::__construct(new InvocationGetter($ConstantArguments), new InvocationSetter($ConstantArguments)); }
public function __construct($GetterMethodName, $SetterMethodName) { parent::__construct(new MethodGetter($GetterMethodName), new MethodSetter($SetterMethodName)); }
public function __construct($Index) { $this->Index = $Index; parent::__construct(new IndexGetter($Index), new IndexSetter($Index)); }
public function __construct($FieldName) { parent::__construct(new FieldGetter($FieldName), new FieldSetter($FieldName)); }
<?php class GetterSetter { private $a = 1; public function get_a() { echo $this->a; } public function set_a() { echo $this->a = 5; } } $example = new GetterSetter(); echo $example->get_a(); echo "<br/>"; echo $example->set_a();