original_string: public function validate($xsd = null)
      {
          if (!$xsd) {
              $xsdPath = __DIR__ . '/../../../resources/xsd/';
              $xsd = $xsdPath . 'rampage/core/ModuleManifest.xsd';
          }
  
          try {
              $dom = new DOMDocument();
              $dom->loadXML($this->getXml()->asXML());
  
              $result = $dom->schemaValidate($xsd);
              unset($dom);
          } catch (\Exception $e) {
              return false;
          }
  
          return $result;
      }
code: public function validate($xsd = null)
      {
          if (!$xsd) {
              $xsdPath = __DIR__ . '/../../../resources/xsd/';
              $xsd = $xsdPath . 'rampage/core/ModuleManifest.xsd';
          }
  
          try {
              $dom = new DOMDocument();
              $dom->loadXML($this->getXml()->asXML());
  
              $result = $dom->schemaValidate($xsd);
              unset($dom);
          } catch (\Exception $e) {
              return false;
          }
  
          return $result;
      }
code_tokens: public function validate ( $ xsd = null ) { if ( ! $ xsd ) { $ xsdPath = __DIR__ . '/../../../resources/xsd/' ; $ xsd = $ xsdPath . 'rampage/core/ModuleManifest.xsd' ; } try { $ dom = new DOMDocument ( ) ; $ dom -> loadXML ( $ this -> getXml ( ) -> asXML ( ) ) ; $ result = $ dom -> schemaValidate ( $ xsd ) ; unset ( $ dom ) ; } catch ( \ Exception $ e ) { return false ; } return $ result ; }
docstring: Validate manifest xml
  
  @return bool
docstring_tokens: Validate manifest xml