original_string: public function contain($associations = [], callable $queryBuilder = null)
      {
          if (empty($associations)) {
              deprecationWarning(
                  'Using EagerLoader::contain() as getter is deprecated. ' .
                  'Use getContain() instead.'
              );
  
              return $this->getContain();
          }
  
          if ($queryBuilder) {
              if (!is_string($associations)) {
                  throw new InvalidArgumentException(
                      sprintf('Cannot set containments. To use $queryBuilder, $associations must be a string')
                  );
              }
  
              $associations = [
                  $associations => [
                      'queryBuilder' => $queryBuilder
                  ]
              ];
          }
  
          $associations = (array)$associations;
          $associations = $this->_reformatContain($associations, $this->_containments);
          $this->_normalized = null;
          $this->_loadExternal = [];
          $this->_aliasList = [];
  
          return $this->_containments = $associations;
      }
code: public function contain($associations = [], callable $queryBuilder = null)
      {
          if (empty($associations)) {
              deprecationWarning(
                  'Using EagerLoader::contain() as getter is deprecated. ' .
                  'Use getContain() instead.'
              );
  
              return $this->getContain();
          }
  
          if ($queryBuilder) {
              if (!is_string($associations)) {
                  throw new InvalidArgumentException(
                      sprintf('Cannot set containments. To use $queryBuilder, $associations must be a string')
                  );
              }
  
              $associations = [
                  $associations => [
                      'queryBuilder' => $queryBuilder
                  ]
              ];
          }
  
          $associations = (array)$associations;
          $associations = $this->_reformatContain($associations, $this->_containments);
          $this->_normalized = null;
          $this->_loadExternal = [];
          $this->_aliasList = [];
  
          return $this->_containments = $associations;
      }
code_tokens: public function contain ( $ associations = [ ] , callable $ queryBuilder = null ) { if ( empty ( $ associations ) ) { deprecationWarning ( 'Using EagerLoader::contain() as getter is deprecated. ' . 'Use getContain() instead.' ) ; return $ this -> getContain ( ) ; } if ( $ queryBuilder ) { if ( ! is_string ( $ associations ) ) { throw new InvalidArgumentException ( sprintf ( 'Cannot set containments. To use $queryBuilder, $associations must be a string' ) ) ; } $ associations = [ $ associations => [ 'queryBuilder' => $ queryBuilder ] ] ; } $ associations = ( array ) $ associations ; $ associations = $ this -> _reformatContain ( $ associations , $ this -> _containments ) ; $ this -> _normalized = null ; $ this -> _loadExternal = [ ] ; $ this -> _aliasList = [ ] ; return $ this -> _containments = $ associations ; }
docstring: Sets the list of associations that should be eagerly loaded along for a
  specific table using when a query is provided. The list of associated tables
  passed to this method must have been previously set as associations using the
  Table API.
  
  Associations can be arbitrarily nested using dot notation or nested arrays,
  this allows this object to calculate joins or any additional queries that
  must be executed to bring the required associated data.
  
  The getter part is deprecated as of 3.6.0. Use getContain() instead.
  
  Accepted options per passed association:
  
  - foreignKey: Used to set a different field to match both tables, if set to false
  no join conditions will be generated automatically
  - fields: An array with the fields that should be fetched from the association
  - queryBuilder: Equivalent to passing a callable instead of an options array
  - matching: Whether to inform the association class that it should filter the
  main query by the results fetched by that class.
  - joinType: For joinable associations, the SQL join type to use.
  - strategy: The loading strategy to use (join, select, subquery)
  
  @param array|string $associations list of table aliases to be queried.
  When this method is called multiple times it will merge previous list with
  the new one.
  @param callable|null $queryBuilder The query builder callable
  @return array Containments.
  @throws \InvalidArgumentException When using $queryBuilder with an array of $associations
docstring_tokens: Sets the list of associations that should be eagerly loaded along for a specific table using when a query is provided . The list of associated tables passed to this method must have been previously set as associations using the Table API .