Changeset 104
- Timestamp:
- 09/24/07 21:03:07 (1 year ago)
- Files:
-
- trunk/XJConf/definitions/NamespaceDefinition.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/XJConf/definitions/NamespaceDefinition.php
r62 r104 1 1 <?php 2 /** 3 * Container for all tag definitions in one namespace 4 * 5 * @author Stephan Schmidt <stephan.schmidt@schlund.de> 6 * @author Frank Kleine <mikey@xjconf.net> 7 */ 2 8 XJConfLoader::load('definitions.TagDefinition'); 3 9 /** 4 10 * Container for all tag definitions in one namespace 5 11 * 6 * @author Stephan Schmidt <stephan.schmidt@schlund.de> 12 * @package XJConf 13 * @subpackage definitions 7 14 */ 8 15 class NamespaceDefinition … … 13 20 * @var array<String,TagDefinition> 14 21 */ 15 private $tagDefinitions = array(); 16 17 /** 18 * URI of this namespace 19 * 20 * @var string 21 */ 22 private $namespaceURI = null; 23 24 /** 25 * Constructor for a namespace definition 26 * 27 * @param string namespaceURI URI of the new namespace 28 */ 22 private $tagDefinitions = array(); 23 /** 24 * URI of this namespace 25 * 26 * @var string 27 */ 28 private $namespaceURI = null; 29 30 /** 31 * Constructor for a namespace definition 32 * 33 * @param string namespaceURI URI of the new namespace 34 */ 29 35 public function __construct($namespaceURI) 30 36 { 31 37 $this->namespaceURI = $namespaceURI; 32 38 } 33 34 /**35 * Add a new tag definition36 *37 * @param TagDefinition $tagDefinition38 */39 40 /** 41 * Add a new tag definition 42 * 43 * @param TagDefinition $tagDefinition 44 */ 39 45 public function addTagDefinition(TagDefinition $tagDefinition) 40 46 { … … 42 48 } 43 49 44 /**45 * Count the number of defined tags46 *47 * @return int number of defined tags48 */50 /** 51 * Count the number of defined tags 52 * 53 * @return int number of defined tags 54 */ 49 55 public function countTagDefinitions() 50 56 { 51 return count($this->tagDefinitions);57 return count($this->tagDefinitions); 52 58 } 53 59 54 /**55 * Check, whether a tag has been defined56 *57 * @param string $tagName name of the tag58 * @return boolean true, if the tag has been defined, false otherwise59 */60 /** 61 * Check, whether a tag has been defined 62 * 63 * @param string $tagName name of the tag 64 * @return boolean true, if the tag has been defined, false otherwise 65 */ 60 66 public function isDefined($tagName) 61 67 { 62 return isset($this->tagDefinitions[$tagName]);68 return isset($this->tagDefinitions[$tagName]); 63 69 } 64 70 65 /**66 * Get the definition of a tag67 *68 * @param tagName name of the tag69 * @return TagDefinition70 */71 /** 72 * Get the definition of a tag 73 * 74 * @param tagName name of the tag 75 * @return TagDefinition 76 */ 71 77 public function getDefinition($tagName) 72 78 { … … 85 91 public function getNamespaceURI() 86 92 { 87 return $this->namespaceURI;88 } 93 return $this->namespaceURI; 94 } 89 95 } 90 96 ?>
