PHP Class Pheasant\Finder\Wizard

Afficher le fichier Open project: lox/pheasant Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( $schema, $finder ) Construct
dispatch ( $method, $params ) : mixed Magically derives a query to send to the internal finder
find ( $criteria = null ) : Collection Delegates directory to the Finder::find method
fromClass ( $className ) : Wizard Helper to build Wizard

Private Methods

Méthode Description
_findById ( $params ) Find an object by primary key
_sqlFromMethod ( $method ) Derives an sql clause from a finder method e.g findByLlamaAndBlargh becomes llama=? and blargh=?

Method Details

__construct() public méthode

Construct
public __construct ( $schema, $finder )

dispatch() public méthode

Magically derives a query to send to the internal finder
public dispatch ( $method, $params ) : mixed
Résultat mixed Either a Collection or a DomainObject

find() public méthode

Delegates directory to the Finder::find method
public find ( $criteria = null ) : Collection
Résultat Collection

fromClass() public static méthode

Helper to build Wizard
public static fromClass ( $className ) : Wizard
Résultat Wizard