Wpis z mikrobloga

@c2d628ba98ed491776c9335e988e2e3b:

Da się. Spróbuję wyjaśnić w prosty sposób:

class something
{
public function alterProperty()
{

}
}

class przyklad
{
public $property;

public function _construct()
{
$this->property = new something();
}
}

$class = new przyklad();
$class->property->alterProperty();

Ale zgaduję, że Tobie chodzi o referencyjne wywoływanie funkcji. Wtedy to wygląda tak:

class przyklad
{
public function alterProperty1()
{
// do
something;
return $this;
}

public function alterProperty2()
{
// do_something;
return