-
Notifications
You must be signed in to change notification settings - Fork 0
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:
private mixed $_cookieFile
- Visibility: private
private mixed $_baseUrl
- Visibility: private
private mixed $curlCount
- Visibility: private
mixed CollegiateLink::__construct(String $baseUrl, String $cookieFile)
Constructor. Creates the initial CollegiateLink class from which all connections can be made.
- Visibility: public
- $baseUrl String - <p>The base url of the school's collegiatelink instance. Probably "<a href="https://school.collegiatelink.net/">https://school.collegiatelink.net/</a>" The Trailing slash is required.</p>
- $cookieFile String - <p>The file name of the file to use for cookies.</p>
mixed CollegiateLink::__destruct()
- Visibility: public
\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
- $url String - <p>The Url of the request.</p>
\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
- $orgReference String - <p>The unambiguous url reference to the organization, on the CollegiateLink site.</p>
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
- $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>
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
String CollegiateLink::getCookieFile()
Returns the cookie file name, as provided in the constructor. Used extensively by other CollegiateLink classes.
- Visibility: public
integer CollegiateLink::incrementCurlCount()
Increments the count of the number of cUrl executions that have taken place. Used by other CollegiateLink classes.
- Visibility: public