PHP 클래스 SimpleRoute, simpletest

Released under GPLv3 license; see LICENSE.
상속: extends BaseRoute
파일 보기 프로젝트 열기: simpletest/simpletest 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( SimpleUrl $url ) Sets the target URL.
createConnection ( string $method, integer $timeout ) : SimpleSocket Opens a socket to the route.
getUrl ( ) : SimpleUrl Resource name.

보호된 메소드들

메소드 설명
createSocket ( string $scheme, string $host, integer $port, integer $timeout ) : SimpleSocket/SimpleSecureSocket Factory for socket.
getHostLine ( ) : string Creates the host part of the request.
getRequestLine ( string $method ) : string Creates the first line which is the actual request.

메소드 상세

__construct() 공개 메소드

Sets the target URL.
public __construct ( SimpleUrl $url )
$url SimpleUrl URL as object.

createConnection() 공개 메소드

Opens a socket to the route.
public createConnection ( string $method, integer $timeout ) : SimpleSocket
$method string HTTP request method, usually GET.
$timeout integer Connection timeout.
리턴 SimpleSocket New socket.

createSocket() 보호된 메소드

Factory for socket.
protected createSocket ( string $scheme, string $host, integer $port, integer $timeout ) : SimpleSocket/SimpleSecureSocket
$scheme string Protocol to use.
$host string Hostname to connect to.
$port integer Remote port.
$timeout integer Connection timeout.
리턴 SimpleSocket/SimpleSecureSocket

getHostLine() 보호된 메소드

Creates the host part of the request.
protected getHostLine ( ) : string
리턴 string Host line content.

getRequestLine() 보호된 메소드

Creates the first line which is the actual request.
protected getRequestLine ( string $method ) : string
$method string HTTP request method, usually GET.
리턴 string Request line content.

getUrl() 공개 메소드

Resource name.
public getUrl ( ) : SimpleUrl
리턴 SimpleUrl Current url.