PHP 클래스 Mike42\Escpos\PrintConnectors\WindowsPrintConnector

Copyright (c) 2014-2015 Michael Billington , incorporating modifications by: - Roni Saha - Gergely Radics - Warren Doyle Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Connector for sending print jobs to - local ports on windows (COM1, LPT1, etc) - shared (SMB) printers from any platform (\\server\foo) For USB printers or other ports, the trick is to share the printer with a generic text driver, then access it locally.
상속: implements Mike42\Escpos\PrintConnectors\PrintConnector
파일 보기 프로젝트 열기: mike42/escpos-php

공개 메소드들

메소드 설명
__construct ( string $dest )
__destruct ( )
finalize ( )
read ( $len ) * (non-PHPdoc)
write ( $data )

보호된 메소드들

메소드 설명
finalizeLinux ( string $data ) Send job to printer -- platform-specific Linux code.
finalizeMac ( string $data ) Send job to printer -- platform-specific Mac code.
finalizeWin ( string $data ) Send data to printer -- platform-specific Windows code.
getCurrentPlatform ( ) : string
runCommand ( string $command, string &$outputStr, string &$errorStr, string $inputStr = null ) : number Run a command, pass it data, and retrieve its return value, standard output, and standard error.
runCopy ( string $from, string $to ) : boolean Copy a file. Separated out so that nothing is actually printed during test runs.
runWrite ( string $data, string $to ) : boolean Write data to a file. Separated out so that nothing is actually printed during test runs.

메소드 상세

__construct() 공개 메소드

public __construct ( string $dest )
$dest string

__destruct() 공개 메소드

public __destruct ( )

finalize() 공개 메소드

public finalize ( )

finalizeLinux() 보호된 메소드

Send job to printer -- platform-specific Linux code.
protected finalizeLinux ( string $data )
$data string Print data

finalizeMac() 보호된 메소드

Send job to printer -- platform-specific Mac code.
protected finalizeMac ( string $data )
$data string Print data

finalizeWin() 보호된 메소드

Send data to printer -- platform-specific Windows code.
protected finalizeWin ( string $data )
$data string

getCurrentPlatform() 보호된 메소드

protected getCurrentPlatform ( ) : string
리턴 string Current platform. Separated out for testing purposes.

read() 공개 메소드

* (non-PHPdoc)
또한 보기: PrintConnector::read()
public read ( $len )

runCommand() 보호된 메소드

Run a command, pass it data, and retrieve its return value, standard output, and standard error.
protected runCommand ( string $command, string &$outputStr, string &$errorStr, string $inputStr = null ) : number
$command string the command to run.
$outputStr string variable to fill with standard output.
$errorStr string variable to fill with standard error.
$inputStr string text to pass to the command's standard input (optional).
리턴 number

runCopy() 보호된 메소드

Copy a file. Separated out so that nothing is actually printed during test runs.
protected runCopy ( string $from, string $to ) : boolean
$from string Source file
$to string Destination file
리턴 boolean True if copy was successful, false otherwise

runWrite() 보호된 메소드

Write data to a file. Separated out so that nothing is actually printed during test runs.
protected runWrite ( string $data, string $to ) : boolean
$data string Data to print
$to string Destination file
리턴 boolean True if write was successful, false otherwise

write() 공개 메소드

public write ( $data )