/** * @return static BCrypt Instance */ public static function instance() { if (isset(static::$cache['hash']) && is_object(static::$cache['hash'])) { return static::$cache['hash']; } return static::$cache['hash'] = BCrypt::make(); }
function __construct() { parent::__construct(); $this->user = new \DB\SQL\Mapper($this->db, 'users'); $this->audit = \Audit::instance(); $this->bcrypt = \BCrypt::instance(); }
private static function getInstance() { if (self::$instance == null) { include_once Wave_Config::get('wave')->path->vendors . 'phpass-1.3' . DS . 'PasswordHash.php'; self::$instance = new PasswordHash(12, false); } return self::$instance; }