src/Pdf/TempFile.php
public function setContents($data)
	{
		$level = error_reporting(0);
		$result = file_put_contents($this->getPathname(), $data);
		error_reporting($level);

		if (false === $result)
		{
			$error = error_get_last();
			throw new RuntimeException($error['message']);
		}

		return $result;
	}
public function setContents($data)
	{
		$level = error_reporting(0);
		$result = file_put_contents($this->getPathname(), $data);
		error_reporting($level);

		if (false === $result)
		{
			$error = error_get_last();
			throw new RuntimeException($error['message']);
		}

		return $result;
	}
public function setContents ( $ data ) { $ level = error_reporting ( 0 ) ; $ result = file_put_contents ( $ this -> getPathname ( ) , $ data ) ; error_reporting ( $ level ) ; if ( false === $ result ) { $ error = error_get_last ( ) ; throw new RuntimeException ( $ error [ 'message' ] ) ; } return $ result ; }
Sets the contents of the temp file.

@param mixed $data Can be either a string, an array or a stream resource.

@return mixed This function returns the number of bytes that were
written to the file;

@throws RuntimeException
Sets the contents of the temp file .