Phpro\SoapClient\Util\Filesystem::putFileContents PHP Method

putFileContents() public method

public putFileContents ( $path, $content )
$path
$content
    public function putFileContents($path, $content)
    {
        file_put_contents($path, $content);
    }

Usage Example

Example #1
0
 /**
  * @param string $original
  * @param string $new
  * @param string $patchFile
  *
  * @return string
  */
 protected function createPatch($original, $new, $patchFile)
 {
     $process = ProcessBuilder::create(['diff', '-uN', $new, $original])->setWorkingDirectory($this->tmpFolder)->getProcess();
     $process->run();
     if (!$process->isSuccessful() && $process->getExitCode() !== 1) {
         throw new PatchException('Diff failed: ' . $process->getOutput());
     }
     $patchData = $process->getOutput();
     $this->filesystem->putFileContents($patchFile, $patchData);
     return $patchData;
 }
All Usage Examples Of Phpro\SoapClient\Util\Filesystem::putFileContents