Set cache type and options for facade

@param string $type Type of cache, see {@link PHPPdf\Cache\CacheImpl} engine constants
@param array $options Options for cache

@return FacadeBuilder
430649
public function setCache($type, array $options = array())
    {
        $this->cacheType = $type;
        $this->cacheOptions = $options;

        return $this;
    }
575280
public function setOptions($options)
    {
        $this->options = [
            'config_dir' => null,
            'cache_dir' => null,
            'debug' => false,
            'cache_class' => 'WebspaceCollectionCache',
            'base_class' => 'WebspaceCollection',
        ];

        // overwrite the default values with the given options
        $this->options = array_merge($this->options, $options);
    }
62693
public function setType(string $type): AssetInterface
    {
        $path = $this->file->isExternal() ? $this->getUrl() : $this->getPath();

        $this->file->setType($path, $type);

        return $this;
    }
765034
public function setPossibleTypes(array $possibleTypes)
    {
        foreach ($possibleTypes as $type) {
            $this->possibleTypes[] = ApiDefinition::determineType(\trim($type), ['type' => \trim($type)]);
        }

        return $this;
    }
638969
protected function createType($type, $options = array())
	{
		$type = preg_replace('/[^A-Z0-9_\.-]/i', '', $type);

		$class = __NAMESPACE__ . '\\Type\\' . ucfirst($type);

		if (!class_exists($class))
		{
			throw new InvalidArgumentException("Type [$type] not supported.");
		}

		return new $class($options);
	}
833441
public static function setCacheType($type, $params = array())
  {
    if (self::$cm !== null) {
      throw new \Exception('Le type de cache ne peut pas être changé une fois le cache initialisé.');
    } else {
      if ($type == self::CACHE_MODE_MEMCACHE) {
        self::$cm = new MemcacheCache($params);
      } elseif ($type == self::CACHE_MODE_FILE) {
        self::$cm = new FileCache($params);
      } else {
        throw new \Exception('Le type de cache "' . $type . '" n\'est pas supporté.');
      }
    }
  }
79632
public function createNamed($type, array $options = [])
    {
        if ($type instanceof BlockInterface) {
            return $type;
        }

        $name = $this->getBlockName($options);

        return $this->factory->createNamed($name, $type, null, $options);
    }
1331143
public function setType($type)
    {
        if ($type != PdfConverter::URL && $type != PdfConverter::HTML) {
            throw new \Exception('Wrong type of file descriptor');
        }

        $this->type = $type;

        return $this;
    }
881169
public function useCache($type = self::CACHE_APC) {
    if ($type === self::CACHE_APC) {
      $this->setCache(new \Doctrine\Common\Cache\ApcCache);
    } else {
      $this->setCache(new \Doctrine\Common\Cache\ArrayCache);
    }
  }
98160
public function setType($type)
    {
        $this->type = $type;
        if ($this->type == "xml") {
            $this->formatter = new XMLPDOResultFormatter();
        } elseif ($this->type == "plain") {
            $this->formatter = new PlainPDOResultFormatter();
        } else {
            throw new BuildException("Formatter '" . $this->type . "' not implemented");
        }
    }
624432
protected function createTableBuilder(array $options = array(), $type = DataTableType::class)
    {
        return $this->get(DataTableFactory::class)->createBuilder($type, $options);
    }
884399
public function setCache(array $options, array $data) {
    array_multisort($options);
    $cache = GroupexFormCache::create([
      'field_gfc_created' => REQUEST_TIME,
      'field_gfc_options' => serialize($options),
      'field_gfc_response' => serialize($data)
    ]);
    $cache->setName('Cache item');
    $cache->save();
  }
563903
public function setConfigType(\VinceT\AdminConfigurationBundle\Entity\ConfigType $configType)
    {
        $this->configType = $configType;

        return $this;
    }
129797
protected function cacheKey($type, $params)
    {
        return sprintf('%s:%s:%s', $this->cachePrefix, $type, md5(http_build_query($params)));
    }
1303156
public function instance($type = null, $options = array())
	{
		$type = $type ?: $this->getType();

		$signature = serialize(array($type, $options));

		// If the given type has not been created before, we will create the instances
		// here and cache it so we can return it next time very quickly. If there is
		// already a type created by this name, we'll just return that instance.
		if (!isset($this->types[$signature]))
		{
			try
			{
				$document = $this->createType($type, $options);
			}
			catch (Exception $e)
			{
				$document = $this->createType('html', $options);
			}

			$this->types[$signature] = $document;
		}

		return $this->types[$signature];
	}
129876
public function setType($type)
    {
        $this->type = $type;

        switch ($this->type) {
            case 'pmd':
                if ($this->useFile === false) {
                    throw new BuildException('Formatter "' . $this->type . '" can only print the result to an file');
                }

                include_once 'phing/tasks/ext/phpcpd/formatter/PMDPHPCPDResultFormatter.php';

                $this->formatter = new PMDPHPCPDResultFormatter();
                break;

            case 'default':
                include_once 'phing/tasks/ext/phpcpd/formatter/DefaultPHPCPDResultFormatter.php';

                $this->formatter = new DefaultPHPCPDResultFormatter();
                break;

            default:
                throw new BuildException('Formatter "' . $this->type . '" not implemented');
        }
    }
1052983
public function setCacheType($type)
    {
        trigger_error('The '.__METHOD__.' method is deprecated and will be removed in a later version. Use setCache() instead.', E_USER_DEPRECATED);

        if (!defined('\LdapTools\Factory\CacheFactory::TYPE_'.strtoupper($type))) {
            throw new ConfigurationException(sprintf('Unknown cache type "%s".', $type));
        }
        $this->config['cacheType'] = $type;

        return $this;
    }