Class UNL_UCBCN
The backend system object for the UNL UCBCN calendar system.
This object is the master object through which most calendar system interactions take place.
Located in /UNL/UCBCN.php (line 44)
| Class | Description |
|---|---|
| UNL_UCBCN_EventInstance | Generic object to hold a single event, and a single event date time. |
Cache object for output caching
input filters
output filters
Default calendar to use throughout the system.
A string containing connection details in the format
dbtype://user:pass@www.example.com:port/database
The template chosen to display in, defaults to default.
The filesystem path to the templates.
adds an input filter to this controller, the filter will be called whenever input is processed
- UNL_UCBCN_Filter $filter: a filter object used for filtering input
adds an output filter to this controller, the filter will be called whenever output is sent
- UNL_UCBCN_Filter $filter: a filter object used for filtering input
- $array
- $return
- $object
- $return
The heart of the template/display portions of this system.
A simple function which renders the given content using a savant formatted template based on the type of the object. IE: strings and ints get echoed objects use a corresponding savant template, arrays get rendered one by one
For caching support the object being outputted must implement three methods: getCacheKey() Return a unique string for the object/output. preRun(bool $cache_hit) Function which will be called before run (implement cache hit recording here and header() output) run() This function must populate the object and get it prepped for output.
- mixed $content: The content to send out.
- bool $return: Whether to output or return the content.
- $mixed
This function allows extended classes etc to get a DB DataObject for the event table they need access to.
- string $table: The name of the table in the database to receive a DataObject for.
This function takes in a class name and returns the correct template for the object.
- string $cname: the name of the class to get the template for
Gets or sets the output template for a given class.
- string $cname: Name of the class to set/get template for.
- string $templatename: Name of the template to use.
Prepares an object for output, and displays it with a corresponding template.
This function is an output controller, which takes public member variables from an object and populates a Savant template with equivalent member variables.
- mixed $content: Object with content to send out.
- $object
- $return
- UNL_UCBCN_CachingService $cache
Constructor for the UCBCN object, initializes member variables and sets up connection details for the database.
- array $options: Associative array of options to set for the class.
- UNL_UCBCN_EventInstance::__construct() : constructor
Adds an event to a calendar.
- UNL_UCBCN_Calendar $calendar: UNL_UCBCN_Calendar object.
- UNL_UCBCN_Event $event: The event to add to the calendar.
- string $status: [pending|posted|archived]
- UNL_UCBCN_User $user: User adding this event to a calendar.
- string $source: Where is this coming from?
This function changes the status for events in the past to 'archived.'
- UNL_UCBCN_Calendar $cal: Calendar to archive events for.
Checks whether a calendar has an event or not.
- UNL_UCBCN_Calendar $calendar: Calendar to check
- UNL_UCBCN_Event $event: Event to check if exists on the calendar.
Cleans the cache.
- mixed $o: Pass a cached object to clean it's cache, or a string id.
- $object
This function creates a calendar account.
- array $values: assoc array of field values for the account.
This function creates a calendar for an account.
- array $values: assoc array of field values for the calendar.
creates a new user record and returns it.
- UNL_UCBCN_Account $account: The account to add this user under.
- string $uid: Unique id of the user to create
- string $uidcreated: UID of the user who created this user.
This function is a general insert function, given the table name and an assoc array of values, it will return the inserted record.
- string $table: Name of the table
- array $values: assoc array of values to insert.
Returns an absolute URL using Net_URL
- string $url: All/part of a url
Gets the account record(s) for the user
- UNL_UCBCN_User $user: User to get account for.
Gets the calendar(s) for the given account that the given user has permission to. Optionally the user can be redirected on creation of a new calendar.
- UNL_UCBCN_User $user: User to get the calendar for
- UNL_UCBCN_Account $account: Account to get calendar for.
- bool $return_false: If true, will return false if no account exists, if false it invokes createCalendar.
- string $redirecturl: A url to redirect on creation of a new record. If set the user will be redirected, otherwise the account will be returned.
Gets an MDB2 connection object and returns it.
This function gets the count of events for the given status.
- UNL_UCBCN_Calendar $calendar: Calendar to check.
- string $status: [pending|posted|archived]
Returns the URL for the calendar system.
- UNL_UCBCN_EventInstance::getURL() : This function returns the URL for this event instance.
This function returns a object for the user with the given uid.
If a record does not exist, one is inserted then returned.
- string $uid: The unique user identifier to get object for (username).
This function adds the given permission for the user.
- string $uid: Username to add permission for.
- int $calendar_id: ID of the calendar to add permission for.
- int $permission_id: Permission id you wish to add for the person.
Redirects to the given full or partial URL.
will turn the given url into an absolute url using the above getURL() function. This function does not return.
- string $url: Full/partial url to redirect to
- bool $keepProtocol: Keep the https protocol or to force HTTP?
This function sets parameters for this class.
- array $options: an associative array of options to set.
This function initializes the information used by the database connections.
Simple function which displays the error to the end user.
- string $description: Description of the error.
This function determines if a user can edit the details of a specific event.
Permission relies on a couple requirements: User has 'Event Edit' rights over the calendar the event was originally created under, OR the event was 'recommended for the default calendar', and this user has permission over the default calendar.
- UNL_UCBCN_User $user: User to check
- UNL_UCBCN_Event $event: Event to check
Checks if a user has a given permission over the account.
- UNL_UCBCN_User $user: User to check.
- string $permission_name: The permission to check for.
- UNL_UCBCN_Calendar $calendar: Calendar to check permissions on.
Documentation generated on Wed, 12 Aug 2009 13:00:43 -0500 by phpDocumentor 1.4.2




