Skip to content

CollegiateLink

James Kurtz edited this page Nov 11, 2015 · 1 revision

CollegiateLink

The CollegiateLink class is the fundamental class you need to use this library. Whatever you're trying to do, will start with a CollegiateLink object. Typically, you'll only need one at any given time.

Class CollegiateLink

  • Class name: CollegiateLink
  • Namespace:

Properties

$_cookieFile

private mixed $_cookieFile
  • Visibility: private

$_baseUrl

private mixed $_baseUrl
  • Visibility: private

$curlCount

private mixed $curlCount
  • Visibility: private

Methods

__construct

mixed CollegiateLink::__construct(String $baseUrl, String $cookieFile)

Constructor. Creates the initial CollegiateLink class from which all connections can be made.

  • Visibility: public

Arguments

__destruct

mixed CollegiateLink::__destruct()
  • Visibility: public

getACurl

\aCurl CollegiateLink::getACurl(String $url)

getACurl. Returns a new aCurl object, with some standardized settings pre-set. Used extensively by other classes in the library.

  • Visibility: public

Arguments

  • $url String - <p>The Url of the request.</p>

getOrganization

\CollegiateLinkOrg CollegiateLink::getOrganization(String $orgReference)

getOrganization takes an org reference (which is "safac-office" in "https://drexel.collegiatelink.net/organization/safac-office"), and returns a CollegiateLinkOrg object.

  • Visibility: public

Arguments

  • $orgReference String - <p>The unambiguous url reference to the organization, on the CollegiateLink site.</p>

findOrganizations

array<mixed,\CollegiateLinkOrg> CollegiateLink::findOrganizations(String $searchTerm, integer $startPage, integer $endPage)

findOrganizations based on a given search term. This is the API wrapper for the organization search function.

CollegiateLink only returns a few results on each page, thus this function iterates through results pages to provide a more thorough collection. However, because those requests are expensive, this request stops at $endPage or the end of the list, whichever comes first.

Returns an array of CollegiateLinkOrg objects.

  • Visibility: public

Arguments

  • $searchTerm String - <p>The term to search for.</p>
  • $startPage integer - <p>The first page of results to include. Defaults to 1.</p>
  • $endPage integer - <p>The last page of results to include. Defaults to 20; will not fetch more pages than there are.</p>

getBaseUrl

String CollegiateLink::getBaseUrl()

Returns the baseUrl for the CollegiateLink instance, as it was provided in the constructor. Used extensively by other CollegiateLink classes.

  • Visibility: public

getCookieFile

String CollegiateLink::getCookieFile()

Returns the cookie file name, as provided in the constructor. Used extensively by other CollegiateLink classes.

  • Visibility: public

incrementCurlCount

integer CollegiateLink::incrementCurlCount()

Increments the count of the number of cUrl executions that have taken place. Used by other CollegiateLink classes.

  • Visibility: public

Clone this wiki locally