public static function flush()
    {
        if (!self::$already_flushed && file_exists(self::getCacheDir())) {
            $paths = new RecursiveIteratorIterator(
                new RecursiveDirectoryIterator(self::getCacheDir(), FilesystemIterator::SKIP_DOTS),
                RecursiveIteratorIterator::CHILD_FIRST
            );
            foreach ($paths as $path) {
                $path->isDir() && !$path->isLink() ? rmdir($path->getPathname()) : unlink($path->getPathname());
            }
            // make sure we only flush once per request and not for each *.less
            self::$already_flushed = true;
        }
    }
public static function flush()
    {
        if (!self::$already_flushed && file_exists(self::getCacheDir())) {
            $paths = new RecursiveIteratorIterator(
                new RecursiveDirectoryIterator(self::getCacheDir(), FilesystemIterator::SKIP_DOTS),
                RecursiveIteratorIterator::CHILD_FIRST
            );
            foreach ($paths as $path) {
                $path->isDir() && !$path->isLink() ? rmdir($path->getPathname()) : unlink($path->getPathname());
            }
            // make sure we only flush once per request and not for each *.less
            self::$already_flushed = true;
        }
    }
public static function flush ( ) { if ( ! self :: $ already_flushed && file_exists ( self :: getCacheDir ( ) ) ) { $ paths = new RecursiveIteratorIterator ( new RecursiveDirectoryIterator ( self :: getCacheDir ( ) , FilesystemIterator :: SKIP_DOTS ) , RecursiveIteratorIterator :: CHILD_FIRST ) ; foreach ( $ paths as $ path ) { $ path -> isDir ( ) && ! $ path -> isLink ( ) ? rmdir ( $ path -> getPathname ( ) ) : unlink ( $ path -> getPathname ( ) ) ; } // make sure we only flush once per request and not for each *.less self :: $ already_flushed = true ; } }
Triggered early in the request when a flush is requested
Deletes the less.php cache folder and regenerates
Triggered early in the request when a flush is requested Deletes the less . php cache folder and regenerates