Check for required session table columns

@return void
@throws Zend_Session_SaveHandler_Exception
421165
protected function _checkRequiredColumns()
    {
        if ($this->_modifiedColumn === null) {
            /**
             * @see Zend_Session_SaveHandler_Exception
             */
            // require_once 'Zend/Session/SaveHandler/Exception.php';

            throw new Zend_Session_SaveHandler_Exception(
                "Configuration must define '" . self::MODIFIED_COLUMN . "' which names the "
              . "session table last modification time column.");
        } else if ($this->_lifetimeColumn === null) {
            /**
             * @see Zend_Session_SaveHandler_Exception
             */
            // require_once 'Zend/Session/SaveHandler/Exception.php';

            throw new Zend_Session_SaveHandler_Exception(
                "Configuration must define '" . self::LIFETIME_COLUMN . "' which names the "
              . "session table lifetime column.");
        } else if ($this->_dataColumn === null) {
            /**
             * @see Zend_Session_SaveHandler_Exception
             */
            // require_once 'Zend/Session/SaveHandler/Exception.php';

            throw new Zend_Session_SaveHandler_Exception(
                "Configuration must define '" . self::DATA_COLUMN . "' which names the "
              . "session table data column.");
        }
    }
1017049
protected function _validateSession()
    {
        if ($this->getIsNewSession() === true) {
            $this->setSessionParam('setup_session', true);
        } elseif ($this->getSessionParam('setup_session') !== true) {
            $sNewSid = $this->_getNewSessionID();
            session_write_close();

            session_id($sNewSid);
            session_start();
            $this->setSessionParam('setup_session', true);
        }

        return session_id();
    }
312777
private function checkModelRequirements() {
        $reload = false;
        $classAnnots = $this->getAnnotations()->getClass();
        if (!empty($classAnnots[1]) && is_array($classAnnots[1])) {
            foreach ($classAnnots[1] as $desc) {
                if (strtolower(substr($desc, 0, 4)) !== 'dbs\\')
                    continue;
                $this->performClassAnnots($desc);
                $reload = true;
            }
        }

        if ($reload) {
            @session_start();
            $_SESSION['mapperSave'] = true;
            header('Location: //' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);
            exit;
        }
    }
1332696
public function checkTable()
    {
        return is_string($this->table_name = $this->table_descriptor->getStorageName()) &&
            $this->table_descriptor->hasFields() &&
            $this->checkPrimaryConstraint()
        ;
    }
765952
protected function _mysql()
	{
		$this->_msg( 'Changing typeid to not allow NULL values', 0 );
		$this->_status( '' );

		foreach ( $this->_mysql as $table => $stmt ) {
			$this->_msg( sprintf ( 'Checking table "%1$s": ', $table ), 1 );

			if ( $this->_schema->tableExists( $table ) === true
				&& $this->_schema->columnExists( $table, 'typeid' ) === true
				&& $this->_schema->getColumnDetails( $table, 'typeid' )->isNullable() === true )
			{
				$this->_executeList( $stmt );
				$this->_status( 'migrated' );
			} else {
				$this->_status( 'OK' );
			}
		}
	}
1064240
protected function checkColumns()
	{
		$success = false;

		if ( ! empty($this->form_input['columns']) )
		{
			$success = true;
		}
		else
		{
			$this->appendError("No_columns","No column name setted: you need to fill atleast one \"column_\" field");
		}

		return $success;
	}
476838
public function check(Table $table)
    {
        foreach ($table->getColumns() as $id => $params) {
            if (!isset($params['sql_id']))
                throw new \Exception("No 'sql_id' param for ID $id");
        }

        $backupSqlWhere = $this->sqlWhere;
        $backupSqlParams = $this->sqlParams;

        $columns = $table->getColumns();
        $successfulFilters = [];
        foreach ($table->getFilters() as $column => $filters) {
            $successfulNames = [];
            foreach ($filters as $name => $value) {
                if ($this->buildFilter($columns[$column]['sql_id'], $columns[$column]['type'], $name, $value))
                    $successfulNames[$name] = $value;
            }
            if (count($successfulNames) > 0)
                $successfulFilters[$column] = $successfulNames;
        }
        $table->setFilters($successfulFilters);

        $this->sqlWhere = $backupSqlWhere;
        $this->sqlParams = $backupSqlParams;
    }
420985
public function validateModelClass()
    {
        if ($this->isReservedKeyword($this->modelClass)) {
            $this->addError('modelClass', 'Class name cannot be a reserved PHP keyword.');
        }
        if ((empty($this->indexName) || substr_compare($this->indexName, '*', -1, 1)) && $this->modelClass == '') {
            $this->addError('modelClass', 'Model Class cannot be blank if table name does not end with asterisk.');
        }
    }
