/** * Clear authorization token * * @param Facade $facade * @param bool $clearToken */ private function clearToken(Facade $facade, $clearToken) { if ($clearToken && $facade->isValid()) { $user = $facade->get(); $user->setToken(''); $user->save(); } }
/** * @param array $arguments */ public function __construct(Request $request, Router $router, Facade $user, array $arguments) { if (!isset($arguments[0]) || empty($arguments[0])) { throw new \RuntimeException('Image not specified'); } $this->router = $router; $this->request = $request; $this->skin = $user->get()->config()->skin; $this->prepareAttributes($arguments); $this->isModule = isset($arguments[2]) && $arguments[2] === true ? true : false; $this->imgTag = isset($arguments[3]) && $arguments[3] === false ? false : true; $this->img = $arguments[0]; }
public function __construct(Request $request, Facade $user) { $this->request = $request; $this->userLocale = $user->get()->config()->lng; }