original_string: private function validate() {
          foreach ($this->entries as $entry) {
              // first call the entry's own validation method
              // which will throw an exception if there's anything wrong
              $entry->validate();
              // now make sure that all links are in place
              foreach ($entry->links as $linkedid => $rel) {
                  // the linked to entry exists
                  if (!array_key_exists($linkedid, $this->entries)) {
                      $a = (object)array('rel' => $rel->type, 'to' => $linkedid, 'from' => $entry->id);
                      throw new portfolio_format_leap2a_exception('leap2a_nonexistantlink', 'portfolio', '', $a);
                  }
                  // and contains a link back to us
                  if (!array_key_exists($entry->id, $this->entries[$linkedid]->links)) {
  
                  }
                  // we could later check that the reltypes were properly inverse, but nevermind for now.
              }
          }
      }
code: private function validate() {
          foreach ($this->entries as $entry) {
              // first call the entry's own validation method
              // which will throw an exception if there's anything wrong
              $entry->validate();
              // now make sure that all links are in place
              foreach ($entry->links as $linkedid => $rel) {
                  // the linked to entry exists
                  if (!array_key_exists($linkedid, $this->entries)) {
                      $a = (object)array('rel' => $rel->type, 'to' => $linkedid, 'from' => $entry->id);
                      throw new portfolio_format_leap2a_exception('leap2a_nonexistantlink', 'portfolio', '', $a);
                  }
                  // and contains a link back to us
                  if (!array_key_exists($entry->id, $this->entries[$linkedid]->links)) {
  
                  }
                  // we could later check that the reltypes were properly inverse, but nevermind for now.
              }
          }
      }
code_tokens: private function validate ( ) { foreach ( $ this -> entries as $ entry ) { // first call the entry's own validation method // which will throw an exception if there's anything wrong $ entry -> validate ( ) ; // now make sure that all links are in place foreach ( $ entry -> links as $ linkedid => $ rel ) { // the linked to entry exists if ( ! array_key_exists ( $ linkedid , $ this -> entries ) ) { $ a = ( object ) array ( 'rel' => $ rel -> type , 'to' => $ linkedid , 'from' => $ entry -> id ) ; throw new portfolio_format_leap2a_exception ( 'leap2a_nonexistantlink' , 'portfolio' , '' , $ a ) ; } // and contains a link back to us if ( ! array_key_exists ( $ entry -> id , $ this -> entries [ $ linkedid ] -> links ) ) { } // we could later check that the reltypes were properly inverse, but nevermind for now. } } }
docstring: Validate the feed and all entries
docstring_tokens: Validate the feed and all entries