public static function toMethod($class, $asArray = false)
    {
        if (is_string($class)) {
            $class = self::split($class);
        }
        $method = array_pop($class);
        $classname = implode("\\", $class);
        return ($asArray) ? [$classname, $method] : "$classname::$method";
    }
public static function toMethod($class, $asArray = false)
    {
        if (is_string($class)) {
            $class = self::split($class);
        }
        $method = array_pop($class);
        $classname = implode("\\", $class);
        return ($asArray) ? [$classname, $method] : "$classname::$method";
    }
public static function toMethod ( $ class , $ asArray = false ) { if ( is_string ( $ class ) ) { $ class = self :: split ( $ class ) ; } $ method = array_pop ( $ class ) ; $ classname = implode ( "\\" , $ class ) ; return ( $ asArray ) ? [ $ classname , $ method ] : "$classname::$method" ; }
Convert a string into a namespaced method name

@param string|array<string> $class
@param boolean $asArray Whether or not to return as an array
@return string|array<string>
Convert a string into a namespaced method name