1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-09 02:06:32 +02:00

[feature/avatars] Add static methods for handling driver names

PHPBB3-10018
This commit is contained in:
Marc Alexander
2012-11-25 16:04:59 +01:00
parent 6d061304af
commit 06639729ea
5 changed files with 38 additions and 12 deletions

View File

@@ -152,4 +152,30 @@ class phpbb_avatar_manager
return array_combine($keys, $values);
}
/**
* Clean driver names that are returned from template files
* Underscores are replaced with dots
*
* @param string $name Driver name
*
* @return string Cleaned driver name
*/
public static function clean_driver_name($name)
{
return str_replace('_', '.', $name);
}
/**
* Prepare driver names for use in template files
* Dots are replaced with underscores
*
* @param string $name Clean driver name
*
* @return string Prepared driver name
*/
public static function prepare_driver_name($name)
{
return str_replace('.', '_', $name);
}
}