/** * Get filename to export rendered declaration into. * * @return ClassElement */ public function getFilename() { $filename = $this->options['directory'] . FilesInterface::SEPARATOR; //Default namespace already included into path $namespace = trim(substr($this->file->getNamespace(), strlen($this->options['namespace']) + 1), '\\'); $filename .= str_replace('\\', FilesInterface::SEPARATOR, $namespace); return $filename . FilesInterface::SEPARATOR . $this->class->getName() . static::EXTENSION; }