Service/GearmanClient.php
protected function assignServers(\GearmanClient $gearmanClient)
    {
        $servers = $this->defaultServers;

        if (!empty($this->servers)) {

            $servers = $this->servers;
        }

        /**
         * We include each server into gearman client
         */
        foreach ($servers as $server) {

            $gearmanClient->addServer($server['host'], $server['port']);
        }

        return $this;
    }
protected function assignServers(\GearmanClient $gearmanClient)
    {
        $servers = $this->defaultServers;

        if (!empty($this->servers)) {

            $servers = $this->servers;
        }

        /**
         * We include each server into gearman client
         */
        foreach ($servers as $server) {

            $gearmanClient->addServer($server['host'], $server['port']);
        }

        return $this;
    }
protected function assignServers ( \ GearmanClient $ gearmanClient ) { $ servers = $ this -> defaultServers ; if ( ! empty ( $ this -> servers ) ) { $ servers = $ this -> servers ; } /**
         * We include each server into gearman client
         */ foreach ( $ servers as $ server ) { $ gearmanClient -> addServer ( $ server [ 'host' ] , $ server [ 'port' ] ) ; } return $ this ; }
Given a GearmanClient, set all included servers

@param \GearmanClient $gearmanClient Object to include servers

@return GearmanClient Returns self object
Given a GearmanClient set all included servers