private function inCache()
 {
     $this->cached = true;
     return afValidatorCachePeer::inCache($this->file);
 }
 public function readXmlDocument($path = null, $security = false, $uri = false)
 {
     $page = false;
     if (!$uri) {
         $action = sfContext::getInstance()->getActionName();
         $module = sfContext::getInstance()->getModuleName();
     } else {
         $module = strtok($uri, "/");
         $action = strtok("/");
     }
     if ($path === null) {
         $pathCU = new afConfigUtils($module);
         $path = $pathCU->getConfigFilePath($action . '.xml', true);
         if (strstr($path, "page")) {
             $page = true;
         }
     }
     $hash = sha1_file($path);
     $obj = afValidatorCachePeer::inCache($path);
     if (!$obj || $obj->getSignature() != $hash) {
         $doc = new XmlValidator($path, $security, false, false, $page ? $this->context->getModuleName() . "/" . $this->context->getActionName() : null);
         $doc->validateXmlDocument();
         $this->document = $doc->getXmlDocument();
         $this->validator = $doc;
     } else {
         $this->document = new DOMDocument();
         $this->document->load($path);
     }
     parent::setNamespace($security);
     parent::setXmlDocument($this->document);
     parent::setXpath();
     XmlBaseElementParser::clearRetVal();
 }