[feature/extension-manager] Add docblocks to new methods in functions_module

PHPBB3-10323
This commit is contained in:
Nils Adermann 2011-11-18 14:43:38 +01:00
parent eab7374f3f
commit 81ac369808

View file

@ -884,7 +884,14 @@ class p_master
} }
} }
function get_short_name($basename) /**
* Retrieve shortened module basename for legacy basenames (with xcp_ prefix)
*
* @param string $basename A module basename
* @return string The basename if it starts with phpbb_ or the basename with
* the current p_class (e.g. acp_) stripped.
*/
protected function get_short_name($basename)
{ {
if (substr($basename, 0, 6) === 'phpbb_') if (substr($basename, 0, 6) === 'phpbb_')
{ {
@ -895,7 +902,13 @@ class p_master
return substr($basename, strlen($this->p_class) + 1); return substr($basename, strlen($this->p_class) + 1);
} }
function is_full_class($basename) /**
* Checks whether the given module basename is a correct class name
*
* @param string $basename A module basename
* @return bool True if the basename starts with phpbb_ or (x)cp_, false otherwise
*/
protected function is_full_class($basename)
{ {
return (substr($basename, 0, 6) === 'phpbb_' || substr($basename, 0, strlen($this->p_class) + 1) === $this->p_class . '_'); return (substr($basename, 0, 6) === 'phpbb_' || substr($basename, 0, strlen($this->p_class) + 1) === $this->p_class . '_');
} }