TSDSection Class Reference
[Textbook Hierarchy Objects]

Represents a "Section" in the TSD textbook hierarchy. More...

Inheritance diagram for TSDSection:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 __construct ($id= '')
 Creates a new section object.
 getIdentifier ()
 Returns a string that identifies this section.
 getParent ()
 Retrieves the chapter object to which this section belongs.
 isValid ()
 Determines whether object is valid to go into database.
 listChildren ($constraints=array(), $limit=array(), $order=array(), $cnt=false)
 INSERT BRIEF DESCRIPTION HERE.
 listValidChildren ($constraints=array(), $limit=array(), $order=array(), $cnt=false)
 INSERT BRIEF DESCRIPTION HERE.

Static Public Member Functions

static getList ($constraints=array(), $limit=array(), $order=array(), $cnt=false)
 Returns a list of all sections, constrained by given criteria.


Detailed Description

Represents a "Section" in the TSD textbook hierarchy.

A section belongs to one and only one chapter and has no children of its own. Sections can be aligned to resources. Use the TSDText class to manage alignments.

Attributes:

Definition at line 17 of file TSDSection.php5.


Constructor & Destructor Documentation

TSDSection::__construct ( id = ''  ) 

Creates a new section object.

If an ID is provided, an attempt is made to populate the new object from the database. Otherwise, an empty TSDSection object is created.

Parameters:
$id [int]: ID of section, if auto-populate is desired

Definition at line 33 of file TSDSection.php5.


Member Function Documentation

TSDSection::getIdentifier (  ) 

Returns a string that identifies this section.

The identifier string is not meant to uniquely identify the section, but rather for use for display purposes. For sections, the identifier is simply the name of the section

Returns:
[string]: identifier for section

Reimplemented from TSDObject.

Definition at line 97 of file TSDSection.php5.

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

Returns a list of all sections, constrained by given criteria.

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]: additional constraints on the result set
$limit [array]: parameters for the LIMIT clause of the query
$order [array]: how to order the results
$cnt [boolean]: whether to return the number of results (if true) or the results themselves (if false, the default)
Returns:
[array]: array of TSDSEction, if any, or an integer specifying the number of results that would have been returned (if $cnt == true), or null if there was an error

Definition at line 69 of file TSDSection.php5.

TSDSection::getParent (  ) 

Retrieves the chapter object to which this section belongs.

Returns:
[TSDChapter]: parent chapter

Reimplemented from TSDObject.

Definition at line 79 of file TSDSection.php5.

References TSDObject::checkInit(), and isValid().

TSDSection::isValid (  ) 

Determines whether object is valid to go into database.

A TSDSection object is valid if its id is empty, or is an integer greater than zero; if its name is a non-empty string; and if its chapterId is a positive integer.

Returns:
[boolean]: whether object is valid

Reimplemented from TSDObject.

Definition at line 46 of file TSDSection.php5.

Referenced by getParent().

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

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$constraints [TYPE]: DESCRIPTION
$limit [TYPE]: DESCRIPTION
$order [TYPE]: DESCRIPTION
$cnt [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented from TSDObject.

Definition at line 112 of file TSDSection.php5.

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

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$constraints [TYPE]: DESCRIPTION
$limit [TYPE]: DESCRIPTION
$order [TYPE]: DESCRIPTION
$cnt [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented from TSDObject.

Definition at line 127 of file TSDSection.php5.


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

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