ApiAbstract.php 671 Bytes
<?php
/**
 * Created by PhpStorm.
 * User: Zip
 * Date: 15/4/6
 * Time: 下午10:06
 */

namespace QSnsApi;


class ApiAbstract
{

    /**
     * @param $serviceUri
     * @return YarConcurrent
     */
    protected static function concurrent($className)
    {
        return new YarConcurrent(Config::getUri($className));
    }

    /**
     * @param $serviceUri
     * @return \Yar_Client
     */
    protected static function client($className)
    {
        echo Config::getUri($className);
        exit();
        $yarClient = new \Yar_Client(Config::getUri($className));
        $yarClient->setOpt(YAR_OPT_CONNECT_TIMEOUT, 1000);
        return $yarClient;
    }
}