phpDocumentor KuoteObjects
Course
[ class tree: KuoteObjects ] [ index: KuoteObjects ] [ all elements ]

Class: KuoteObjects_Course

Source Location: /classes/KuoteObjects/Course.php

Class KuoteObjects_Course

Class Overview

Implements interfaces:

KuoteObjects Course

The KuoteObjects Course represents a 'course' in the Kuote system. It must implement the interfaces KuoteInterfaces_Object, and KuoteInterfaces_Course

Located in /classes/KuoteObjects/Course.php [line 17]



		
		
		
		

Methods

[ Top ]
Method Summary
static array   getCoursesHash()   Returns a hashed array of courses created by the given user.
KuoteObjects_Course   __construct()   Constructor instantiates $course as a DataObjects_Course object.
boolean   delete()   Removes the course from the datastore based on the course Id
boolean   get()   Loads the object from the data store by its unique identifier.
string   getDescription()   Returns the description of the course
integer   getId()   Returns the unique id of the course
boolean   getIsOpen()   Returns the state of openness of the course.
boolean   getIsPublic()   Returns the state of public availability of the course.
string   getTitle()   Returns the title of the course.
int   getUserId()   Returns the unique user id of the course's creator
boolean   insert()   Takes the currently set properties of the course and inserts them into the data store as a new course with its own unique id.
boolean   isOpen()   If true, the course may be used by other instructors.
boolean   isPublic()   If true, the course may be used by any student.
boolean   setDescription()   Sets the description of the course
boolean   setIsOpen()   Sets the state of openness of the course.
boolean   setIsPublic()   Sets the state of public availability of the course.
boolean   setTitle()   Sets the title of the course.
boolean   setUserId()   Sets the unique user id of the course's creator.
boolean   update()   Updates the datastore to reflect the currently set properties of the object.

[ Top ]
Methods
static method getCoursesHash  [line 213]

  static array getCoursesHash( KuoteObjects_User $user  )

Returns a hashed array of courses created by the given user.

Returns a hashed array of the format

  1. $courseId => $courseTitle

Parameters:
KuoteObjects_User   $user:  User for which to find created courses.

API Tags:
Return:  Hashed array of $courseId => $courseTitle OR boolean False if no courses are found.
Access:  public


[ Top ]
Constructor __construct  [line 28]

  KuoteObjects_Course __construct( )

Constructor instantiates $course as a DataObjects_Course object.


API Tags:
Access:  public

Information Tags:
Link:  http://pear.php.net/package/DB_DataObject/

[ Top ]
delete  [line 67]

  boolean delete( )

Removes the course from the datastore based on the course Id


API Tags:
Return:  True on success, false otherwise.
Access:  public


[ Top ]
get  [line 38]

  boolean get( integer $id  )

Loads the object from the data store by its unique identifier.

Parameters:
integer   $id:  Unique identifier of a course in the data store.

API Tags:
Return:  True on success, false otherwise.
Access:  public


[ Top ]
getDescription  [line 122]

  string getDescription( )

Returns the description of the course


API Tags:
Return:  Course description.
Access:  public


[ Top ]
getId  [line 76]

  integer getId( )

Returns the unique id of the course


API Tags:
Return:  The course's unique id
Access:  public


[ Top ]
getIsOpen  [line 187]

  boolean getIsOpen( )

Returns the state of openness of the course.

If the course Is Open, this means that any instructor can offer the course. Returns true if the course is open, false if it is not.


API Tags:
Return:  Is Open.
Access:  public


[ Top ]
getIsPublic  [line 163]

  boolean getIsPublic( )

Returns the state of public availability of the course.

If the course Is Public, this means that any user can enroll is the course. Returns true if the course is public, false if it is not.


API Tags:
Return:  Is Public.
Access:  public


[ Top ]
getTitle  [line 103]

  string getTitle( )

Returns the title of the course.


API Tags:
Return:  Course title.
Access:  public


[ Top ]
getUserId  [line 141]

  int getUserId( )

Returns the unique user id of the course's creator


API Tags:
Return:  User Id.
Access:  public


[ Top ]
insert  [line 48]

  boolean insert( )

Takes the currently set properties of the course and inserts them into the data store as a new course with its own unique id.


API Tags:
Return:  True on success, false otherwise.
Access:  public


[ Top ]
isOpen  [line 85]

  boolean isOpen( )

If true, the course may be used by other instructors.


API Tags:
Return:  True if open, false if not.
Access:  public


[ Top ]
isPublic  [line 94]

  boolean isPublic( )

If true, the course may be used by any student.


API Tags:
Return:  True if open, false if not.
Access:  public


[ Top ]
setDescription  [line 132]

  boolean setDescription( string $description  )

Sets the description of the course

Parameters:
string   $description:  Course Description

API Tags:
Return:  True on success, false otherwise.
Access:  public


[ Top ]
setIsOpen  [line 199]

  boolean setIsOpen( boolean $bool  )

Sets the state of openness of the course.

If the course Is Open, this means that any instructor can offer the course.

Parameters:
boolean   $bool:  Is Open.

API Tags:
Return:  True on success, false otherwise.
Access:  public


[ Top ]
setIsPublic  [line 175]

  boolean setIsPublic( boolean $bool  )

Sets the state of public availability of the course.

True means the course is public, false means it is not.

Parameters:
boolean   $bool:  Is Public.

API Tags:
Return:  True on success, false otherwise.
Access:  public


[ Top ]
setTitle  [line 113]

  boolean setTitle( string $title  )

Sets the title of the course.

Parameters:
string   $title:  Course Title

API Tags:
Return:  True on success, false otherwise.
Access:  public


[ Top ]
setUserId  [line 151]

  boolean setUserId( integer $id  )

Sets the unique user id of the course's creator.

Parameters:
integer   $id:  User Id of the Course Creator.

API Tags:
Return:  True on success, false otherwise.
Access:  public


[ Top ]
update  [line 58]

  boolean update( )

Updates the datastore to reflect the currently set properties of the object.

Updates by the current Id.


API Tags:
Return:  True on success, false otherwise.
Access:  public


[ Top ]

Documentation generated on Fri, 15 Dec 2006 11:17:14 -0500 by phpDocumentor 1.3.0