PHP Class Dotink\Parody\Quip

Author: Matthew J. Sahagian [mjs] ([email protected])
Afficher le fichier Open project: dotink/parody

Protected Properties

Свойство Type Description
$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

Méthodes publiques

Méthode Description
__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

Méthodes protégées

Méthode Description
qualify ( string $class ) : string Qualifies a class for the global namespace by ensuring it has a \ in front.

Method Details

__call() public méthode

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
Résultat mixed The value as mimicked by the call

__callStatic() public static méthode

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
Résultat mixed The value that the method should provide with matching expectations

__construct() public méthode

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
Résultat void

__get() public méthode

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
Résultat mixed The value as mimicked by the property

__isset() public méthode

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

__set() public méthode

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

__unset() public méthode

Handle unsetting a property
public __unset ( string $property ) : void
$property string The property to check if it is set
Résultat void

qualify() protected static méthode

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
Résultat string The qualfied class

Property Details

$extended protected_oe property

The extended properties for this Quip
protected array $extended
Résultat array

$factories protected_oe static_oe property

A list of availble factories for instantiating classes, keyed by class name
protected static array $factories
Résultat array

$methods protected_oe property

The registered methods on this Quip, keyed by method name
protected array $methods
Résultat array

$mime protected_oe property

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

$objects protected_oe static_oe property

A list of the first created Quips keyed by class
protected static array $objects
Résultat array

$properties protected_oe property

The registered properties on this Quip, keyed by property name
protected array $properties
Résultat array