/** * Check whether target is equal to another. * * @param Target $other * @return bool */ public function equals(Target $other) { if ($this->_type != $other->_type) { return false; } if ($this->toASN1()->toDER() != $other->toASN1()->toDER()) { return false; } return true; }
/** * Check whether given target is present. * * @param Target $target * @return boolean */ public function hasTarget(Target $target) { foreach ($this->_allOfType($target->type()) as $t) { if ($target->equals($t)) { return true; } } return false; }