public function getModel($id)
    {
        if (!$this->hasModel($id)) {
            throw new \InvalidArgumentException("No model found named $id");
        }

        // Lazily create models as they are retrieved
        if (!($this->models[$id] instanceof Parameter)) {
            $this->models[$id] = new Parameter(
                $this->models[$id],
                ['description' => $this]
            );
        }

        return $this->models[$id];
    }
public function getModel($id)
    {
        if (!$this->hasModel($id)) {
            throw new \InvalidArgumentException("No model found named $id");
        }

        // Lazily create models as they are retrieved
        if (!($this->models[$id] instanceof Parameter)) {
            $this->models[$id] = new Parameter(
                $this->models[$id],
                ['description' => $this]
            );
        }

        return $this->models[$id];
    }
public function getModel ( $ id ) { if ( ! $ this -> hasModel ( $ id ) ) { throw new \ InvalidArgumentException ( "No model found named $id" ) ; } // Lazily create models as they are retrieved if ( ! ( $ this -> models [ $ id ] instanceof Parameter ) ) { $ this -> models [ $ id ] = new Parameter ( $ this -> models [ $ id ] , [ 'description' => $ this ] ) ; } return $ this -> models [ $ id ] ; }
Get a shared definition structure.

@param string $id ID/name of the model to retrieve

@return Parameter
@throws \InvalidArgumentException if the model is not found
Get a shared definition structure .