PHPDaemon\Servers\WebSocket\Pool::setRouteOptions PHP Method

setRouteOptions() public method

Sets an array of options associated to the route
public setRouteOptions ( string $path, array $opts ) : boolean
$path string Route name.
$opts array Options
return boolean Success.
    public function setRouteOptions($path, $opts)
    {
        $routeName = ltrim($path, '/');
        if (!isset($this->routes[$routeName])) {
            Daemon::log(__METHOD__ . ': Route \'' . $path . '\' is not found.');
            return false;
        }
        $this->routeOptions[$routeName] = $opts;
        return true;
    }