public static function removeDirectory($dir = '')
    {
        if ($dir == '' || $dir == NULL || $dir == '/')
            return false;

        $files = array_diff(scandir($dir), array('.','..')); 
        foreach ($files as $file)
            (is_dir("$dir/$file")) ? CiiFileDeleter::removeDirectory("$dir/$file") : unlink("$dir/$file"); 

        return rmdir($dir); 
    }