Set the pool.

@param Pool $pool The pool

@return self
967542
public function setPool(Pool $pool)
    {
        $this->pool = $pool;

        foreach ($this->poolRepositories as $repo) {
            $pool->addRepository($repo);
        }

        $this->poolRepositories = array();

        return $this;
    }
33531
protected function release($object): AbstractPool
	{
		$this->idleQueue->enqueue($object);
		$this->taskDequeue();
		
		return $this;
	}
126153
protected function withSize(int $maxSize): AbstractPool
	{
		if ($maxSize <= 0) {
			throw new \InvalidArgumentException(PoolException::ERROR_INVALID_POOL_SIZE);
		}
		$this->maxSize = $maxSize;
		
		return $this;
	}
270975
private function poolSet(Model $model) {
        $key = $this->getPoolKey($model->pk);
        X::logger()->trace("Save $key to pool");
        $this->redis()->set(
            $key,
            serialize($model),
            $this->conf['duration']['pool']
        );
        X::logger()->trace("Saved pool $key");
        return $this;
    }
222391
public function set(string $name, $value): self
    {
        $this->type = self::TYPE_SET;
        $this->name = $name;
        $this->setValue($value, $this->type);

        return $this;
    }
1166756
public function setEndTimezone($timezone = 'UTC')
	{
		$this->end->setTimezone(is_string($timezone) ? new \DateTimeZone($timezone) : $timezone);
		return $this;
	}
332002
public function setIndex($index)
    {
        $this->index = $index;

        $this->setIndexClean(
            str_replace('.', '', $index)
        );

        return $this;
    }
886933
public function set($fields)
    {
        foreach ($fields as $k => $v) {
            $this->{$k} = $v;
        }

        return $this;
    }
859950
public function setPath(string $path): self
    {
        parent::setPath($path);
        $this->directory = new Directory(\dirname($path));

        return $this;
    }
1318282
public function setTimezone($timezone)
	{
		if ( ! $timezone instanceOf DateTimeZone)
		{
			if ($timezone === null)
			{
				$timezone = static::defaultTimezone();
			}
			else
			{
				$timezone = new DateTimeZone($timezone);
			}
		}

		$this->datetime->setTimezone($timezone);

		return $this;
	}
1339634
public function setToken($token) : self
    {
        if (! (is_string($token) || is_null($token))) {
            throw new InvalidArgumentException(
                sprintf('Invalid $token type: "%s". Must be "string" or "null"', gettype($token))
            );
        }

        $this->token = $token;
        return $this;
    }
39434
public function setAccessToken($token)
    {
        /**
         * @var Client $google
         */
        $google = Container::getInstance()->make(Client::class);

        $google->getCache()->clear();

        $google->setAccessToken($token);

        if (isset($token['refresh_token']) and $google->isAccessTokenExpired()) {
            $google->fetchAccessTokenWithRefreshToken();
        }

        return $this->setService($google->make('sheets'))
                    ->setDriveService($google->make('drive'));
    }
139909
public function setNodePool($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\NodePool::class);
        $this->node_pool = $var;

        return $this;
    }
473113
public function set(string $str): self
    {
        $this->str = $this->inputConv($str);

        return $this;
    }
1200882
public function setOptions(array $options) : self
    {
        $this->_options = array_replace_recursive($this->getDefaultOptions(), $options);

        return $this;
    }
646878
public function set(string $key, $value): self
    {
        Arr::set($this->data, $key, $value, true);
        return $this;
    }
1198646
public function set(string $key, $value): self
    {
        $this->data[$key] = $value;

        return $this;
    }