protected function setDataFromModel(ModelInterface $model): void
    {
        $this->container->set('model', $model);
        
        foreach (get_class_methods($model) as $method) {
            if (0 !== strpos($method, 'get')) {
                continue;
            }
            
            $this->data[strtolower(substr($method, 3))] = $model->$method();
        }
    }
protected function setDataFromModel(ModelInterface $model): void
    {
        $this->container->set('model', $model);
        
        foreach (get_class_methods($model) as $method) {
            if (0 !== strpos($method, 'get')) {
                continue;
            }
            
            $this->data[strtolower(substr($method, 3))] = $model->$method();
        }
    }
protected function setDataFromModel ( ModelInterface $ model ) : void { $ this -> container -> set ( 'model' , $ model ) ; foreach ( get_class_methods ( $ model ) as $ method ) { if ( 0 !== strpos ( $ method , 'get' ) ) { continue ; } $ this -> data [ strtolower ( substr ( $ method , 3 ) ) ] = $ model -> $ method ( ) ; } }
This implementation calls all methods with prefix `get` from model.
Implementation may be overridden in inherited method
to call only necessary model methods dependently from parameters.
@param \Ufo\Modules\ModelInterface $model
@return void
This implementation calls all methods with prefix get from model . Implementation may be overridden in inherited method to call only necessary model methods dependently from parameters .