protected function findNamespaceInController(&$controller)
    {
        if (strstr($controller, '\\')) {
            $namespace = explode('\\', $controller);
            $controller = end($namespace);
            $namespace = rtrim(join('\\', array_slice($namespace, 0, count($namespace) - 1)), '\\');
        } else {
            $namespace = isset($this->group['_namespace']) ? $this->group['namespace'] : null;
        }

        return $namespace;
    }
protected function findNamespaceInController(&$controller)
    {
        if (strstr($controller, '\\')) {
            $namespace = explode('\\', $controller);
            $controller = end($namespace);
            $namespace = rtrim(join('\\', array_slice($namespace, 0, count($namespace) - 1)), '\\');
        } else {
            $namespace = isset($this->group['_namespace']) ? $this->group['namespace'] : null;
        }

        return $namespace;
    }
protected function findNamespaceInController ( & $ controller ) { if ( strstr ( $ controller , '\\' ) ) { $ namespace = explode ( '\\' , $ controller ) ; $ controller = end ( $ namespace ) ; $ namespace = rtrim ( join ( '\\' , array_slice ( $ namespace , 0 , count ( $ namespace ) - 1 ) ) , '\\' ) ; } else { $ namespace = isset ( $ this -> group [ '_namespace' ] ) ? $ this -> group [ 'namespace' ] : null ; } return $ namespace ; }
find namespace in controller

@param string $controller
@return array|string
find namespace in controller