public function clearTag($Tag, $Property = '', $Value = '')
{
$Tag = strtolower($Tag);
if (is_array($Property)) {
$Query = array_change_key_case($Property);
} elseif ($Property) {
$Query = array(strtolower($Property) => $Value);
} else {
$Query = false;
}
foreach ($this->_Tags as $Index => $Collection) {
$TagName = $Collection[self::TAG_KEY];
if ($TagName == $Tag) {
// If no property is specified and the tag is found, remove it directly.
// Otherwise remove it only if all specified property/value pairs match.
if (!$Query || count(array_intersect_assoc($Query, $Collection)) == count($Query)) {
unset($this->_Tags[$Index]);
}
}
}
}