| Total Complexity | 4 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class ClassHelper { |
||
| 19 | |||
| 20 | |||
| 21 | /** |
||
| 22 | * @brief Given a class path, returns the class name even included its namespace. |
||
| 23 | * @param string $pathname The entire class path included its filename and extension. |
||
| 24 | * @return string The class name. |
||
| 25 | */ |
||
| 26 | public static function getClass($pathname) { |
||
| 28 | } |
||
| 29 | |||
| 30 | |||
| 31 | /** |
||
| 32 | * @brief Given a class within its namespace, it returns the class name pruned by its namespace. |
||
| 33 | * @param string $class The class included its namespace. |
||
| 34 | * @return string The class name. |
||
| 35 | */ |
||
| 36 | public static function getClassName($class) { |
||
| 37 | return substr(strrchr($class, '\\'), 1); |
||
| 38 | } |
||
| 39 | |||
| 40 | |||
| 41 | /** |
||
| 42 | * @brief Given a namespace, it returns the namespace itself pruned by its last part. |
||
| 43 | * @param string $namespace A namespace. |
||
| 44 | * @return string The namespace's root. |
||
| 45 | */ |
||
| 46 | public static function getClassRoot($namespace) { |
||
| 51 | } |
||
| 52 | |||
| 53 | } |