Changeset 841
- Timestamp:
- 08/15/07 15:56:46 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/xml/xsl/stubXSLCallback.php
r180 r841 31 31 */ 32 32 protected $callbacks = array(); 33 33 34 34 /** 35 35 * constructor … … 39 39 // intentionally empty 40 40 } 41 41 42 42 /** 43 43 * returns an instance of this class … … 53 53 return self::$instance; 54 54 } 55 55 56 56 /** 57 57 * clone is forbidden … … 61 61 throw new stubException('Cloning of ' . __CLASS__ . ' is not allowed.'); 62 62 } 63 63 64 64 /** 65 65 * register a new instance as callback … … 72 72 $this->callbacks[$name] = $callback; 73 73 } 74 74 75 75 /** 76 76 * removes callback with given name … … 84 84 } 85 85 } 86 86 87 87 /** 88 88 * clears all callbacks … … 92 92 $this->callbacks = array(); 93 93 } 94 94 95 95 /** 96 96 * check if a callback exists for the given name … … 103 103 return isset($this->callbacks[$name]); 104 104 } 105 105 106 106 /** 107 107 * returns the callback with the given name … … 118 118 return null; 119 119 } 120 120 121 121 /** 122 122 * invoke a method on a callback class … … 137 137 $name = array_shift($arguments); 138 138 if (self::$instance->hasCallback($name) == false) { 139 throw new stubXSLCallbackException('A callback swith the name ' . $name . ' does not exist.');139 throw new stubXSLCallbackException('A callback with the name ' . $name . ' does not exist.'); 140 140 } 141 141 … … 144 144 $class = $callback->getClass(); 145 145 if ($class->hasMethod($methodName) == false) { 146 throw new stubXSLCallbackException('Callback swith name ' . $name . ' does not have a method named ' . $methodName);146 throw new stubXSLCallbackException('Callback with name ' . $name . ' does not have a method named ' . $methodName); 147 147 } 148 148
