PHPDaemon\Servers\WebSocket\Pool::setRouteOptions PHP 메소드

setRouteOptions() 공개 메소드

Sets an array of options associated to the route
public setRouteOptions ( string $path, array $opts ) : boolean
$path string Route name.
$opts array Options
리턴 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;
    }