function &createTag($name, $text, &$data, &$root)
{
$class = substr($name, 1);
if ($class) {
$tagletFile = $this->makeAbsolutePath($this->fixPath($this->_tagletPath) . substr($name, 1) . '.php', $this->_path);
if (is_file($tagletFile)) {
// load taglet for this tag
if (!class_exists($class)) {
require_once $tagletFile;
}
$tag =& new $class($text, $data, $root);
return $tag;
} else {
$tagFile = $this->makeAbsolutePath('classes/' . $class . 'Tag.php', $this->_path);
if (is_file($tagFile)) {
// load class for this tag
$class .= 'Tag';
if (!class_exists($class)) {
require_once $tagFile;
}
$tag =& new $class($text, $data, $root);
return $tag;
} else {
// create standard tag
$tag =& new tag($name, $text, $root);
return $tag;
}
}
}
}