PHP Class Bravo3\Orm\Services\ListManager

Afficher le fichier Open project: bravo3/orm Class Usage Examples

Méthodes publiques

Méthode Description
add ( object $entity, string $property, object $value, string $getter = null, string $setter = null ) Add an item to a list
remove ( object $entity, string $property, object $value, array $fns, string $getter = null, string $setter = null ) Remove an item from a list

Méthodes protégées

Méthode Description
resolveFunctionNames ( string $property, string $getter = null, string $setter = null ) : string[] Resolve default setter/getter names

Method Details

add() public static méthode

Add an item to a list
public static add ( object $entity, string $property, object $value, string $getter = null, string $setter = null )
$entity object
$property string Property name to add to, not needed if providing both a getter and setter
$value object Value to add
$getter string Custom getter name
$setter string Custom setter name

remove() public static méthode

Remove an item from a list
public static remove ( object $entity, string $property, object $value, array $fns, string $getter = null, string $setter = null )
$entity object
$property string Property name to remove from, not needed if providing both a getter and setter
$value object Value to remove
$fns array Array of getter functions which must have equal value to consider a match
$getter string Custom getter name
$setter string Custom setter name

resolveFunctionNames() protected static méthode

Resolve default setter/getter names
protected static resolveFunctionNames ( string $property, string $getter = null, string $setter = null ) : string[]
$property string
$getter string
$setter string
Résultat string[]