/** * {@inheritdoc} */ public function setPath($pattern) { parent::setPath($pattern); if (preg_match('#^(.*/)?(\\w+)\\.(\\w+)$#i', $pattern, $matches)) { $this->setFilePath($matches[1]); $this->setFilename($matches[2]); $this->format($matches[3]); } else { $this->setFilePath($pattern); } return $this; }