Blame view

Hood/Concurrent.php 640 Bytes
ziy authored
1 2 3 4 5 6 7 8 9 10 11
<?php
/**
 * Created by PhpStorm.
 * User: Zip
 * Date: 14/12/16
 * Time: 下午5:05
 */

namespace Hood;

use Hood\Concurrent\Yar;
ziy authored
12
use Hood\Concurrent\Http;
ziy authored
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33

class Concurrent
{
    /**
     * @param $url
     * @return Yar\Client
     */
    static public function yarClient($url)
    {
        return new Yar\Client($url);
    }

    /**
     * @param $uri
     * @return Yar\Concurrent
     */
    static public function yarConcurrent($uri)
    {
        return new Yar\Concurrent($uri);
    }
ziy authored
34 35 36 37
    /**
     *
     * @return Http\CurlMulti
     */
ziy authored
38
    static public function curlMulti()
ziy authored
39
    {
ziy authored
40
        return new Http\CurlMulti();
ziy authored
41 42
    }
}