Mike42\Escpos\PrintConnectors\FilePrintConnector::__construct PHP Method

__construct() public method

Construct new connector, given a filename
public __construct ( string $filename )
$filename string
    public function __construct($filename)
    {
        $this->fp = fopen($filename, "wb+");
        if ($this->fp === false) {
            throw new Exception("Cannot initialise FilePrintConnector.");
        }
    }