protected function splitPath($path)
    {
        $lastSlashPos = strrpos($path, '/');
        if (false === $lastSlashPos) {
            return array('dirname' => '', 'basename' => $path);
        }

        return array('dirname'  => substr($path, 0, $lastSlashPos),
                     'basename' => substr($path, $lastSlashPos + 1)
               );
    }
protected function splitPath($path)
    {
        $lastSlashPos = strrpos($path, '/');
        if (false === $lastSlashPos) {
            return array('dirname' => '', 'basename' => $path);
        }

        return array('dirname'  => substr($path, 0, $lastSlashPos),
                     'basename' => substr($path, $lastSlashPos + 1)
               );
    }
protected function splitPath ( $ path ) { $ lastSlashPos = strrpos ( $ path , '/' ) ; if ( false === $ lastSlashPos ) { return array ( 'dirname' => '' , 'basename' => $ path ) ; } return array ( 'dirname' => substr ( $ path , 0 , $ lastSlashPos ) , 'basename' => substr ( $ path , $ lastSlashPos + 1 ) ) ; }
splits path into its dirname and the basename

@param   string  $path
@return  array
splits path into its dirname and the basename