<?php
abstract class Manager
{
public
$content_storage='';
public function __toString()
{
return $this->content_storage;
}
}
abstract class EntryClass
{
public static function Launch()
{
return new FluentInterface;
}
}
class FluentInterface extends Manager
{
public function __construct()
{
/**
* Что-нибудь инициализируем
*/
}
public static function _GetObject($n,array $params)
{
return $n.'<br>'.PHP_EOL;;
}
}
echo $FI=EntryClass::Launch()
->First()
->Second()
->Third();
/*
Выведет
First
Second
Third
*/
?>
Fatal error: Uncaught Error: Call to undefined method FluentInterface::First() in /in/UDAl3:38
Stack trace:
#0 {main}
thrown in /in/UDAl3 on line 38
Process exited with code 255.