original_string: public function loadInto($entities, array $contain, Table $source)
      {
          $returnSingle = false;
  
          if ($entities instanceof EntityInterface) {
              $entities = [$entities];
              $returnSingle = true;
          }
  
          $entities = new Collection($entities);
          $query = $this->_getQuery($entities, $contain, $source);
          $associations = array_keys($query->getContain());
  
          $entities = $this->_injectResults($entities, $query, $associations, $source);
  
          return $returnSingle ? array_shift($entities) : $entities;
      }
code: public function loadInto($entities, array $contain, Table $source)
      {
          $returnSingle = false;
  
          if ($entities instanceof EntityInterface) {
              $entities = [$entities];
              $returnSingle = true;
          }
  
          $entities = new Collection($entities);
          $query = $this->_getQuery($entities, $contain, $source);
          $associations = array_keys($query->getContain());
  
          $entities = $this->_injectResults($entities, $query, $associations, $source);
  
          return $returnSingle ? array_shift($entities) : $entities;
      }
code_tokens: public function loadInto ( $ entities , array $ contain , Table $ source ) { $ returnSingle = false ; if ( $ entities instanceof EntityInterface ) { $ entities = [ $ entities ] ; $ returnSingle = true ; } $ entities = new Collection ( $ entities ) ; $ query = $ this -> _getQuery ( $ entities , $ contain , $ source ) ; $ associations = array_keys ( $ query -> getContain ( ) ) ; $ entities = $ this -> _injectResults ( $ entities , $ query , $ associations , $ source ) ; return $ returnSingle ? array_shift ( $ entities ) : $ entities ; }
docstring: Loads the specified associations in the passed entity or list of entities
  by executing extra queries in the database and merging the results in the
  appropriate properties.
  
  The properties for the associations to be loaded will be overwritten on each entity.
  
  @param \Cake\Datasource\EntityInterface|array $entities a single entity or list of entities
  @param array $contain A `contain()` compatible array.
  @see \Cake\ORM\Query::contain()
  @param \Cake\ORM\Table $source The table to use for fetching the top level entities
  @return \Cake\Datasource\EntityInterface|array
docstring_tokens: Loads the specified associations in the passed entity or list of entities by executing extra queries in the database and merging the results in the appropriate properties .