在module.config.php文件中,我为'password_has_type'设置了值.在控制器中我想访问它.这是我的module.config.php文件:
'auth' => array(
'password_hash_type' => 'sha512',
),
'di' => array(
'instance' => array(
'alias' => array(
'auth' => 'Auth\Controller\AuthController',
'auth_login_form' => 'Auth\Form\LoginForm',
),...
Run Code Online (Sandbox Code Playgroud)
在controller,我用过
use Auth\Module
Run Code Online (Sandbox Code Playgroud)
并在Action方法中我尝试获取访问值
echo Module::getOption('password_hash_type');
Run Code Online (Sandbox Code Playgroud)
但我无法获得任何价值?
那么请有人帮助我获得这个价值吗?