Login working

This commit is contained in:
Deon George
2018-12-11 23:31:44 +11:00
parent 4d65bb05a1
commit e60a7d9045
14 changed files with 289 additions and 92 deletions

View File

@@ -0,0 +1,38 @@
<?php
namespace App\Classes\Frame;
use Illuminate\Support\Facades\Log;
use App\Classes\Server;
use App\User;
abstract class Action
{
const prefix = 'App\Classes\Frame\Action\\';
public $so = NULL;
public $uo = NULL;
public $action = NULL;
public $mode = NULL;
public $page = [];
public function __construct(Server $so,User $uo,int $action,int $mode)
{
$this->so = $so;
$this->uo = $uo;
$this->action = $action;
$this->mode = $mode;
}
public static function factory(string $class,Server $so,User $uo,int $action,int $mode)
{
$c = self::prefix.$class;
$o = class_exists($c) ? new $c($so,$uo,$action,$mode) : FALSE;
$so->log('debug',sprintf(($o ? 'Executing: %s' : 'Class doesnt exist: %s'),$c));
return $o;
}
abstract public function handle(array $fielddata);
}