PHP 클래스 Dotink\Parody\Quip

저자: Matthew J. Sahagian [mjs] ([email protected])
파일 보기 프로젝트 열기: dotink/parody

보호된 프로퍼티들

프로퍼티 타입 설명
$extended array The extended properties for this Quip
$factories array A list of availble factories for instantiating classes, keyed by class name
$methods array The registered methods on this Quip, keyed by method name
$mime Mime The mime associated with this object. This value is only set in the Mime constructor.
$objects array A list of the first created Quips keyed by class
$properties array The registered properties on this Quip, keyed by property name

공개 메소드들

메소드 설명
__call ( string $method, array $args ) : mixed Handle missing instance calls
__callStatic ( string $method, array $args ) : mixed Handle missing static calls
__construct ( ) : void Instantiate a new Quip.
__get ( string $property ) : mixed Handle missing instance properties
__isset ( string $property ) : boolean Handle checking whether or not properties are set
__set ( string $property, mixed $value ) : void Handle setting properties
__unset ( string $property ) : void Handle unsetting a property

보호된 메소드들

메소드 설명
qualify ( string $class ) : string Qualifies a class for the global namespace by ensuring it has a \ in front.

메소드 상세

__call() 공개 메소드

This method will look for the value assigned via Mime::onCall which whose expectations match the arguments provided. If the value is a Closure the return value of the closure will be returned, but the Quip's mime will be passed as the first and only argument so that future behavior can be modified based on the call.
public __call ( string $method, array $args ) : mixed
$method string The method we are trying to call
$args array The arguments that were passed to the method
리턴 mixed The value as mimicked by the call

__callStatic() 공개 정적인 메소드

Static calls are always looked up on the most recently instantiated Quip, so if you need to mimick their functionality you should create a mime and add them first.
public static __callStatic ( string $method, array $args ) : mixed
$method string The static method we are trying to call
$args array The arguments that were passed to the method
리턴 mixed The value that the method should provide with matching expectations

__construct() 공개 메소드

This method will look through the list of registered factories created with the Mime::onNew() method. The factory is passed a new mime wrapper with this quip as it's first and only argument for post-instantiation modification.
public __construct ( ) : void
리턴 void

__get() 공개 메소드

This method will return the value assigned via Mime::onGet. It is possible that a user is attempting to mimic a magic property which would normally be accessed and provided via the __get() method on the actual class. Since this method can contain logic, it is also possible to have a Closure registered with Mime::give() on a property. As with other mimicking, the Closure will be passed the mime object as the first and only argument.
public __get ( string $property ) : mixed
$property string The property we are trying to get
리턴 mixed The value as mimicked by the property

__isset() 공개 메소드

Handle checking whether or not properties are set
public __isset ( string $property ) : boolean
$property string The property to check if it is set
리턴 boolean TRUE if the mimicked property is set, FALSE otherwise

__set() 공개 메소드

Handle setting properties
public __set ( string $property, mixed $value ) : void
$property string THe property to set
$value mixed The value to set it to
리턴 void

__unset() 공개 메소드

Handle unsetting a property
public __unset ( string $property ) : void
$property string The property to check if it is set
리턴 void

qualify() 보호된 정적인 메소드

Qualifies a class for the global namespace by ensuring it has a \ in front.
protected static qualify ( string $class ) : string
$class string The class to qualify
리턴 string The qualfied class

프로퍼티 상세

$extended 보호되어 있는 프로퍼티

The extended properties for this Quip
protected array $extended
리턴 array

$factories 보호되어 있는 정적으로 프로퍼티

A list of availble factories for instantiating classes, keyed by class name
protected static array $factories
리턴 array

$methods 보호되어 있는 프로퍼티

The registered methods on this Quip, keyed by method name
protected array $methods
리턴 array

$mime 보호되어 있는 프로퍼티

The mime associated with this object. This value is only set in the Mime constructor.
protected Mime,Dotink\Parody $mime
리턴 Mime

$objects 보호되어 있는 정적으로 프로퍼티

A list of the first created Quips keyed by class
protected static array $objects
리턴 array

$properties 보호되어 있는 프로퍼티

The registered properties on this Quip, keyed by property name
protected array $properties
리턴 array