<?php
 class vB_Session_Cli extends vB_Session { public static function getSession($userId, $sessionHash = '', $dBAssertor = null, $datastore = null, $config = null) { $dBAssertor = ($dBAssertor) ? $dBAssertor : vB::getDbAssertor(); $datastore = ($datastore) ? $datastore : vB::getDatastore(); $config = ($config) ? $config : vB::getConfig(); $session = new vB_Session_Cli($dBAssertor, $datastore, $config, $userId); return $session; } public function __construct(&$dBAssertor, &$datastore, &$config, $userid) { $restoreSessionInfo = ['userid' => $userid]; parent::__construct($dBAssertor, $datastore, $config, '', $restoreSessionInfo); $this->set('userid', $userid); $_SERVER['HTTP_HOST'] = 'commandline'; } protected function loadExistingSession($sessionhash, $restoreSessionInfo, $deferRememberMe = false) { return false; } protected function createSessionIdHash() { $this->sessionIdHash = md5('session_' . microtime()); } public function save() { return false; } } 