public function addAccessConstraint(AccessConstraint $constraint)
 {
     $accessConstraintElement = $this->getAccessConstraintElement($constraint->name);
     // return;
     if ($accessConstraintElement == null) {
         $doc = $this->m_securityNode->ownerDocument;
         $accessConstraintElement = $doc->createElement("access-constraint");
         $accessConstraintElement->setAttribute("action", $constraint->getAction());
         $nameElement = $doc->createElement("name");
         $nameElement->nodeValue = $constraint->name;
         //return;
         $accessConstraintElement->appendChild($nameElement);
         //return;
         $this->m_accessConstraintsNode->appendChild($accessConstraintElement);
     }
     //return;
     $restrictions = $constraint->getRestrictions();
     for ($i = 0, $max = count($restrictions); $i < $max; $i++) {
         $restriction = $restrictions[$i];
         //////////////////////////
         $this->addRestriction2($accessConstraintElement, $restriction);
     }
 }