TSDObject Class Reference
[Core Objects]

Base class for all TSD objects. More...

Inheritance diagram for TSDObject:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 __call ($func, $args)
 INSERT BRIEF DESCRIPTION HERE.
 __construct ($table, $attrs, $unique, $id)
 INSERT BRIEF DESCRIPTION HERE.
 __get ($name)
 INSERT BRIEF DESCRIPTION HERE.
 __set ($name, $value)
 INSERT BRIEF DESCRIPTION HERE.
 commit ()
 INSERT BRIEF DESCRIPTION HERE.
 delete ()
 Completely deletes node.
 get ($name)
 INSERT BRIEF DESCRIPTION HERE.
 getAttributes ()
 Retrieves the names of the attributes of this object.
 getTable ()
 INSERT BRIEF DESCRIPTION HERE.
 getUnique ()
 INSERT BRIEF DESCRIPTION HERE.
 getValues ()
 Retrieves the values of the attributes of this object.
 isInDB ()
 INSERT BRIEF DESCRIPTION HERE.
 isLoaded ()
 INSERT BRIEF DESCRIPTION HERE.
 set ($name, $value)
 INSERT BRIEF DESCRIPTION HERE.
 toXML ()
 INSERT BRIEF DESCRIPTION HERE.

Protected Member Functions

 addAttribute ($name, $access=true)
 INSERT BRIEF DESCRIPTION HERE.
 checkInit ($errmsg)
 INSERT BRIEF DESCRIPTION HERE.
 getAttr ($field, $value)
 INSERT BRIEF DESCRIPTION HERE.
 populate ()
 INSERT BRIEF DESCRIPTION HERE.
 setAttr ($field, $value)
 INSERT BRIEF DESCRIPTION HERE.

Static Protected Member Functions

static criteriaToString ($arr, $attributes)
 Converts criteria array to a string.
static getCWISID ($urlOrId)
 INSERT BRIEF DESCRIPTION HERE.
static getListImpl ($class, $table, $attrs, $constraints, $addlConstraints, $limit, $order, $cnt, $ljoin= '')
 INSERT BRIEF DESCRIPTION HERE.
static limitToString ($limit)
 Converts limit array to a string.
static orderToString ($order, $attributes=null)
 Converts order array to string.


Detailed Description

Base class for all TSD objects.

For internal use only.

Definition at line 9 of file TSDObject.php5.


Constructor & Destructor Documentation

