/** * @interface TransformService **/ public function transform($model){ $kernel = new ServiceKernel(); $cl = new ComponentLoader(); $op = $cl->load("user.authenticate", ECROOT); $model = $kernel->run($op, $model); if(!$model['valid']) return $model; $op = $cl->load("user.available", ECROOT); $model = $kernel->run($op, $model); return $model; }
public function getContext($model){ $kernel = new ServiceKernel(); $cl = new ComponentLoader(); $op = $cl->load("user.authenticate", ECROOT); $model = $kernel->run($op, $model); if(!$model['valid']){ return $model; } $op = $cl->load("session.create", ECROOT); $model = $kernel->run($op, $model); return $model; }
/** * @interface TransformService **/ public function transform($model){ $kernel = new ServiceKernel(); $cl = new ComponentLoader(); $op = $cl->load("storage.create", ECROOT); $model = $kernel->run($op, $model); return $model; }
public function transform($model){ $kernel = new ServiceKernel(); $cl = new ComponentLoader(); $op = $cl->load("group.leaves", ECROOT); $model = $kernel->run($op, $model); return $model; }
/** * @interface TransformService **/ public function transform($model){ $kernel = new ServiceKernel(); $cl = new ComponentLoader(); $op = $cl->load("user.register", ECROOT); $model = $kernel->run($op, $model); if(!$model['valid']) return $model; $model['stgname'] = $model['stname']; $model['filename'] = ''; $model['mime'] = 'application/pdf'; $model['owner'] = $model['uid']; $model['access'] = 4; $model['groupid'] = 0; $model['dirid'] = ''; $op = $cl->load("storage.create", ECROOT); $model = $kernel->run($op, $model); return $model; }
$model = array(); $model['conn'] = $mysql; /** * Save the request host address and proxy address if any **/ if(isset($_SERVER['REMOTE_ADDR'])) $model['address'] = $_SERVER['REMOTE_ADDR']; if(isset($_SERVER["HTTP_X_FORWARDED_FOR"])) $model['address'] .= " / ".$_SERVER["HTTP_X_FORWARDED_FOR"]; /** * Configure the mail system **/ Mail::initialize($mail_delegate, $mail_value, $mail_user, $mail_pass, $mail_from); /** * Get the previous session if any **/ if(!isset($_COOKIE[$cookie_key])){ $model['valid'] = false; $model['uid'] = null; } else { $op = $cl->load("session.get", ECROOT); $model['sessionid'] = $_COOKIE[$cookie_key]; $model = $kernel->run($op, $model); } ?>