Spatie\Php7to5\Converter::saveAsPhp5 PHP Method

saveAsPhp5() public method

public saveAsPhp5 ( string $destination )
$destination string
    public function saveAsPhp5($destination)
    {
        file_put_contents($destination, $this->getPhp5Code());
    }

Usage Example

Exemplo n.º 1
0
 protected function convertFile(InputInterface $input)
 {
     $converter = new Converter($input->getArgument('source'));
     $destination = $input->getArgument('destination');
     if (file_exists($destination) && !$input->getOption('overwrite')) {
         throw InvalidParameter::destinationExist();
     }
     $converter->saveAsPhp5($destination);
 }
All Usage Examples Of Spatie\Php7to5\Converter::saveAsPhp5