PHP Class Lndj\Lcrawl

Inheritance: use trait Lndj\Traits\Parser, use trait Lndj\Traits\BuildRequest
Datei anzeigen Open project: lndj/lcrawl Class Usage Examples

Public Methods

Method Description
__construct ( $base_uri, $user, $isCacheCookie = false, $loginParam = [] )
getAll ( ) : Array By Concurrent requests, to get all the data.
getCache ( ) : Doctrine\Common\Cache\Cache Return the cache manager.
getCachePrefix ( ) : type Get the cache cookie prefix, default is Lcrawl.
getCet ( ) : type | Object Get the CET data.
getCookie ( boolean $forceRefresh = false ) : string Get cookie from cache or login.
getExam ( ) : type Get the default term exam data by GET.
getGrade ( ) : type Get the grade data. This function is request all of grade.
getLoginUri ( ) : type Get the login uri.
getMainPageUri ( ) : string Get the main page uri, the default value is 'xs_main.aspx'
getReferer ( ) : type Get the Referer header.
getSchedule ( ) : Array Get the schedule data
getTimeOut ( ) : type Get the Timeout.
getUa ( ) : type Get the User-Agent value.
login ( ) Login, and get the cookie jar.
setCache ( Doctrine\Common\Cache\Cache $cache ) : Lcrawl Set the cache manager.
setCachePrefix ( type $prefix ) : type Set the cache cookie prefix, default is Lcrawl.
setLoginUri ( type $uri ) : type Set the Login uri. The default uri is default_ysdx.aspx.
setMainPageUri ( string $uri ) : type Set the main page uri, the default value is 'xs_main.aspx'
setReferer ( type $referer ) : type Set the Referer header.
setTimeOut ( type $time ) : type Set the Timeout.
setUa ( string $ua ) : Object Set the UserAgent.

Method Details

__construct() public method

public __construct ( $base_uri, $user, $isCacheCookie = false, $loginParam = [] )

getAll() public method

By Concurrent requests, to get all the data.
public getAll ( ) : Array
return Array

getCache() public method

Return the cache manager.
public getCache ( ) : Doctrine\Common\Cache\Cache
return Doctrine\Common\Cache\Cache

getCachePrefix() public method

Get the cache cookie prefix, default is Lcrawl.
public getCachePrefix ( ) : type
return type

getCet() public method

Get the CET data.
public getCet ( ) : type | Object
return type | Object

getCookie() public method

Get cookie from cache or login.
public getCookie ( boolean $forceRefresh = false ) : string
$forceRefresh boolean
return string

getExam() public method

If We need another term's data, use POST. //TODO
public getExam ( ) : type
return type

getGrade() public method

Get the grade data. This function is request all of grade.
public getGrade ( ) : type
return type

getLoginUri() public method

Get the login uri.
public getLoginUri ( ) : type
return type

getMainPageUri() public method

Get the main page uri, the default value is 'xs_main.aspx'
public getMainPageUri ( ) : string
return string

getReferer() public method

Get the Referer header.
public getReferer ( ) : type
return type

getSchedule() public method

Get the schedule data
public getSchedule ( ) : Array
return Array

getTimeOut() public method

Get the Timeout.
public getTimeOut ( ) : type
return type

getUa() public method

Get the User-Agent value.
public getUa ( ) : type
return type

login() public method

Login, and get the cookie jar.
public login ( )

setCache() public method

Set the cache manager.
public setCache ( Doctrine\Common\Cache\Cache $cache ) : Lcrawl
$cache Doctrine\Common\Cache\Cache
return Lcrawl

setCachePrefix() public method

Set the cache cookie prefix, default is Lcrawl.
public setCachePrefix ( type $prefix ) : type
$prefix type
return type

setLoginUri() public method

Set the Login uri. The default uri is default_ysdx.aspx.
public setLoginUri ( type $uri ) : type
$uri type
return type

setMainPageUri() public method

Set the main page uri, the default value is 'xs_main.aspx'
public setMainPageUri ( string $uri ) : type
$uri string
return type

setReferer() public method

Set the Referer header.
public setReferer ( type $referer ) : type
$referer type
return type

setTimeOut() public method

Set the Timeout.
public setTimeOut ( type $time ) : type
$time type
return type

setUa() public method

Set the UserAgent.
public setUa ( string $ua ) : Object
$ua string
return Object $this