Zend Studio ZeroMQ Library 自动提示

2014-01-02 10:36  1565人阅读  评论 (0)

把以下代码保存为ZeroMQ.php文件,放到项目中即可自动提示.

<?php
class ZMQ {
    /* Constants */
    const SOCKET_PAIR = 1;
    const SOCKET_PUB = 1;
    const SOCKET_SUB = 1;
    const SOCKET_REQ = 1;
    const SOCKET_REP = 1;
    const SOCKET_XREQ = 1;
    const SOCKET_XREP = 1;
    const SOCKET_PUSH = 1;
    const SOCKET_PULL = 1;
    const SOCKET_ROUTER = 1;
    const SOCKET_DEALER = 1;
    const SOCKET_XPUB = 1;
    const SOCKET_XSUB = 1;
    const SOCKET_STREAM = 1;
    const SOCKOPT_HWM = 1;
    const SOCKOPT_SNDHWM = 1;
    const SOCKOPT_RCVHWM = 1;
    const SOCKOPT_AFFINITY = 1;
    const SOCKOPT_IDENTITY = 1;
    const SOCKOPT_SUBSCRIBE = 1;
    const SOCKOPT_UNSUBSCRIBE = 1;
    const SOCKOPT_RATE = 1;
    const SOCKOPT_RECOVERY_IVL = 1;
    const SOCKOPT_RECONNECT_IVL = 1;
    const SOCKOPT_RECONNECT_IVL_MAX = 1;
    const SOCKOPT_MCAST_LOOP = 1;
    const SOCKOPT_SNDBUF = 1;
    const SOCKOPT_RCVBUF = 1;
    const SOCKOPT_RCVMORE = 1;
    const SOCKOPT_TYPE = 1;
    const SOCKOPT_LINGER = 1;
    const SOCKOPT_BACKLOG = 1;
    const SOCKOPT_MAXMSGSIZE = 1;
    const SOCKOPT_SNDTIMEO = 1;
    const SOCKOPT_RCVTIMEO = 1;
    const SOCKOPT_IPV4ONLY = 1;
    const SOCKOPT_LAST_ENDPOINT = 1;
    const SOCKOPT_TCP_KEEPALIVE_IDLE = 1;
    const SOCKOPT_TCP_KEEPALIVE_CNT = 1;
    const SOCKOPT_TCP_KEEPALIVE_INTVL = 1;
    const SOCKOPT_TCP_ACCEPT_FILTER = 1;
    const SOCKOPT_DELAY_ATTACH_ON_CONNECT = 1;
    const SOCKOPT_XPUB_VERBOSE = 1;
    const SOCKOPT_ROUTER_RAW = 1;
    const SOCKOPT_IPV6 = 1;
    const CTXOPT_MAX_SOCKETS = 1;
    const POLL_IN = 1;
    const POLL_OUT = 1;
    const MODE_NOBLOCK = 1;
    const MODE_DONTWAIT = 1;
    const MODE_SNDMORE = 1;
    const ERR_INTERNAL = 1;
    const ERR_EAGAIN = 1;
    const ERR_ENOTSUP = 1;
    const ERR_EFSM = 1;
    const ERR_ETERM = 1;

    /* Methods */
    private function __construct();
}
class ZMQContext {
    /* Methods */
    /**
     * @param int $io_threads           
     * @param bool $is_persistent           
     */
    public function __construct($io_threads = 1, $is_persistent = true);
    /**
     * @param string $key           
     * @return mixed
     */
    public function getOpt($key);
    /**
     * @param integer $type         
     * @param string $persistent_id         
     * @param callable $on_new_socket           
     * @return ZMQSocket
     */
    public function getSocket($type, $persistent_id = null, callable $on_new_socket = null);
    /**
     * @return bool
     */
    public function isPersistent();
    /**
     * @param integer $key          
     * @param mixed $value          
     * @return ZMQContext
     */
    public function setOpt($key, $value);
}
class ZMQSocket {
    /* Methods */
    /**
     * @param ZMQContext $context           
     * @param int $type         
     * @param string $persistent_id         
     * @param callable $on_new_socket           
     */
    public function __construct(ZMQContext $context, $type, $persistent_id = null, callable $on_new_socket = null);
    /**
     * @param string $dsn           
     * @param boolean $force            
     * @return ZMQSocket
     */
    public function bind($dsn, $force = false);
    /**
     * @param string $dsn           
     * @param boolean $force            
     * @return ZMQSocket
     */
    public function connect($dsn, $force = false);
    /**
     * @param string $dsn
     */
    public function disconnect($dsn);
    /**
     * @return array
     */
    public function getEndpoints();
    /**
     * @return string
     */
    public function getPersistentId();
    /**
     * @return integer
     */
    public function getSocketType();
    /**
     * @param string $key           
     * @return mixed
     */
    public function getSockOpt($key);
    /**
     * @return boolean
     */
    public function isPersistent();
    /**
     * @param integer $mode         
     * @return string
     */
    public function recv($mode = 0);
    /**
     * @param integer $mode         
     * @return string
     */
    public function recvMulti($mode = 0);
    /**
     * @param string|array $message         
     * @param integer $mode         
     * @return ZMQSocket
     */
    public function send($message, $mode = 0);
    /**
     * @param integer $key          
     * @param mixed $value          
     * @return ZMQSocket
     */
    public function setSockOpt($key, $value);
    /**
     * @param string $dsn           
     * @return ZMQSocket
     */
    public function unbind($dsn);
}
class ZMQPoll {
    /* Methods */
    /**
     * @param mixed $entry          
     * @param integer $type         
     * @return string
     */
    public function add($entry, $type);
    /**
     * @return ZMQPoll
     */
    public function clear();
    /**
     * @return integer
     */
    public function count();
    /**
     * @return array
     */
    public function getLastErrors();
    /**
     * @param array $readable           
     * @param array $writable           
     * @param integer $timeout          
     * @return integer
     */
    public function poll(&$readable, &$writable, $timeout = -1);
    /**
     * @param mixed $item           
     * @return boolean
     */
    public function remove($item);
}
class ZMQDevice {
    /* Methods */
    /**
     * @param ZMQSocket $frontend           
     * @param ZMQSocket $backend            
     * @param ZMQSocket $listener           
     */
    public function __construct($frontend, $backend, $listener = null);
    /**
     * @return ZMQDevice
     */
    public function getIdleTimeout();
    /**
     * @return ZMQDevice
     */
    public function getTimerTimeout();
    public function run();
    /**
     * @param callable $cb_func         
     * @param integer $timeout          
     * @param mixed $user_data          
     * @return ZMQDevice
     */
    public function setIdleCallback($cb_func, $timeout, $user_data = null);
    /**
     * @param integer $timeout          
     * @return ZMQDevice
     */
    public function setIdleTimeout($timeout);
    /**
     * @param callable $cb_func         
     * @param integer $timeout          
     * @param mixed $user_data          
     * @return ZMQDevice
     */
    public function setTimerCallback($cb_func, $timeout, $user_data = null);
    /**
     * @param integer $timeout          
     * @return ZMQDevice
     */
    public function setTimerTimeout($timeout);
}