Class Site

Description

The Site class provides basic data access and primitive functions for sites

Located in /Site.class (line 24)


	
			
Variable Summary
mixed $_id
mixed $_name
mixed $_url
Method Summary
Site Site (int $sid)
array all ()
void delete ()
boolean exists (string $sid)
object Site get (string $sname)
array getCategories ()
int getId ()
string getName ()
string getUrl ()
void newCategory (string $cname)
array notes ([mixed $filter = ""])
object Site spawn (string $sname, string $surl)
Variables
mixed $_id (line 27)
mixed $_name (line 28)
mixed $_url (line 29)
Methods
Constructor Site (line 38)

Constructor: creates a Site object given its ID

  • access: public
Site Site (int $sid)
  • int $sid: The site ID
all (line 93)

Returns an array of all sites

  • return: Array of Site objects
  • static:
  • access: public
array all ()
delete (line 109)

Delete this site and all its associated notes and categories

  • access: public
void delete ()
exists (line 166)

Check if a site exists given its ID

  • static:
  • access: public
boolean exists (string $sid)
  • string $sid: The site ID
get (line 75)

Returns a site given its name

  • return: The site found, or false if not found
  • static:
  • access: public
object Site get (string $sname)
  • string $sname: The site name
getCategories (line 213)

Get all categories from this site

  • return: Category
  • access: public
array getCategories ()
getId (line 178)

Return site ID

  • access: public
int getId ()
getName (line 189)

Return site name

  • access: public
string getName ()
getUrl (line 201)

Return site URL

  • access: public
string getUrl ()
newCategory (line 225)

Creates a new category under this site. If the category already exists, it will be returned without further action.

  • access: public
void newCategory (string $cname)
  • string $cname: The category name
notes (line 236)

Return today notes from this site

  • return: Array of Note
  • access: public
array notes ([mixed $filter = ""])
spawn (line 146)

Create a site given its name and URL, and return it.

If site already exists, it will be retuned with no further action.

  • static:
  • access: public
object Site spawn (string $sname, string $surl)
  • string $sname: The site name
  • string $surl: The site URL

Documentation generated on Sat, 18 Mar 2006 04:40:19 -0300 by phpDocumentor 1.3.0RC3