@param array $originals

@return $this
423077
public function setOriginals(array $originals)
    {
        if (gettype($originals) == 'array') {
            $originals = new ArrayCollection($originals);
        }

        $this->originals = $originals;

        return $this;
    }
662927
public function setDefaults(array $defaults): self
    {
        foreach ((array)$defaults as $key => $value) {
            if (isset($this->defaults[$key])) {
                $this->defaults[$key] = $value;
            } else {
                throw new Exception('Invalid route default', Exception::HTTP_INTERNAL_SERVER_ERROR);
            }
        }

        return $this;
    }
895506
public function createLists(array $lists)
    {
        if (count($lists)) {
            foreach ($lists as $list) {
                $this->createList($list);
            }
        }

        return $this;
    }
338998
public function setList(array $ids)
    {
        $this->ids = $ids;
        $this->count = count($ids);
        return $this;
    }
170026
public function setExcludes(array $excludes = []): self
    {
        foreach ($excludes as $exclude) {
            $this->addExclude($exclude);
        }

        return $this;
    }
780616
public function setItems(array $items) : self {
      foreach ($items as $item) {
        if (!($item instanceof Token)) {
          throw new \InvalidArgumentException('Expect array of tokens. Token[]');
        }
      }

      $this->items = $items;
      $this->rewind();
      return $this;
    }
896345
public function setRules(array $rules)
    {
        $this->initialRules = $rules;

        $this->rules = [];

        $this->addRules($rules);

        return $this;
    }
271810
public function setFilters(array $filters)
    {
        if (empty($this->filters)) {
            $this->filters = $this->getDefaultFilters();
        }

        $this->filters = array_merge(
            $this->filters, $filters
        );

        return $this;
    }
1256519
public function setExtensions(array $extensions)
    {
        $this->extensions = [];
        foreach ($extensions as $extension) {
            $this->addExtension($extension);
        }

        return $this;
    }
52583
public function set(array $rules)
    {
        $this->items = array_merge(
            $this->items,
            $this->parseRules($rules)
        );

        return $this;
    }
213531
public function addDefaults(array $defaults): self
    {
        // TODO : faire un assert que $name est bien une string sinon lever une exception !!!!
        foreach ($defaults as $name => $default) {
            $this->defaults[$name] = $default;
        }

        return $this;
    }
613806
public function setSupportedLanguages(array $languages)
    {
        $this->languages = $languages;
        $this->fallbackLanguage = reset($languages);

        return $this;
    }
873644
public function originalChecksums(array $checksums = null) {
        if ($checksums === null) {
            return $this->originalChecksums;
        }

        $this->originalChecksums = $checksums;

        return $this;
    }
1058453
public function items(array $items)
    {
        foreach ($items as $uri => $title) {
            list($title, $uri, $liAttr) = $this->fixData($uri, $title);
            $this->item($title, $uri, $liAttr);
        }
        return $this;
    }
23944
public function setExpires($expires)
    {
        if (empty($expires)) {
            return $this;
        }

        $this->expires = strtotime($expires);

        return $this;
    }
408645
public function setFiles(array $files) {
        if(!$this->setModified('files', $files)->isModified()) {
            return $this;
        }
		$this->files = $files;
		return $this;
    }
1080799
public function setPunctuationReplacements($replacements)
        {
            if(!is_array($replacements)) {
                throw new \Thin\Exception(__METHOD__ . ': method expects a keyed array as argument.', 500);
            }
            foreach($replacements as $key => $value) {
                $this->punctuation[$key] = $value;
            }
            return $this;
        }