mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[feature/passwords] Add get_name() method to drivers
This will allow us to actually properly differentiate between the available drivers. PHPBB3-11610
This commit is contained in:
@@ -26,6 +26,9 @@ abstract class phpbb_crypto_driver_base implements phpbb_crypto_driver_interface
|
||||
/** @var phpbb_crypto_driver_helper */
|
||||
protected $helper;
|
||||
|
||||
/** @var driver name */
|
||||
protected $name;
|
||||
|
||||
/**
|
||||
* Constructor of crypto driver object
|
||||
*
|
||||
@@ -44,4 +47,22 @@ abstract class phpbb_crypto_driver_base implements phpbb_crypto_driver_interface
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function get_name()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set driver name
|
||||
*
|
||||
* @param string $name Driver name
|
||||
*/
|
||||
public function set_name($name)
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
}
|
||||
|
@@ -65,4 +65,11 @@ interface phpbb_crypto_driver_interface
|
||||
* @return string String containing the hash settings
|
||||
*/
|
||||
public function get_settings_only($hash, $full = false);
|
||||
|
||||
/**
|
||||
* Get the driver name
|
||||
*
|
||||
* @return string Driver name
|
||||
*/
|
||||
public function get_name();
|
||||
}
|
||||
|
Reference in New Issue
Block a user