キータを見ていたら凄いメソッドチェーンがあったので参考に記録しておく。 ちょっと改造も施しておく。 コード class chain { private $context = null; public function __construct($init){ $this->context = $init; } public function __call($function, $arg){ $arg[] = $this->context; $method = "_" . $function; if(method_exists($this, $method)) { $this->context = call_user_func_array(array($this, $method), $arg); } elseif(is_callable($function)) { $this->contex