Files
lgp-admin-plus-api/laravel/security/hashing/hasher.php

39 lines
782 B
PHP
Raw Normal View History

<?php namespace Laravel\Security\Hashing;
2011-08-23 21:04:40 -05:00
class Hasher {
/**
* The hashing engine being used to perform the hashing.
*
* @var Hash\Engine
*/
protected $engine;
2011-08-23 21:04:40 -05:00
/**
* Create a new Hasher instance.
*
* @param Engine $engine
2011-08-23 21:04:40 -05:00
* @return void
*/
public function __construct(Engine $engine)
2011-08-23 21:04:40 -05:00
{
$this->engine = $engine
2011-08-23 21:04:40 -05:00
}
/**
* Magic Method for delegating method calls to the hashing engine.
*/
public function __call($method, $parameters)
{
return call_user_func_array(array($this->engine, $method), $parameters);
}
/**
* Magic Method for performing methods on the default hashing engine.
*/
public static function __callStatic($method, $parameters)
{
return call_user_func_array(array(static::make()->engine, $method), $parameters);
}
}