sThread
[ class tree: sThread ] [ index: sThread ] [ all elements ]

Class: sThread_FTP

Source Location: /sThread/sThread/Modules/ftp.php

Class Overview


FTP module Class


Author(s):

Copyright:

  • (c) 2015 OOPS.ORG

Variables

Constants

Methods



Class Details

[line 42]
FTP module Class

이 모듈은 로그인 인증까지만 테스트 한다. 데이터 커넥션 부분은 구현이 되어 있지 않다. 역시 ssl은 지원하지 않는다.

FTP 모듈에 사용할 수 있는 모듈 option은 다음과 같다.

  • user: 로그인 유저
  • pass: 로그인 암호

예제:

  1.    sThread::execute ('domain.com:21:ftp|user=>username,pass=password'2'udp');




Tags:

author:  JoungKyun.Kim <http://oops.org>
copyright:  (c) 2015 OOPS.ORG
link:  http://pear.oops.org/package/sThread
license:  BSD


[ Top ]


Class Variables

static $clearsession =

[line 54]

이 변수의 값이 true로 셋팅이 되면, clear_session method를 만들어 줘야 한다. 반대로 false 상태에서는 clear_session method가 존재하지 않아도 상관이 없다.



Tags:

access:  public

Type:   bool


[ Top ]

static $port =

[line 64]

FTP 모듈이 사용하는 기본 포트 번호



Tags:

access:  public

Type:   int


[ Top ]

static $protocol =

[line 59]

FTP 모듈이 사용하는 protocol



Tags:

access:  public

Type:   string


[ Top ]



Class Methods


constructor __construct [line 87]

sThread_FTP __construct( )

Class OOP 형식 초기화 메소드



Tags:

access:  public


[ Top ]

method call_status [line 159]

int|string call_status( int $status, [boolean $call = false])

현재의 status(integer) 또는 현재 status의 handler 이름을 반환한다.



Tags:

access:  public


Parameters:

int   $status   현재 status
boolean   $call   true로 설정했을 경우 현재 status의 handler 이름을 반환한다.

[ Top ]

method change_status [line 200]

void change_status( boolean &$sess, stdClass $key, int 2)

세션의 상태를 단계로 변경한다.



Tags:

access:  public


Parameters:

int   2   세션 키
boolean   &$sess   변경한 상태가 마지막 단계일 경우 false를 반환한다.
stdClass   $key   sThread 세션 변수 reference

[ Top ]

method check_buf_status [line 118]

int check_buf_status( int $status)

현재 상태가 event read 상태인지 event write 상태인지 를 판단한다.



Tags:

access:  public


Parameters:

int   $status   현재 status

[ Top ]

method clear_session [line 234]

void clear_session( int $key)

session에서 사용한 변수(self::$sess)의 값을 정리한다.

self::$clearsession == false 일 경우, clear_session method 는 존재하지 않아도 된다.




Tags:

access:  public


Parameters:

int   $key   세션 키

[ Top ]

method ftp_banner [line 282]

bool|null ftp_banner( stdClass &$sess, int $key, mixed $recv)

전송 받은 서버 배너 확인



Tags:

access:  public


Parameters:

stdClass   &$sess   세션 object
int   $key   세션 키
mixed   $recv   read callback에서 전송받은 누적 데이터

[ Top ]

method ftp_comfirmauth [line 378]

bool|null ftp_comfirmauth( stdClass &$sess, int $key, mixed $recv)

인증 결과 확인



Tags:

access:  public


Parameters:

stdClass   &$sess   세션 object
int   $key   세션 키
mixed   $recv   read callback에서 전송받은 누적 데이터

[ Top ]

method ftp_quit [line 412]

void ftp_quit( stdClass &$sess, int $key)

종료 명령 반환



Tags:

access:  public


Parameters:

stdClass   &$sess   세션 object
int   $key   세션 키

[ Top ]

method ftp_sendpass [line 364]

void ftp_sendpass( stdClass &$ses, int $key)

인증 정보 반환



Tags:

access:  public


Parameters:

stdClass   &$ses   세션 object
int   $key   세션 키

[ Top ]

method ftp_senduser [line 305]

void ftp_senduser( stdCLass &$sess, int $key)

전송할 유저 정보 반환



Tags:

access:  public


Parameters:

stdCLass   &$sess   세션 object
int   $key   세션 키

[ Top ]

method ftp_userbanner [line 331]

bool|null ftp_userbanner( stdClass &$sess, int $key, mixed $recv)

유저 정보 전송 결과 확인



Tags:

access:  public


Parameters:

stdClass   &$sess   세션 object
int   $key   세션 키
mixed   $recv   read callback에서 전송받은 누적 데이터

[ Top ]

method init [line 102]

void init( )

FTP 모듈을 초기화 한다.



Tags:

access:  public


[ Top ]

method set_last_status [line 218]

void set_last_status( stdClass &$sess, int $key)

세션의 상태를 마지막 단계로 변경한다.



Tags:

access:  public


Parameters:

stdClass   &$sess   sThread 세션 변수 reference
int   $key   세션 키

[ Top ]


Class Constants

FTP_BANNER =  1

[line 66]



Tags:

access:  public

[ Top ]

FTP_CLOSE =  7

[line 77]



Tags:

access:  public

[ Top ]

FTP_COMFIRMAUTH =  5

[line 70]



Tags:

access:  public

[ Top ]

FTP_QUIT =  6

[line 76]

에러가 발생했을 경우, FTP_QUIT 메소드가 정의가 되어있으면, parent::socketColose에 의해서 자동으로 FTP_QUIT이 호출이 된다.



Tags:

access:  public

[ Top ]

FTP_SENDPASS =  4

[line 69]



Tags:

access:  public

[ Top ]

FTP_SENDUSER =  2

[line 67]



Tags:

access:  public

[ Top ]

FTP_USERBANNER =  3

[line 68]



Tags:

access:  public

[ Top ]



Documentation generated on Tue, 14 May 2019 02:00:02 +0900 by phpDocumentor 1.4.4