408006
private function check_tables() {
		$tab = new AdminStoreTables();
		$tab::init($this);
		$force = $this->force_create_table;
		if ($tab::exists($force)) {
			if (!$force)
				$tab::upgrade();
			$tab::deinit();
			return;
		}
		$tab::install($this->expiration);
		$tab::deinit();
	}
258894
protected function define_table_columns() {
        // Define headers and columns.
        $cols = array(
            'name' => get_string('name', 'cohort'),
            'idnumber' => get_string('idnumber', 'cohort'),
        );

        if ($this->template->can_manage()) {
            $cols['actions'] = get_string('actions');
        }

        $this->define_columns(array_keys($cols));
        $this->define_headers(array_values($cols));
    }
373247
private function checkMissingAndAdd()
    {
        /** @var \Magento\Checkout\Model\Session $checkoutSession */
        $checkoutSession = $this->checkoutSession->create();
        $currentQuote = $checkoutSession->getQuote();

        if ($currentQuote->hasItems()) {
            $currentSessionItems = $currentQuote->getAllItems();
            $currentItemIds = [];

            foreach ($currentSessionItems as $currentSessionItem) {
                $currentItemIds[] = $currentSessionItem->getId();
            }
            /** @var \Magento\Quote\Model\Quote\Item $item */
            foreach ($this->quote->getAllItems() as $item) {
                if (!in_array($item->getId(), $currentItemIds)) {
                    $currentQuote->addItem($item);
                }
            }
            $currentQuote->collectTotals();

            $this->quoteResource->save($currentQuote);
        }
    }
233938
protected function needToSortColumns()
    {
        foreach ($this->config->getColumns() as $column) {
            if ($column->getOrder() !== 0) {
                return true;
            }
        }
        return false;
    }
449030
public function handleShowAllColumns()
	{
		$this->deleteSessionData('_grid_hidden_columns');
		$this->saveSessionData('_grid_hidden_columns_manipulated', true);

		$this->redrawControl();

		$this->onRedraw();
	}
1050778
private void setSessionsTableColumnSizes() {

		sessionsTable.getColumnModel().getColumn(0).setMinWidth(60);
		sessionsTable.getColumnModel().getColumn(0).setPreferredWidth(60); // active

		sessionsTable.getColumnModel().getColumn(1).setMinWidth(120);
		sessionsTable.getColumnModel().getColumn(1).setPreferredWidth(200); // name

		sessionsTable.getColumnModel().getColumn(3).setMinWidth(100);
		sessionsTable.getColumnModel().getColumn(3).setPreferredWidth(150); // matched
	}
219749
protected function init()
    {
        $config = self::getConfig();

        // validate that headers have not already been sent
        if (headers_sent()) {
            throw new SessionException('Unable to register session handler because headers have already been sent.');
        }

        // remove any shut down functions
        session_register_shutdown();

        // get the driver
        $saveHandler = $config->get('Storage.Driver', NativeStorage::class);

        try {
            // try to create driver instance
            $saveHandler = new $saveHandler($config);

            // register driver as session handler
            session_set_save_handler($saveHandler, false);

            // start the session
            if (session_status() == PHP_SESSION_NONE) {
                session_start();
            }

            // get session id
            $this->sessionId = session_id();

            // save current session locally
            $this->sessionBag = $this->arr($_SESSION);
        } catch (\Exception $e) {
            throw new SessionException($e->getMessage());
        }
    }
447981
public function handleShowDefaultColumns()
	{
		$this->deleteSessionData('_grid_hidden_columns');
		$this->saveSessionData('_grid_hidden_columns_manipulated', false);

		$this->redrawControl();

		$this->onRedraw();
	}
229115
private function checkBeforeUpdate()
    {
        if (0 <= version_compare(BBApplication::VERSION, '1.1')) {
            $schemaManager = $this->em->getConnection()->getSchemaManager();
            $pageName = $this->em->getClassMetadata('BackBee\NestedNode\Page')->getTableName();
            $sectionName = $this->em->getClassMetadata('BackBee\NestedNode\Section')->getTableName();

            if (false === $schemaManager->tablesExist($sectionName) && true === $schemaManager->tablesExist($pageName)) {
                throw new BBException(sprintf('Table `%s` does not exist. Perhaps you should launch bbapp:upgradeToPageSection command before.', $sectionName));
            }
        }
    }