code/object/config/factory.php
public function toFile($filename, ObjectConfigInterface $config)
    {
        $pathinfo = pathinfo($filename);

        if (!isset($pathinfo['extension']))
        {
            throw new \RuntimeException(sprintf(
                'Filename "%s" is missing an extension and cannot be auto-detected', $filename
            ));
        }

        $this->createFormat($pathinfo['extension'])->toFile($filename, $config);
        return $this;
    }
public function toFile($filename, ObjectConfigInterface $config)
    {
        $pathinfo = pathinfo($filename);

        if (!isset($pathinfo['extension']))
        {
            throw new \RuntimeException(sprintf(
                'Filename "%s" is missing an extension and cannot be auto-detected', $filename
            ));
        }

        $this->createFormat($pathinfo['extension'])->toFile($filename, $config);
        return $this;
    }
public function toFile ( $ filename , ObjectConfigInterface $ config ) { $ pathinfo = pathinfo ( $ filename ) ; if ( ! isset ( $ pathinfo [ 'extension' ] ) ) { throw new \ RuntimeException ( sprintf ( 'Filename "%s" is missing an extension and cannot be auto-detected' , $ filename ) ) ; } $ this -> createFormat ( $ pathinfo [ 'extension' ] ) -> toFile ( $ filename , $ config ) ; return $ this ; }
Writes a config to a file

@param string $filename
@param ObjectConfigInterface $config
@throws \RuntimeException
@return ObjectConfigFactory
Writes a config to a file