private function parser($handler)
    {
        $parts = explode('://', $handler);
        if (count($parts) === 2) {
            $namespace = $parts[0];
            array_shift($parts);
        } else {
            $namespace = $this->app['upload.namespace'];
        }
        $prefix = rtrim($parts[0], '/') . '/';

        return [$namespace, $prefix];
    }
private function parser($handler)
    {
        $parts = explode('://', $handler);
        if (count($parts) === 2) {
            $namespace = $parts[0];
            array_shift($parts);
        } else {
            $namespace = $this->app['upload.namespace'];
        }
        $prefix = rtrim($parts[0], '/') . '/';

        return [$namespace, $prefix];
    }
private function parser ( $ handler ) { $ parts = explode ( '://' , $ handler ) ; if ( count ( $ parts ) === 2 ) { $ namespace = $ parts [ 0 ] ; array_shift ( $ parts ) ; } else { $ namespace = $ this -> app [ 'upload.namespace' ] ; } $ prefix = rtrim ( $ parts [ 0 ] , '/' ) . '/' ; return [ $ namespace , $ prefix ] ; }
Parse a string and determine the upload prefix and namespace.

@param string $handler

@return array
Parse a string and determine the upload prefix and namespace .