TSDStandardOrganization Class Reference
[Standards Hierarchy Objects]

Represents "Organization" in the TSD standard hierarchy. More...

Inheritance diagram for TSDStandardOrganization:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 __construct ($id= '')
 Constructs new organization object.
 addGrade ($name)
 Creates a new TSDStandardGrade object that belongs to this organization.
 deleteGradeByName ($name)
 Removes all grade bands that have the given name.
 getIdentifier ()
 Returns string meant to be used when displaying the organization.
 isValid ()
 Returns whether organization object is valid to be in the database.
 listChildren ($constraints=array(), $limit=array(), $order=array(), $cnt=false)
 Retreives list of child (TSDStandardGrade) objects.
 listValidChildren ($constraints=array(), $limit=array(), $order=array(), $cnt=false)
 Retreives list of child (TSDStandardGrade) objects that have a full hierarchy beneath them.

Static Public Member Functions

static getList ($constraints=array(), $limit=array(), $order=array(), $cnt=false)
 Retrieves list of TSDStandardOrganization objects according to constraints specified.


Detailed Description

Represents "Organization" in the TSD standard hierarchy.

An organization provides a set of standards, usually for a particular state. An organization object contains zero or more grade bands, which themselves contain categories and further still, those categories contain objectives.

Attributes:


Constructor & Destructor Documentation

TSDStandardOrganization::__construct ( id = ''  ) 

Constructs new organization object.

$param $id [int]: ID of existing organization if this object is to be populated from the database


Member Function Documentation

TSDStandardOrganization::addGrade ( name  ) 

Creates a new TSDStandardGrade object that belongs to this organization.

You must have the 'edit' permission to be able to create new grade band objects

Parameters:
$name [string]: name of new grade band
Returns:
[TSDStandardGrade]: new TSDStandardGrade object, or null if there was an error

TSDStandardOrganization::deleteGradeByName ( name  ) 

Removes all grade bands that have the given name.

You must have the 'edit' permission to delete grade bands.

Parameters:
$name [string]: name of grade band(s) to delete
Returns:
[boolean]: success or failure

TSDStandardOrganization::getIdentifier (  ) 

Returns string meant to be used when displaying the organization.

This string is not guaranteed to be unique, but is considered to be a good enough display name. Currently, it is simply the value of the 'name' field.

Returns:
[string]: display string

static TSDStandardOrganization::getList ( constraints = array(),
limit = array(),
order = array(),
cnt = false 
) [static]

Retrieves list of TSDStandardOrganization objects according to constraints specified.

See Guide to Database Constraints for more about how to constraint the resultset. You can also request that the number of results be returned, rather than the results themselves.

Parameters:
$constraints [array]: resultset constraints
$limit [array]: limit the number of results
$order [array]: how the results are ordered
$cnt [boolean]: if true, just returns a count of how many objects would be returned, otherwise, actually returns array of objects
Returns:
[array]: array of TSDStandardOrganization objects, or an integer if $cnt is true, or null if there was an error

TSDStandardOrganization::isValid (  ) 

Returns whether organization object is valid to be in the database.

An organization is considered valid if it either has no ID (because it has not been created), or its id is a positive integer (not zero) and the name must be a non-empty string. The remaining fields (url, state, address and description) must either be strings, or empty/null.

Returns:
[boolean]: whether organization object is valid

TSDStandardOrganization::listChildren ( constraints = array(),
limit = array(),
order = array(),
cnt = false 
)

Retreives list of child (TSDStandardGrade) objects.

See Guide to Database Constraints for more about how to constraint the resultset. You can also request that the number of results be returned, rather than the results themselves.

Parameters:
$constraints [array]: constraint resultset
$limit [array]: limit the number of results returned
$order [array]: how the results are ordered
$cnt [boolean]: if true, return the number of result objects that would be returned; if false, return the objects in an array
Returns:
[array]: array of TSDStandardGrade objects that belong to this organization, or an integer with the number of objects that would be returned (if $cnt is true) or null if there was an error

TSDStandardOrganization::listValidChildren ( constraints = array(),
limit = array(),
order = array(),
cnt = false 
)

Retreives list of child (TSDStandardGrade) objects that have a full hierarchy beneath them.

See Guide to Database Constraints for more about how to constraint the resultset. You can also request that the number of results be returned, rather than the results themselves. Valid children are those subtrees (grades) that have children that are themselves valid. For a subtree to be completely valid, every leaf node must be an Objective. That is, there cannot be, say, Categories that have no Objectives.

Parameters:
$constraints [array]: constraint resultset
$limit [array]: limit the number of results returned
$order [array]: how the results are ordered
$cnt [boolean]: if true, return the number of result objects that would be returned; if false, return the objects in an array
Returns:
[array]: array of TSDStandardGrade objects that belong to this organization, or an integer with the number of objects that would be returned (if $cnt is true) or null if there was an error


The documentation for this class was generated from the following file:

Generated on Wed Nov 24 02:05:01 2010 for Common by  doxygen 1.5.6