public static function getPool(string $name): PoolInterface
    {
        $collector = PoolCollector::getCollector();
        if (!isset($collector[$name])) {
            throw new InvalidArgumentException("the pool of $name is not exist!");
        }

        $poolBeanName = $collector[$name];

        return self::getBean($poolBeanName);
    }
public static function getPool(string $name): PoolInterface
    {
        $collector = PoolCollector::getCollector();
        if (!isset($collector[$name])) {
            throw new InvalidArgumentException("the pool of $name is not exist!");
        }

        $poolBeanName = $collector[$name];

        return self::getBean($poolBeanName);
    }
public static function getPool ( string $ name ) : PoolInterface { $ collector = PoolCollector :: getCollector ( ) ; if ( ! isset ( $ collector [ $ name ] ) ) { throw new InvalidArgumentException ( "the pool of $name is not exist!" ) ; } $ poolBeanName = $ collector [ $ name ] ; return self :: getBean ( $ poolBeanName ) ; }
get pool by name

@param string $name

@return PoolInterface
@throws \Swoft\Exception\InvalidArgumentException
get pool by name