original_string: public function getObjects(Criteria $criteria = null, ConnectionInterface $con = null)
      {
          $partial = $this->collObjectsPartial && !$this->isNew();
          if (null === $this->collObjects || null !== $criteria  || $partial) {
              if ($this->isNew() && null === $this->collObjects) {
                  // return empty collection
                  $this->initObjects();
              } else {
                  $collObjects = ChildObjectQuery::create(null, $criteria)
                      ->filterBySport($this)
                      ->find($con);
  
                  if (null !== $criteria) {
                      if (false !== $this->collObjectsPartial && count($collObjects)) {
                          $this->initObjects(false);
  
                          foreach ($collObjects as $obj) {
                              if (false == $this->collObjects->contains($obj)) {
                                  $this->collObjects->append($obj);
                              }
                          }
  
                          $this->collObjectsPartial = true;
                      }
  
                      return $collObjects;
                  }
  
                  if ($partial && $this->collObjects) {
                      foreach ($this->collObjects as $obj) {
                          if ($obj->isNew()) {
                              $collObjects[] = $obj;
                          }
                      }
                  }
  
                  $this->collObjects = $collObjects;
                  $this->collObjectsPartial = false;
              }
          }
  
          return $this->collObjects;
      }
code: public function getObjects(Criteria $criteria = null, ConnectionInterface $con = null)
      {
          $partial = $this->collObjectsPartial && !$this->isNew();
          if (null === $this->collObjects || null !== $criteria  || $partial) {
              if ($this->isNew() && null === $this->collObjects) {
                  // return empty collection
                  $this->initObjects();
              } else {
                  $collObjects = ChildObjectQuery::create(null, $criteria)
                      ->filterBySport($this)
                      ->find($con);
  
                  if (null !== $criteria) {
                      if (false !== $this->collObjectsPartial && count($collObjects)) {
                          $this->initObjects(false);
  
                          foreach ($collObjects as $obj) {
                              if (false == $this->collObjects->contains($obj)) {
                                  $this->collObjects->append($obj);
                              }
                          }
  
                          $this->collObjectsPartial = true;
                      }
  
                      return $collObjects;
                  }
  
                  if ($partial && $this->collObjects) {
                      foreach ($this->collObjects as $obj) {
                          if ($obj->isNew()) {
                              $collObjects[] = $obj;
                          }
                      }
                  }
  
                  $this->collObjects = $collObjects;
                  $this->collObjectsPartial = false;
              }
          }
  
          return $this->collObjects;
      }
code_tokens: public function getObjects ( Criteria $ criteria = null , ConnectionInterface $ con = null ) { $ partial = $ this -> collObjectsPartial && ! $ this -> isNew ( ) ; if ( null === $ this -> collObjects || null !== $ criteria || $ partial ) { if ( $ this -> isNew ( ) && null === $ this -> collObjects ) { // return empty collection $ this -> initObjects ( ) ; } else { $ collObjects = ChildObjectQuery :: create ( null , $ criteria ) -> filterBySport ( $ this ) -> find ( $ con ) ; if ( null !== $ criteria ) { if ( false !== $ this -> collObjectsPartial && count ( $ collObjects ) ) { $ this -> initObjects ( false ) ; foreach ( $ collObjects as $ obj ) { if ( false == $ this -> collObjects -> contains ( $ obj ) ) { $ this -> collObjects -> append ( $ obj ) ; } } $ this -> collObjectsPartial = true ; } return $ collObjects ; } if ( $ partial && $ this -> collObjects ) { foreach ( $ this -> collObjects as $ obj ) { if ( $ obj -> isNew ( ) ) { $ collObjects [ ] = $ obj ; } } } $ this -> collObjects = $ collObjects ; $ this -> collObjectsPartial = false ; } } return $ this -> collObjects ; }
docstring: Gets an array of ChildObject objects which contain a foreign key that references this object.
  
  If the $criteria is not null, it is used to always fetch the results from the database.
  Otherwise the results are fetched from the database the first time, then cached.
  Next time the same method is called without $criteria, the cached collection is returned.
  If this ChildSport is new, it will return
  an empty collection or the current collection; the criteria is ignored on a new object.
  
  @param      Criteria $criteria optional Criteria object to narrow the query
  @param      ConnectionInterface $con optional connection object
  @return ObjectCollection|ChildObject[] List of ChildObject objects
  @throws PropelException
docstring_tokens: Gets an array of ChildObject objects which contain a foreign key that references this object .