/** * @param array $attributes */ public function __construct(array $attributes = array()) { parent::__construct($attributes); // set the table name $this->table = Reader::getTableName(); }
/** * @param null|SessionManager $oSessionManager */ public function setSessionManager($oSessionManager) { $this->oSessionManager = $oSessionManager; // save it to the session here \Session::flash(Reader::getSessionKeyName(), $oSessionManager); }
/** */ public function setStartTime() { // set the time to the start of laravel $this->fStartTimeStore = Reader::includeLaravelBootTime() ? LARAVEL_START : microtime(true); }
/** * This should be set on the controller class * @return array|mixed */ private function getCustomSuppliedData() { $aOverLoadedData = []; $sOverLoadedFunction = Reader::getCustomDataMethodName(); $oRouteInstance = \Route::current(); $action = $oRouteInstance->getAction(); $sController = null; $sMethod = null; if (isset($action['controller']) && strpos($action['controller'], '@') !== false) { list($sController, $sMethod) = explode('@', $action['controller']); if (class_exists($sController)) { $oReflector = new \ReflectionClass($sController); if ($oReflector->hasMethod($sOverLoadedFunction)) { //if($oReflector->hasMethod($sOverLoadedFunction) && $oReflector->isSubclassOf(Controller::class)){ $aOverLoadedData = call_user_func([$sController, "accessHistoryExtraData"]); $aOverLoadedData = is_array($aOverLoadedData) ? $aOverLoadedData : []; } } } $aOverLoadedData['class_controller'] = $sController; return $aOverLoadedData; }
/** * Reverse the migrations. * * @return void */ public function down() { $sTable = Reader::getTableName(); Schema::dropIfExists($sTable); }