public function addResource($resourceId, Expandable $controller)
    {
        $this->resources[$resourceId] = $controller;

        $prefix = $this->options['prefix'];
        $resourceMux = $controller->expand();
        $path = $prefix . '/' . $resourceId;
        $this->mux->mount($path, $resourceMux);
    }
public function addResource($resourceId, Expandable $controller)
    {
        $this->resources[$resourceId] = $controller;

        $prefix = $this->options['prefix'];
        $resourceMux = $controller->expand();
        $path = $prefix . '/' . $resourceId;
        $this->mux->mount($path, $resourceMux);
    }
public function addResource ( $ resourceId , Expandable $ controller ) { $ this -> resources [ $ resourceId ] = $ controller ; $ prefix = $ this -> options [ 'prefix' ] ; $ resourceMux = $ controller -> expand ( ) ; $ path = $ prefix . '/' . $ resourceId ; $ this -> mux -> mount ( $ path , $ resourceMux ) ; }
Register a RESTful resource into the Mux object.

@param string $resourceId the RESTful resource ID
@param Expandable $controller a controller object that implements Expandable interface.
Register a RESTful resource into the Mux object .