Hprose\Service::push PHP Метод

push() публичный Метод

push($topic, $id, $result)
public push ( $topic )
    public function push($topic)
    {
        $this->checkPushService();
        $args = func_get_args();
        $argc = func_num_args();
        $id = null;
        $result = null;
        if ($argc < 2 || $argc > 3) {
            throw new Exception('Wrong number of arguments');
        }
        if ($argc === 2) {
            $result = $args[1];
        } else {
            $id = $args[1];
            $result = $args[2];
        }
        if ($id === null) {
            $topics = $this->getTopics($topic);
            $iterator = $topics->getIterator();
            while ($iterator->valid()) {
                $id = $iterator->key();
                $this->internalPush($topic, $id, $result);
                $iterator->next();
            }
        } elseif (is_array($id)) {
            $ids = $id;
            foreach ($ids as $id) {
                $this->internalPush($topic, $id, $result);
            }
        } else {
            $this->internalPush($topic, $id, $result);
        }
    }