public function initWithModelAndAdapter(Model $m, $adapter)
    {
        $this->adapter = $adapter;

        $this->model = $m;
        $this->model->printModel();

        $this->fm = Model::loadFunctionMap();

        $this->initialize();

        if (null !== $this->adapter) {
            try {
                $this->loadPolicy();
            } catch (\Exception $e) {
                // error intentionally ignored
            }
        }
    }
public function initWithModelAndAdapter(Model $m, $adapter)
    {
        $this->adapter = $adapter;

        $this->model = $m;
        $this->model->printModel();

        $this->fm = Model::loadFunctionMap();

        $this->initialize();

        if (null !== $this->adapter) {
            try {
                $this->loadPolicy();
            } catch (\Exception $e) {
                // error intentionally ignored
            }
        }
    }
public function initWithModelAndAdapter ( Model $ m , $ adapter ) { $ this -> adapter = $ adapter ; $ this -> model = $ m ; $ this -> model -> printModel ( ) ; $ this -> fm = Model :: loadFunctionMap ( ) ; $ this -> initialize ( ) ; if ( null !== $ this -> adapter ) { try { $ this -> loadPolicy ( ) ; } catch ( \ Exception $ e ) { // error intentionally ignored } } }
initWithModelAndAdapter initializes an enforcer with a model and a database adapter.

@param Model        $m
@param Adapter|null $adapter
initWithModelAndAdapter initializes an enforcer with a model and a database adapter .