TSDObject::__construct ( table,
attrs,
unique,
id 
)

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$table [TYPE]: DESCRIPTION
$attrs [TYPE]: DESCRIPTION
$unique [TYPE]: DESCRIPTION
$id [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 29 of file TSDObject.php5.

References TSD::getDBI(), populate(), and setAttr().


Member Function Documentation

TSDObject::__call ( func,
args 
)

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$func [TYPE]: DESCRIPTION
$args [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 305 of file TSDObject.php5.

References TSD::can(), setAttr(), and SObject::setError().

TSDObject::__get ( name  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$name [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 279 of file TSDObject.php5.

TSDObject::__set ( name,
value 
)

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$name [TYPE]: DESCRIPTION
$value [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 292 of file TSDObject.php5.

TSDObject::addAttribute ( name,
access = true 
) [protected]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

Parameters:
$name [TYPE]: DESCRIPTION
$access [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 485 of file TSDObject.php5.

References setAttr().

TSDObject::checkInit ( errmsg  )  [protected]

TSDObject::commit (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented in TSDRelation, TSDStandard, and TSDText.

Definition at line 105 of file TSDObject.php5.

Referenced by TSDStandardGrade::addCategory(), TSDBook::addChapter(), and TSDStandardOrganization::addGrade().

static TSDObject::criteriaToString ( arr,
attributes 
) [static, protected]

Converts criteria array to a string.

For internal use only.

See the SWAT Model2 documentation on the wiki for more about the structure of this array

Parameters:
$arr [array]: criteria array
$attributes [array]: list of attributes that can be used in criteria array
Returns:
[string]: SQL string to be appended as a WHERE clause (does not include 'WHERE', though)

Definition at line 505 of file TSDObject.php5.

TSDObject::delete (  ) 

Completely deletes node.

Any child nodes of this node are deleted as well, along with all dev and live alignments. As such, the approve permission is required to delete a node.

Returns:
[boolean]: success or failure

Reimplemented in TSDBook, and TSDRelation.

Definition at line 159 of file TSDObject.php5.

References TSD::can(), checkInit(), and SObject::setError().

TSDObject::get ( name  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$name [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 242 of file TSDObject.php5.

References SObject::setError().

TSDObject::getAttr ( field,
value 
) [protected]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

Parameters:
$field [TYPE]: DESCRIPTION
$value [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 380 of file TSDObject.php5.

TSDObject::getAttributes (  ) 

Retrieves the names of the attributes of this object.

Returns:
[array]: regular array of strings, each string being the name of an attribute in this object

Definition at line 188 of file TSDObject.php5.

static TSDObject::getCWISID ( urlOrId  )  [static, protected]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

Parameters:
$urlOrId [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 718 of file TSDObject.php5.

References SDRService::getCserdIdForURL().

static TSDObject::getListImpl ( class,
table,
attrs,
constraints,
addlConstraints,
limit,
order,
cnt,
ljoin = '' 
) [static, protected]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

Parameters:
$class [TYPE]: DESCRIPTION
$table [TYPE]: DESCRIPTION
$attrs [TYPE]: DESCRIPTION
$constraints [TYPE]: DESCRIPTION
$addlConstraints [TYPE]: DESCRIPTION
$limit [TYPE]: DESCRIPTION
$order [TYPE]: DESCRIPTION
$cnt [TYPE]: DESCRIPTION
$ljoin [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 400 of file TSDObject.php5.

References TSD::getDBI(), and SObject::getError().

TSDObject::getTable (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 219 of file TSDObject.php5.

TSDObject::getUnique (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 208 of file TSDObject.php5.

Referenced by TSDLeaf::align(), TSDLeaf::approveAlignments(), TSDLeaf::cancelAlignments(), TSDLeaf::listAlignments(), and TSDLeaf::unalign().

TSDObject::getValues (  ) 

Retrieves the values of the attributes of this object.

Returns:
[array]: copy of the values of this object, indexed by attribute

Definition at line 197 of file TSDObject.php5.

TSDObject::isInDB (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 230 of file TSDObject.php5.

TSDObject::isLoaded (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 472 of file TSDObject.php5.

static TSDObject::limitToString ( limit  )  [static, protected]

Converts limit array to a string.

For internal use only.

If limit is an array, the one or two elements are treated as the one or two arguments to the SQL 'LIMIT' qualifier. If limit is a number, then that single number is treated as the sole argument to the SQL 'LIMIT' qualifier.

Parameters:
$limit [array]: limit array
Returns:
[string]: SQL for limit (including 'LIMIT')

Definition at line 629 of file TSDObject.php5.

Referenced by TSDRelation::getRelated().

static TSDObject::orderToString ( order,
attributes = null 
) [static, protected]

Converts order array to string.

For internal use only.

If $order is array, then each element indicates another sort column. If element is associative, the key is treated as the attribute and the value must be either 'ASC' or 'DESC'. If $order is a string, it is used as is.

Parameters:
$order [mixed]: order array or string
$attributes [array]: array of attributes that can be used in order array
Returns:
[string]: SQL string for order (including 'ORDER BY');

Definition at line 672 of file TSDObject.php5.

Referenced by TSDRelation::getRelated().

TSDObject::populate (  )  [protected]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented in TSDStandard, and TSDText.

Definition at line 71 of file TSDObject.php5.

References checkInit(), and SObject::setError().

Referenced by TSDRelation::__construct(), and __construct().

TSDObject::set ( name,
value 
)

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$name [TYPE]: DESCRIPTION
$value [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented in TSDRelation.

Definition at line 258 of file TSDObject.php5.

References TSD::can(), setAttr(), and SObject::setError().

TSDObject::setAttr ( field,
value 
) [protected]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

Parameters:
$field [TYPE]: DESCRIPTION
$value [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 367 of file TSDObject.php5.

Referenced by __call(), TSDText::__construct(), TSDStandard::__construct(), TSDRelation::__construct(), __construct(), addAttribute(), TSDRelation::approve(), TSDRelation::cancel(), TSDRelation::commit(), TSDRelation::delete(), TSDText::populate(), TSDStandard::populate(), TSDRelation::populate(), set(), TSDBook::setCoverImage(), and TSDBook::uploadCoverImage().

TSDObject::toXML (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 456 of file TSDObject.php5.


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

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