src/Route/AbstractModelRoute.php
public function setModelId($id)
    {
        if (is_array($id)) {
            $this->modelId = $id;
        } else {
            $this->modelId = [$id];
        }

        // rebuild the model instance with ID
        if ($this->model) {
            $model = (is_object($this->model)) ? get_class($this->model) : $this->model;

            $this->model = new $model($id);
        }

        return $this;
    }
public function setModelId($id)
    {
        if (is_array($id)) {
            $this->modelId = $id;
        } else {
            $this->modelId = [$id];
        }

        // rebuild the model instance with ID
        if ($this->model) {
            $model = (is_object($this->model)) ? get_class($this->model) : $this->model;

            $this->model = new $model($id);
        }

        return $this;
    }
public function setModelId ( $ id ) { if ( is_array ( $ id ) ) { $ this -> modelId = $ id ; } else { $ this -> modelId = [ $ id ] ; } // rebuild the model instance with ID if ( $ this -> model ) { $ model = ( is_object ( $ this -> model ) ) ? get_class ( $ this -> model ) : $ this -> model ; $ this -> model = new $ model ( $ id ) ; } return $ this ; }
Sets the model ID.

@param mixed $id

@return $this
Sets the model ID .