Twig_Environment::setCache PHP Method

setCache() public method

public setCache ( $cache )
    public function setCache($cache)
    {
        $this->cache = $cache;

        if ($this->cache && !is_dir($this->cache)) {
            mkdir($this->cache, 0777, true);
        }
    }

Same methods

Twig_Environment::setCache ( string | false $cache )

Usage Example

Example #1
0
 function __construct()
 {
     parent::__construct('spdx2', AGENT_VERSION, AGENT_REV);
     $this->uploadDao = $this->container->get('dao.upload');
     $this->clearingDao = $this->container->get('dao.clearing');
     $this->dbManager = $this->container->get('db.manager');
     $this->renderer = $this->container->get('twig.environment');
     $this->renderer->setCache(false);
     $this->agentSpecifLongOptions[] = self::UPLOAD_ADDS . ':';
     $this->agentSpecifLongOptions[] = self::OUTPUT_FORMAT_KEY . ':';
 }
All Usage Examples Of Twig_Environment::setCache