private function boxIfModel(\RedBean_OODBBean $bean) { $model = $bean->box(); if (!$model instanceof Model) { return $bean; } $model->bindApp($this->app); return $model; }