Clear compiled files

@param array $themes
543297
protected function clearCompiled(array $themes)
    {
        foreach ($themes as $theme) {
            $this->warn('Clearing files for `' . $theme->getKey() . '`');
            $this->info('Clearing styles...');
            $this->clearCompiledFiles($this->styles->getResourcePath('compiled_*.css', $theme));

            $this->info('Clearing scripts...');
            $this->clearCompiledFiles($this->scripts->getResourcePath('compiled_*.js', $theme));

            $this->warn('Done!');
            $this->line('');
        }
    }
193457
protected function prepareThemesArrays($themes)
    {
        $siteThemes = $this->getThemes();
        foreach ($themes as $themeName) {
            if (isset($siteThemes[$themeName]) && $siteThemes[$themeName]->status == 1) {
                $this->addAvailableTheme($themeName, $siteThemes[$themeName]->info['name']);
            } elseif (isset($siteThemes[$themeName]) && $siteThemes[$themeName]->status == 0) {
                $this->addUninstalledTheme($themeName, $siteThemes[$themeName]->info['name']);
            } else {
                $this->addUnavailableTheme($themeName, $themeName);
            }
        }
    }
1097218
public function uninstall_cleanup() {
        global $DB;

        $DB->set_field('course', 'theme', '', array('theme'=>$this->name));
        $DB->set_field('course_categories', 'theme', '', array('theme'=>$this->name));
        $DB->set_field('user', 'theme', '', array('theme'=>$this->name));
        $DB->set_field('mnet_host', 'theme', '', array('theme'=>$this->name));

        if (get_config('core', 'thememobile') === $this->name) {
            unset_config('thememobile');
        }
        if (get_config('core', 'themetablet') === $this->name) {
            unset_config('themetablet');
        }
        if (get_config('core', 'themelegacy') === $this->name) {
            unset_config('themelegacy');
        }

        $themelist = get_config('core', 'themelist');
        if (!empty($themelist)) {
            $themes = explode(',', $themelist);
            $key = array_search($this->name, $themes);
            if ($key !== false) {
                unset($themes[$key]);
                set_config('themelist', implode(',', $themes));
            }
        }

        parent::uninstall_cleanup();
    }
707245
private function clearAllCaches()
    {
        $this->clearCache(self::CACHE_KEY_CSS);
        $this->clearCache(self::CACHE_KEY_SELECTOR);
        $this->clearCache(self::CACHE_KEY_XPATH);
        $this->clearCache(self::CACHE_KEY_CSS_DECLARATIONS_BLOCK);
        $this->clearCache(self::CACHE_KEY_COMBINED_STYLES);
    }
465774
public function deleteMulti(array $keys): void
    {
        if ($this->enabled === false) {
            return;
        }

        foreach ($keys as $index) {
            if ($key = $this->cacheIndex[$index] ?? null) {
                unset($this->cacheIndex[$index]);
            } else {
                $key = $index;
            }

            unset($this->cache[$key], $this->cacheExpiryTime[$key], $this->cacheAccessCount[$key]);
        }
    }
889396
public function clear()
    {
        $now = Carbon::now('UTC');

        ORM::for_table('files_downloads')
            ->where_lt('created_at', $now->subHours(SettingsFile::TOKENS_OLDER_THAN_HOURS))
            ->delete_many();
    }
1200102
public function clear()
    {
        if (!empty($this->files)) {
            $fs = new FileSystem();
            foreach ($this->files as $file) {
                $fs->remove($file);
            }
        }
    }
378686
public function clean(array $conditions): void
	{
		$this->cachedStorage->clean($conditions);
		$this->memoryStorage->clean($conditions);
	}
1095732
public function clear($properties = null): void
    {
        $this->properties = [];
        if ($properties === null) {
            $properties = [];
        }
        foreach ($properties as $key => $value) {
            $this->set($key, $value);
        }
    }
1084247
public function remove($themeIds) {
        $themeIds = (array)$themeIds;
        foreach($themeIds as $themeId) {
            $prefixedId = $this->getPrefixedThemeId($themeId);
            if(!$this->themeExists($prefixedId)) {
                continue;
            }
            $this->registry->unregisterTheme($prefixedId);
        }
        $this->logInfo('Item themes removed: ' . implode(',', $themeIds));
        return true;
    }
297171
protected function _clearBundles()
    {
        reset($this->_aBasketContents);
        foreach ($this->_aBasketContents as $sItemKey => $oBasketItem) {
            if ($oBasketItem->isBundle()) {
                $this->removeItem($sItemKey);
            }
        }
    }
1055999
protected function filterFiles($files)
    {
        if (! $files) {
            return;
        }

        foreach ($files as $key => $file) {
            if (is_array($file)) {
                $files[$key] = $this->filterFiles($files[$key]);
            }

            if (empty($files[$key])) {
                unset($files[$key]);
            }
        }

        return $files;
    }
1260403
public function setTheme(View $view, $themes)
    {
        $cacheKey = $this->getCacheKey($view);

        $this->themes[$cacheKey] = $themes;
    }
1249770
protected function prepare_ignored_themes( array $themes ) {
		$valid_slugs = array_values( wp_list_pluck(
			wp_get_themes(),
			'stylesheet'
		) );

		return array_values( array_intersect( $valid_slugs, $themes ) );
	}
528060
public static function clear()
    {
        $path = root().'resources/controllers/*.php';

        $files = File::glob($path);
        //
        foreach ($files as $file) {
            File::delete($file);
        }
        //
        return true;
    }
362379
protected function cleanup(array $files = array())
    {
        if (empty($files)) {
            return $this;
        }
        foreach ($files as $file) {
            if (!file_exists($file->name)) {
                continue;
            }
            unlink($file->name);
        }
        return $this;
    }
230865
protected static function clearCompiled()
    {
        $laravel = new Application(getcwd());

        if (file_exists($compiledPath = $laravel->getCachedCompilePath())) {
            @unlink($compiledPath);
        }

        if (file_exists($servicesPath = $laravel->getCachedServicesPath())) {
            @unlink($servicesPath);
        }
    }