Browscap\Generator\BuildCustomFileGenerator::preBuild PHP Method

preBuild() protected method

runs before the build
protected preBuild ( array $fields = [], string | null $file = null, string $format = self::OUTPUT_FORMAT_PHP ) : BuildCustomFileGenerator
$fields array
$file string | null
$format string
return BuildCustomFileGenerator
    protected function preBuild($fields = [], $file = null, $format = self::OUTPUT_FORMAT_PHP)
    {
        parent::preBuild();
        $this->getLogger()->info('started creating the custom output file');
        if (null === $this->collectionCreator) {
            $this->setCollectionCreator(new CollectionCreator());
        }
        if (null === $this->writerCollection) {
            $factory = new Writer\Factory\CustomWriterFactory();
            $this->setWriterCollection($factory->createCollection($this->getLogger(), $this->buildFolder, $file, $fields, $format));
        }
        return $this;
    }
BuildCustomFileGenerator