public static deconstructIniKey ( string $key ) : array | ||
$key | string | INI section key as found in authentication.ini |
return | array | Array with named keys for controller, plugin and prefix |
public static function deconstructIniKey($key)
{
$res = ['plugin' => null, 'prefix' => null];
if (strpos($key, '.') !== false) {
list($res['plugin'], $key) = explode('.', $key);
}
if (strpos($key, '/') !== false) {
list($res['prefix'], $key) = explode('/', $key);
}
$res['controller'] = $key;
return $res;
}
/** * Deconstructs an ACL INI section key into a named array with ACL parts. * * @param string $key INI section key as found in acl.ini * @return array Array with named keys for controller, plugin and prefix */ protected function _deconstructIniKey($key) { return Utility::deconstructIniKey($key); }