Performs a WAMP register
 @note This method is blocking if the callback is not nil
490714
def register(procedure, klass, options={}, &callback)
      command = WampRails::Command::Register.new(procedure, klass, options, self)
      self._queue_command(command, callback)
    end
1305971
def register(self, method, uri, call_back):
        
        found = False

        self.create_route(uri, False)
        self.routes[uri]['handlers'].register_method(method,
                                                     call_back)
789284
def run_callback(method, *args)
      case method
      when Symbol
        send(method, *args)
      when Proc
        instance_exec(*args, &method)
      else
        raise "Please register with callbacks using a symbol or a block/proc."
      end
    end
745551
def register(id, &block)
      ref = __get id
      return ref.__getobj__ if ref && ref.weakref_alive?
      item = block.call
      return nil unless item
      __register id, item
    end
396532
public void registerCallback(UOWCallback callback)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) Tr.entry(tc, "registerCallback", callback);

        if (!_callbacks.contains(callback))
        {
            _callbacks.add(callback);

            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "Number of registered Callbacks: "+_callbacks.size());
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) Tr.exit(tc, "registerCallback");
    }
915863
public function ajax_register() {
		if ( AjaxBase::is_ajax() ) {
			foreach ( $this->ajax_controllers as $class_name ) {
				/** @var AjaxBase $instance */
				$instance = $class_name::get_instance();
				$instance->register();
			}
		}
	}
1179096
def handle_invocation(self, message):
        
        req_id = message.request_id
        reg_id = message.registration_id
        if reg_id in self._registered_calls:
            handler = self._registered_calls[reg_id][REGISTERED_CALL_CALLBACK]
            invoke = WampInvokeWrapper(self,handler,message)
            invoke.start()
        else:
            error_uri = self.get_full_uri('error.unknown.uri')
            self.send_message(ERROR(
                request_code = WAMP_INVOCATION,
                request_id = req_id,
                details = {},
                error =error_uri
            ))
1267602
public function register()
    {
        $this->helper_callbacks = array();
        $arguments= func_get_args();
        if(count($arguments) > 0){
            foreach($arguments as $argument){
                if($argument instanceof Plugin){ //this is a plugin object
                    $callback = $argument->getEventHelperCallback($this->getName());
                    if(is_callable($callback)){
                        $this->helper_callbacks[] = $callback;
                    }                 
                }
                else if(is_callable($argument)){ //this is a closure
                    $this->helper_callbacks[] = $argument;
                }
            }
        }

        return $this; //return the event object reference to allow chainable calls
    }
1138810
protected function registerBufferEmptyCallback()
    {
        $this->swoolePort->on('BufferEmpty', function ($server, $fd) {
            $this->dispatchEvent('BufferEmpty', $this->server, $this, $fd);
        });
    }
621207
def start(self):
        
        self.connect()
        if not self.isAlive():
            super(WAMPClient,self).start()
        self.hello()
        return self
590120
function (data, callback) {
    if (typeof callback !== 'function') {
        this.debug("Registering dummy callback, because a response message is expected");
    } else {
        this.debug("Registering callback");
    }
    this.waitingCallbacks.push(callback);
    send.call(this, data);
}
903048
protected function registerWorkerStopCallback()
    {
        $this->swooleServer->on('WorkerStop', function ($server, $workerId) {
            $this->events->dispatch(new Events\WorkerStopped($this, $workerId));

            $this->dispatchEvent('WorkerStop', $this, $workerId);
        });
    }
413375
def register(selector)
      ZMachine.logger.debug("zmachine:connection:#{__method__}", connection: self, fd: @channel.selectable_fd) if ZMachine.debug
      @channel_key = @channel.selectable_fd.register(selector, current_events, self)
    end
1268369
final private function register()
    {
        $whoops = new \Whoops\Run();

        if (is_ajax() or $this->mimeType === 'application/json' or $this->mimeType === 'application/xml') {
            $whoops->pushHandler(new CallbackHandler(function ($error) {
                $this->send([
                    'status'   => 500,
                    'success'  => false,
                    'message'  => $error->getMessage(),
                    'metadata' => [
                        'file'  => $error->getFile(),
                        'line'  => $error->getLine(),
                        'trace' => $error->getTrace(),
                    ],
                ]);
            }));
        } elseif (is_cli() or $this->mimeType === 'text/plain') {
            $whoops->pushHandler(new PlainTextHandler());
        } elseif ($this->mimeType === 'text/html') {
            $whoops->pushHandler(new PrettyPageHandler());
        }

        $whoops->register();

        set_error_handler([&$this, 'errorHandler']);
        set_exception_handler([&$whoops, 'handleException']);
        register_shutdown_function([&$this, 'shutdownHandler']);
    }
894317
@Override
    public void registerCallback(UOWScopeCallback callback) {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "registerCallback", callback);

        UserTransactionImpl.instance().registerCallback(callback);

        if (tc.isEntryEnabled())
            Tr.exit(tc, "registerCallback");
    }
1249103
def register_callback(self, callback):
        
        if not callable(callback):
            raise ValueError('callback is not a callable')

        self.callbacks.append(callback)
490412
protected static function register()
    {
        if (!self::$registered) {
            // set up __autoload
            $autoload = spl_autoload_functions();
            spl_autoload_register(__CLASS__.'::load');
            if (function_exists('__autoload') && ($autoload === false)) {
                // __autoload() was being used, but now would be ignored, add
                // it to the autoload stack
                spl_autoload_register('__autoload');
            }
        }
        self::$registered = true;
    }