class Base {
public function test($string){
// Что то делаем.
return $this;
}
public function chek($string){
// Что то делаем.
return $this;
}
public function hello(){
// Что то делаем.
return $this;
}
}
$base
->test('string1')
->chek('string')
->hello();
class MyError
{
public $error;
public function setError($text,$number = 0)
{
$this->error['text'] = $text;
$this->error['number'] = $number;
}
public function getError()
{
return $this->error;
}
}
$x = new MyError();
$x->setError('Error!');
print_r($x->getError());