PHP Trait Stevebauman\Inventory\Traits\CommonMethodsTrait

Afficher le fichier Open project: stevebauman/inventory

Méthodes publiques

Méthode Description
getAttribute ( $key )
getKey ( )
getKeyName ( )
isValidQuantity ( integer | float | string $quantity ) : boolean Returns true if the specified quantity is valid, throws InvalidQuantityException otherwise.
setAttribute ( $key, $value )

Méthodes protégées

Méthode Description
dbCommitTransaction ( ) : mixed Alias for committing a database transaction.
dbRollbackTransaction ( ) : mixed Alias for rolling back a transaction.
dbStartTransaction ( ) : mixed Alias for beginning a database transaction.
fireEvent ( string $name, array $args = [] ) : mixed Alias for firing events easily that implement this trait.
isModel ( mixed $model ) : boolean Returns true/false if the specified model is a subclass of the Eloquent Model.
isNumeric ( integer | float | string $number ) : boolean Returns true/false if the number specified is numeric.
isPositive ( integer | float | string $number ) : boolean Returns true or false if the number inserted is positive.

Method Details

dbCommitTransaction() protected méthode

Alias for committing a database transaction.
protected dbCommitTransaction ( ) : mixed
Résultat mixed

dbRollbackTransaction() protected méthode

Alias for rolling back a transaction.
protected dbRollbackTransaction ( ) : mixed
Résultat mixed

dbStartTransaction() protected méthode

Alias for beginning a database transaction.
protected dbStartTransaction ( ) : mixed
Résultat mixed

fireEvent() protected méthode

Alias for firing events easily that implement this trait.
protected fireEvent ( string $name, array $args = [] ) : mixed
$name string
$args array
Résultat mixed

getAttribute() abstract public méthode

abstract public getAttribute ( $key )

getKey() abstract public méthode

abstract public getKey ( )

getKeyName() abstract public méthode

abstract public getKeyName ( )

isModel() protected méthode

Returns true/false if the specified model is a subclass of the Eloquent Model.
protected isModel ( mixed $model ) : boolean
$model mixed
Résultat boolean

isNumeric() protected méthode

Returns true/false if the number specified is numeric.
protected isNumeric ( integer | float | string $number ) : boolean
$number integer | float | string
Résultat boolean

isPositive() protected méthode

Returns true or false if the number inserted is positive.
protected isPositive ( integer | float | string $number ) : boolean
$number integer | float | string
Résultat boolean

isValidQuantity() public méthode

Returns true if the specified quantity is valid, throws InvalidQuantityException otherwise.
public isValidQuantity ( integer | float | string $quantity ) : boolean
$quantity integer | float | string
Résultat boolean

setAttribute() abstract public méthode

abstract public setAttribute ( $key, $value )