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;
    }