src/Norm/Controller/NormController.php
public function routeModel($key)
    {
        if (! isset($this->routeModels[$key])) {
            $Clazz = Inflector::classify($key);

            $collection = Norm::factory($this->schema($key)->get('foreign'));

            $this->routeModels[$key] = $collection->findOne($this->routeData($key));
        }

        return $this->routeModels[$key];
    }
public function routeModel($key)
    {
        if (! isset($this->routeModels[$key])) {
            $Clazz = Inflector::classify($key);

            $collection = Norm::factory($this->schema($key)->get('foreign'));

            $this->routeModels[$key] = $collection->findOne($this->routeData($key));
        }

        return $this->routeModels[$key];
    }
public function routeModel ( $ key ) { if ( ! isset ( $ this -> routeModels [ $ key ] ) ) { $ Clazz = Inflector :: classify ( $ key ) ; $ collection = Norm :: factory ( $ this -> schema ( $ key ) -> get ( 'foreign' ) ) ; $ this -> routeModels [ $ key ] = $ collection -> findOne ( $ this -> routeData ( $ key ) ) ; } return $ this -> routeModels [ $ key ] ; }
Register a route model.

@param string $key

@return mixed
Register a route model .