public function addInstance(Curl $curlInstance, $name = null)
    {
        if ($name) {
            $this->curlInstances[$name] = $curlInstance;
        } else {
            $this->curlInstances[] = $curlInstance;
        }

        end($this->curlInstances);
        return key($this->curlInstances);
    }
public function addInstance(Curl $curlInstance, $name = null)
    {
        if ($name) {
            $this->curlInstances[$name] = $curlInstance;
        } else {
            $this->curlInstances[] = $curlInstance;
        }

        end($this->curlInstances);
        return key($this->curlInstances);
    }
public function addInstance ( Curl $ curlInstance , $ name = null ) { if ( $ name ) { $ this -> curlInstances [ $ name ] = $ curlInstance ; } else { $ this -> curlInstances [ ] = $ curlInstance ; } end ( $ this -> curlInstances ) ; return key ( $ this -> curlInstances ) ; }
Add a Curl instance to this Curl Multi instance

@param Curl $curlInstance Instance of Curl
@param string|null $name An optional name which will be used as key in the instance array

@return mixed The name of the instance (same as $name or the index in array if name is not given)
Add a Curl instance to this Curl Multi instance