diff options
author | xue <> | 2006-11-25 20:51:43 +0000 |
---|---|---|
committer | xue <> | 2006-11-25 20:51:43 +0000 |
commit | cb0aeb81d77d7170196f1b667978f56c6018100b (patch) | |
tree | 53deb6628356454d7e4348641135c84c1a909292 /framework/Web/UI/WebControls/THead.php | |
parent | af340f68ef716b9a3c021a8cabc40068068bf3bf (diff) |
merge from 3.0 branch till 1508.
Diffstat (limited to 'framework/Web/UI/WebControls/THead.php')
-rw-r--r-- | framework/Web/UI/WebControls/THead.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/framework/Web/UI/WebControls/THead.php b/framework/Web/UI/WebControls/THead.php index 93858da0..746d33ac 100644 --- a/framework/Web/UI/WebControls/THead.php +++ b/framework/Web/UI/WebControls/THead.php @@ -342,6 +342,36 @@ class TMetaTagCollection extends TList else
throw new TInvalidDataTypeException('metatagcollection_metatag_invalid');
}
+
+ /**
+ * Finds the lowest cardinal index of the meta tag whose id is the one being looked for.
+ * @param string the ID of the meta tag to be looked for
+ * @return integer the index of the meta tag found, -1 if not found.
+ */
+ public function findIndexByID($id)
+ {
+ $index=0;
+ foreach($this as $item)
+ {
+ if($item->getID()===$id)
+ return $index;
+ $index++;
+ }
+ return -1;
+ }
+
+ /**
+ * Finds the item whose value is the one being looked for.
+ * @param string the id of the meta tag to be looked for
+ * @return TMetaTag the meta tag found, null if not found.
+ */
+ public function findMetaTagByID($id)
+ {
+ if(($index=$this->findIndexByID($id))>=0)
+ return $this->itemAt($index);
+ else
+ return null;
+ }
}
?>
\ No newline at end of file |