_wrappedInstance = $wrappedInstance; } /** * __call * * @param string $methodName メソッド名 * @param array $params パラメータ * @return mixed */ public function __call($methodName, $params) { if (substr($methodName, 0, 9) === '_testing_') { $callName = substr($methodName, 9); $method = new ReflectionMethod($this->_wrappedInstance, $callName); $method->setAccessible(true); $result = $method->invokeArgs($this->_wrappedInstance, $params); return $result; } else { return call_user_func_array(array($this->_wrappedInstance, $methodName), $params); } } }