University of Southern California

Public Member Functions

SOC_API1C Class Reference

Inheritance diagram for SOC_API1C:
SOC_Widget WSCORE2

List of all members.

Public Member Functions

 __construct ($conf)
 close ()
 _restParse ($restful_args)
 getSession ($session, $term)
 getCacheForTerm ($term)
 getBooklist ($section, $term)
 getBioUrl ($id)
 getDeptInfo ($abbreviation)
 getClasses ($dept, $term)
 getDepartments ($term)
 getTerms ()
 eventLoop ($get, $post, $session, $server, $file)
 contentType ()
 render ()
 help ()

Detailed Description

Definition at line 36 of file api1c.php.


Constructor & Destructor Documentation

SOC_API1C::__construct ( conf )

SOC_API1C - Constructor for Schedule of Classes API version 1 Phase 1

Parameters:
$conf- Configuration Object, required
Returns:
new SOC_API1C object

Reimplemented from WSCORE2.

Definition at line 43 of file api1c.php.

References SOC_Widget::SOC_Widget().


Member Function Documentation

SOC_API1C::_restParse ( restful_args )

_restParse - Parse the RESTful URI request.

Parameters:
$restful_args- The RESTful part of the URI request
Returns:
true if successful understood, false otherwise

Definition at line 74 of file api1c.php.

References SOC_Widget::error(), WSCORE2::errorCount(), and help().

Referenced by eventLoop().

SOC_API1C::close (  )

close - close the cache if needed.

Reimplemented from WSCORE2.

Definition at line 64 of file api1c.php.

SOC_API1C::contentType (  )

contentType - Return the content type for sending Header info

Returns:
content type as string

Definition at line 694 of file api1c.php.

SOC_API1C::eventLoop ( get,
post,
session,
server,
file 
)

eventLoop - process the request and update state

Parameters:
$get- pass in $_GET
$post- pass in $_POST
$session- pass in $_POST
$server- pass in $_SERVER
$file- pass $_FILE
Returns:
true if event processing successful, false otherwise.

Definition at line 564 of file api1c.php.

References _restParse(), SOC_Widget::error(), WSCORE2::errorCount(), SOC_Widget::errors(), getBioUrl(), getBooklist(), getClasses(), getDepartments(), getSession(), and getTerms().

SOC_API1C::getBioUrl ( id )

getBioUrl - Private method for getting the Bio link of a faculty member

Parameters:
$id- USC 7 digit employee ID used by SOAP service.
Returns:
url or false otherwise

Definition at line 328 of file api1c.php.

References SOC_Widget::error().

Referenced by eventLoop(), and getClasses().

SOC_API1C::getBooklist ( section,
term 
)

getBooklist - Get booklist URL from where bookstore dropped it off on www.usc.edu.

Parameters:
$section- section number for booklist, e.g. a five digit code
$term- term for booklist, e.g. 20093 would be Fall 2009
Returns:
url's content or false otherwise.

Definition at line 254 of file api1c.php.

References SOC_Widget::error().

Referenced by eventLoop().

SOC_API1C::getCacheForTerm ( term )

getCacheForTerm - list the top level entries for a given term.

Parameters:
$term
Returns:
false if not found, otherwise an array of URIs

Definition at line 226 of file api1c.php.

References SOC_Widget::error().

SOC_API1C::getClasses ( dept,
term 
)

getClasses - Populate the courses related information in the cache. JSON caches

Parameters:
$deptthe dept code
$termthe term to populate for
Returns:
true if successful, false otherwise.

Definition at line 373 of file api1c.php.

References SOC_Widget::error(), WSCORE2::errorCount(), and getBioUrl().

Referenced by eventLoop().

SOC_API1C::getDepartments ( term )

getDepartments -populate the department cache

Parameters:
$termthe term to populate for
Returns:
true if successful, false otherwise

Definition at line 500 of file api1c.php.

References SOC_Widget::error().

Referenced by eventLoop().

SOC_API1C::getSession ( session,
term 
)

getSession - get session info and set Cache

Parameters:
$sessionthe dept code, e.g. 001, 002, 003
$termthe term to populate for
Returns:
true if successful, false otherwise

Definition at line 193 of file api1c.php.

References SOC_Widget::error().

Referenced by eventLoop().

SOC_API1C::getTerms (  )

getTerms - Private method to populate the cache with term data

Returns:
true if successful, false otherwise

Definition at line 532 of file api1c.php.

References SOC_Widget::error().

Referenced by eventLoop().

SOC_API1C::help (  )

help - generate help display

Returns:
help HTML

Definition at line 717 of file api1c.php.

References WSCORE2::get().

Referenced by _restParse().

SOC_API1C::render (  )

render - display view based on current state.

Returns:
view from current state.

Definition at line 706 of file api1c.php.


The documentation for this class was generated from the following file: