public function __construct($functionName, $delegateObject, $delegateMethodName = null) { $this->functionName = $functionName; if (!is_object($delegateObject)) { throw yTest_Exception::badDelegateObject($delegateObject, $functionName); } $this->delegateObject = $delegateObject; if ($delegateMethodName === null) { $delegateMethodName = $functionName; } $this->delegateMethodName = $delegateMethodName; $this->delegateClassName = get_class($delegateObject); }
private function __construct($rewireMode, $instance, $className, $methodName, $delegateObject, $delegateMethodName = null) { $this->rewireMode = $rewireMode; if ($delegateMethodName === null) { $delegateMethodName = $methodName; } $this->instance = $instance; $this->methodName = $methodName; $this->className = $className; if (!is_object($delegateObject)) { throw yTest_Exception::badDelegateObject($delegateObject, $methodName); } $this->delegateObject = $delegateObject; $this->delegateMethodName = $delegateMethodName; $this->delegateClassName = get_class($delegateObject); }