00001 <?php
00002
00017 class TSDStandardObjective extends TSDObject {
00018 public static $ATTRIBUTES = array(
00019 'id' => false,
00020 'description' => 'edit',
00021 'categoryId' => false
00022 );
00023
00030 public function __construct($id = '') {
00031 parent::__construct('TSDObjective', self::$ATTRIBUTES, 'id', $id);
00032 }
00033
00042 public function isValid() {
00043 return (
00044 ($this->id == '' || ctype_digit((string) $this->id)) &&
00045 (is_string($this->description) && $this->description != '') &&
00046 (ctype_digit((string) $this->categoryId) && $this->categoryId > 0)
00047 );
00048 }
00049
00065 public static function getList($constraints = array(), $limit = array(), $order = array(), $cnt = false) {
00066 return self::getListImpl('TSDStandardObjective', 'TSDObjective', array_keys(self::$ATTRIBUTES),
00067 $constraints, array(), $limit, $order, $cnt);
00068 }
00069
00076 public function getParent() {
00077 if(!$this->checkInit('Retrieve category')) return null;
00078
00079 $category = new TSDStandardCategory($this->categoryId);
00080 if(!$category->isValid())
00081 return null;
00082 else
00083 return $category;
00084 }
00085
00097 public function getIdentifier() {
00098 return $this->description;
00099 }
00100
00112 public function listChildren($constraints = array(), $limit = array(), $order = array(), $cnt = false) {
00113 return null;
00114 }
00115
00127 public function listValidChildren($constraints = array(), $limit = array(), $order = array(), $cnt = false) {
00128 return null;
00129 }
00130 }
00131
00132 ?>