Sulu\Component\Hash\HasherInterface::hash PHP Method

hash() public method

Hashes the given object to a string.
public hash ( object $object ) : string
$object object
return string
    public function hash($object);

Usage Example

Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function checkHash(Request $request, $object, $identifier)
 {
     if (!$request->request->has($this->hashParameter) || $request->query->get('force', false) === 'true' || $request->request->get($this->hashParameter) == $this->hasher->hash($object)) {
         return true;
     }
     throw new InvalidHashException(get_class($object), $identifier);
 }
All Usage Examples Of Sulu\Component\Hash\HasherInterface::hash
HasherInterface