Create an AssetCacher

@param string $path The path to cache assets into.
@return \MiniAsset\AssetCacher
173251
public function cacher($path = '')
    {
        if (!$path) {
            $path = sys_get_temp_dir() . DIRECTORY_SEPARATOR;
        }
        $cache = new AssetCacher($path, $this->config->theme());
        $cache->configTimestamp($this->config->modifiedTime());
        $cache->filterRegistry($this->filterRegistry());
        return $cache;
    }
654923
public function importedAsset($path, $parameters = array())
  {
    if ($this->useController) {
      $path = $this->router->generate(
        "_assetic_" . $this->res->getFormulaeName($path),
        $parameters
      );
    } else {
      $path = $this->assets->getAssetUrl(
        ltrim($path, "/")
      );
    }

    return $path;
  }
1034452
protected function path($path, $type)
    {
        if (Configure::read('debug') && !Configure::read('Assets.force')) {
            return $path;
        }

        $asset = new AssetsCreator($path, $type);
        $path = '/assets/' . $asset->create();

        //Appends the timestamp
        $stamp = Configure::read('Asset.timestamp');
        if ($stamp === 'force' || ($stamp === true && Configure::read('debug'))) {
            $path = sprintf('%s.%s?%s', $path, $type, filemtime($asset->path()));
        }

        return $path;
    }
488613
public function mkdir(string $path = ""): File {
		if (!empty($path)) {
			$dir = new File(Paths::appendPath($this->getUrl(), $path));
			$dir->mkdir();

			return $dir;
		} else {
			if (!$this->isDirectory() && !$this->isFile()) {
				$this->manager->createDir($this->getUrl());
			}

			return $this;
		}
	}
140422
public static function create($path)
    {
        $file = new static($path);

        if (! is_dir(dirname($path))) {
            mkdir(dirname($path), 0755, true);
        }

        if (! $file->exists()) {
            touch($path);
        }

        return $file;
    }
515445
public function asset_path($path)
	{
		if ($this->active['path'] === null)
		{
			throw new \ThemeException('You must set an active theme.');
		}

		if ($this->active['asset_base'])
		{
			return $this->active['asset_base'].$path;
		}
		else
		{
			return $this->active['path'].$path;
		}
	}
868040
public function createAssetUrl($module = null, $path = null)
    {
        if (is_null($module)) {
            $module = $this->module;
        }

        return sprintf('/%s/%s/%s', self::TEMPLATE_PARAM_MODULES_DIR, $module, self::TEMPLATE_PARAM_ASSETS_DIR) . $path;
    }
875965
public function setRelativeAssetsPath($path) {

	    $path = trim(str_replace(DIRECTORY_SEPARATOR, '/', $path), '/');

	    if($path) {
	        $path .= '/';
        }

		$this->relativeAssetsPath =  $path;
		return $this;

	}
373116
private function createFilePath($path)
    {
        $dir = dirname($path);
        return file_exists($dir) || FileHelper::createDirectory($dir, 0775, true);
    }
949276
public function get(string $path): SplFileInfo
    {
        $path = ltrim($path, '\\/');
        foreach ($this->assets as $asset) {
            if ($asset->getRelativePathname() === $path) {
                return $asset;
            }
        }
        throw new NotFoundHttpException(sprintf('Unknown asset: %s', $path));
    }
904443
function requireAsset($path)
    {
        $resolvedPath = $this->resolve($path);

        if (null === $resolvedPath) {
            throw new \UnexpectedValueException("Asset $path not found");
        }

        $asset = $this->environment->find($resolvedPath);

        if (!in_array($resolvedPath, $this->requiredPaths)) {
            $this->dependOn($resolvedPath);

            $processors = is_callable(array($asset, "getProcessors")) ? $asset->getProcessors() : array();

            $this->dependencyAssets[] = $this->evaluate($resolvedPath, array(
                "processors" => $processors
            ), $path);

            $this->requiredPaths[] = $resolvedPath;
        }

        return $this;
    }
1338774
public function getAssetPath(string $path)
    {
        if (!$this->urlHelper->isFullUrl($path)) {
            $path = $this->pathHelper->prefix($path);
        }

        return $this->urlHelper->getUrl(self::BASE_URL.$path);
    }
954689
public function setCachePath($path)
    {
        if (@file_exists($path) && is_dir($path)) {
            $this->cache_path = realpath($path).'/';
        } elseif (null!==$path_rp = $this->findRealPath($path)) {
            $this->cache_path = rtrim($path_rp, '/').'/';
        } else {
            throw new \InvalidArgumentException(
                sprintf('Cache path "%s" was not found or is not a directory!', $path)
            );
        }
        return $this;
    }
260653
public function makeDirectory($path)
    {
        if ('.' === $path || empty($path)) {
            $path = $this->localPath;
        } else {
            $path = "{$this->localPath}/{$path}";
        }

        return $this->filesystem->createDir($path);
    }
983495
public function file($path)
	{
		$absolutePath = Asset::isJavascript($path);
		if ($absolutePath) {
			return $this->javascript($absolutePath);
		}

		$absolutePath = Asset::isStylesheet($path);
		if ($absolutePath) {
			return $this->stylesheet($absolutePath);
		}

		$absolutePath = Asset::isFile($path);
		if ($absolutePath)
		{
			$this->clientCacheForFile($absolutePath);
			return new BinaryFileResponse($absolutePath, 200);
		}

		App::abort(404);
	}
542796
public function create($path = null)
    {
        $media = new $this->class();

        if ($path !== null) {
            $media->setFile(new \Symfony\Component\HttpFoundation\File\File($path));
        }

        return $media;
    }
17754
public static function getAssetUrl(string $path = '') : string
    {
        if (static::$assetUrl === null) {
            static::$assetUrl = FileHelper::getAssetUrl(static::className());
        }
        ;
        return static::$assetUrl . $path;
    }