public function add(PromiseCore $core): void
    {
        foreach ($this->cores as $existed) {
            if ($existed === $core) {
                return;
            }
        }

        $this->cores[] = $core;

        if (null === $this->multiHandle) {
            $this->multiHandle = curl_multi_init();
        }
        curl_multi_add_handle($this->multiHandle, $core->getHandle());
    }
public function add(PromiseCore $core): void
    {
        foreach ($this->cores as $existed) {
            if ($existed === $core) {
                return;
            }
        }

        $this->cores[] = $core;

        if (null === $this->multiHandle) {
            $this->multiHandle = curl_multi_init();
        }
        curl_multi_add_handle($this->multiHandle, $core->getHandle());
    }
public function add ( PromiseCore $ core ) : void { foreach ( $ this -> cores as $ existed ) { if ( $ existed === $ core ) { return ; } } $ this -> cores [ ] = $ core ; if ( null === $ this -> multiHandle ) { $ this -> multiHandle = curl_multi_init ( ) ; } curl_multi_add_handle ( $ this -> multiHandle , $ core -> getHandle ( ) ) ; }
Add promise to runner.

@param PromiseCore $core
Add promise to runner .