PHP Class PhpSpec\Wrapper\Subject

Inheritance: implements ArrayAcces\ArrayAccess, implements PhpSpec\Wrapper\WrapperInterface
Mostrar archivo Open project: phpspec/phpspec Class Usage Examples

Public Methods

Method Description
__call ( string $method, array $arguments = [] ) : mixed | Subject
__construct ( mixed $subject, Wrapper $wrapper, WrappedObject $wrappedObject, Caller $caller, SubjectWithArrayAccess $arrayAccess, ExpectationFactory $expectationFactory )
__get ( string $property ) : string | Subject
__invoke ( ) : Subject
__set ( string $property, mixed $value = null ) : mixed
beAnInstanceOf ( string $className, array $arguments = [] )
beConstructedThrough ( array | string $factoryMethod, array $arguments = [] )
beConstructedWith ( )
callOnWrappedObject ( string $method, array $arguments = [] ) : Subject
getFromWrappedObject ( string $property ) : string | Subject
getWrappedObject ( ) : mixed
offsetExists ( string | integer $key ) : Subject
offsetGet ( string | integer $key ) : Subject
offsetSet ( string | integer $key, mixed $value )
offsetUnset ( string | integer $key )
setToWrappedObject ( string $property, mixed $value = null ) : mixed

Private Methods

Method Description
callExpectation ( string $method, array $arguments ) : mixed
makeSureWeHaveASubject ( ) : object
wrap ( string $value ) : Subject

Method Details

__call() public method

public __call ( string $method, array $arguments = [] ) : mixed | Subject
$method string
$arguments array
return mixed | Subject

__construct() public method

public __construct ( mixed $subject, Wrapper $wrapper, WrappedObject $wrappedObject, Caller $caller, SubjectWithArrayAccess $arrayAccess, ExpectationFactory $expectationFactory )
$subject mixed
$wrapper Wrapper
$wrappedObject PhpSpec\Wrapper\Subject\WrappedObject
$caller PhpSpec\Wrapper\Subject\Caller
$arrayAccess PhpSpec\Wrapper\Subject\SubjectWithArrayAccess
$expectationFactory PhpSpec\Wrapper\Subject\ExpectationFactory

__get() public method

public __get ( string $property ) : string | Subject
$property string
return string | Subject

__invoke() public method

public __invoke ( ) : Subject
return Subject

__set() public method

public __set ( string $property, mixed $value = null ) : mixed
$property string
$value mixed
return mixed

beAnInstanceOf() public method

public beAnInstanceOf ( string $className, array $arguments = [] )
$className string
$arguments array

beConstructedThrough() public method

public beConstructedThrough ( array | string $factoryMethod, array $arguments = [] )
$factoryMethod array | string
$arguments array

beConstructedWith() public method

public beConstructedWith ( )

callOnWrappedObject() public method

public callOnWrappedObject ( string $method, array $arguments = [] ) : Subject
$method string
$arguments array
return Subject

getFromWrappedObject() public method

public getFromWrappedObject ( string $property ) : string | Subject
$property string
return string | Subject

getWrappedObject() public method

public getWrappedObject ( ) : mixed
return mixed

offsetExists() public method

public offsetExists ( string | integer $key ) : Subject
$key string | integer
return Subject

offsetGet() public method

public offsetGet ( string | integer $key ) : Subject
$key string | integer
return Subject

offsetSet() public method

public offsetSet ( string | integer $key, mixed $value )
$key string | integer
$value mixed

offsetUnset() public method

public offsetUnset ( string | integer $key )
$key string | integer

setToWrappedObject() public method

public setToWrappedObject ( string $property, mixed $value = null ) : mixed
$property string
$value mixed
return mixed