Admin_SettingsController::delete PHP Метод

delete() публичный Метод

delete all thumbnails which are using this config
public delete ( $dir, $thumbnail, &$matches = [] )
        function delete($dir, $thumbnail, &$matches = [])
        {
            $dirs = glob($dir . '/*', GLOB_ONLYDIR);
            foreach ($dirs as $dir) {
                if (preg_match('@/thumb__' . $thumbnail . '$@', $dir) || preg_match('@/thumb__' . $thumbnail . '_auto@', $dir)) {
                    recursiveDelete($dir);
                }
                delete($dir, $thumbnail, $matches);
            }
            return $matches;
        }