PHP Interface Esensi\Model\Contracts\HashingModelInterface

Author: Daniel LaBarge ([email protected])
Afficher le fichier Open project: esensi/model Interface Usage Examples

Méthodes publiques

Méthode Description
addHashable ( string $attribute ) Add an attribute to the hashable array.
checkHash ( string $value, string $hash ) : boolean Return whether a plain value matches a hashed value.
getHashable ( ) : array Get the hashable attributes.
getHasher ( ) : Illuminate\Contracts\Hashing\Hasher Set the Hasher to use for hashing.
getHashing ( ) : boolean Returns whether or not the model will hash attributes before saving.
hash ( string $value ) : string Return a hashed string for the value.
hashAttributes ( ) Hash attributes that should be hashed.
isHashable ( string $attribute ) : boolean Returns whether the attribute is hashable.
isHashed ( string $attribute ) : boolean Returns whether the attribute is hashed.
mergeHashable ( array $attributes ) Merge an array of attributes with the hashable array.
removeHashable ( string $attribute ) Remove an attribute from the hashable array.
saveWithHashing ( ) : boolean Save with hashing even if hashing is disabled.
saveWithoutHashing ( ) : boolean Save without hashing even if hashing is enabled.
setHashable ( array $attributes ) Set the hashable attributes.
setHasher ( Illuminate\Contracts\Hashing\Hasher $hasher ) Set the Hasher to use for hashing.
setHashing ( $value ) Set whether or not the model will hash attributes before saving.

Method Details

addHashable() public méthode

Add an attribute to the hashable array.
public addHashable ( string $attribute )
$attribute string to purge

checkHash() public méthode

Return whether a plain value matches a hashed value.
public checkHash ( string $value, string $hash ) : boolean
$value string
$hash string to compare to
Résultat boolean

getHashable() public méthode

Get the hashable attributes.
public getHashable ( ) : array
Résultat array

getHasher() public méthode

Set the Hasher to use for hashing.
public getHasher ( ) : Illuminate\Contracts\Hashing\Hasher
Résultat Illuminate\Contracts\Hashing\Hasher

getHashing() public méthode

Returns whether or not the model will hash attributes before saving.
public getHashing ( ) : boolean
Résultat boolean

hash() public méthode

Return a hashed string for the value.
public hash ( string $value ) : string
$value string
Résultat string

hashAttributes() public méthode

Hash attributes that should be hashed.
public hashAttributes ( )

isHashable() public méthode

Returns whether the attribute is hashable.
public isHashable ( string $attribute ) : boolean
$attribute string name
Résultat boolean

isHashed() public méthode

Returns whether the attribute is hashed.
public isHashed ( string $attribute ) : boolean
$attribute string name
Résultat boolean

mergeHashable() public méthode

Merge an array of attributes with the hashable array.
public mergeHashable ( array $attributes )
$attributes array to purge

removeHashable() public méthode

Remove an attribute from the hashable array.
public removeHashable ( string $attribute )
$attribute string to purge

saveWithHashing() public méthode

Save with hashing even if hashing is disabled.
public saveWithHashing ( ) : boolean
Résultat boolean

saveWithoutHashing() public méthode

Save without hashing even if hashing is enabled.
public saveWithoutHashing ( ) : boolean
Résultat boolean

setHashable() public méthode

Set the hashable attributes.
public setHashable ( array $attributes )
$attributes array to hash

setHasher() public méthode

Set the Hasher to use for hashing.
public setHasher ( Illuminate\Contracts\Hashing\Hasher $hasher )
$hasher Illuminate\Contracts\Hashing\Hasher

setHashing() public méthode

Set whether or not the model will hash attributes before saving.
public setHashing ( $value )