Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php namespace Latheesan\Repo\Session;
- use Cartalyst\Sentry\Sentry;
- use Latheesan\Repo\RepoAbstract;
- class SentrySession extends RepoAbstract implements SessionInterface {
- /**
- * @var Sentry
- */
- protected $sentry;
- /**
- * @var \Cartalyst\Sentry\Throttling\ProviderInterface
- */
- protected $throttleProvider;
- /**
- * @param Sentry $sentry
- */
- public function __construct(Sentry $sentry)
- {
- // Sentry instance
- $this->sentry = $sentry;
- // Get the Throttle Provider
- $this->throttleProvider = $this->sentry->getThrottleProvider();
- // Enable the Throttling Feature
- $this->throttleProvider->enable();
- }
- /**
- * Store a newly created resource in storage.
- *
- * @param $data
- * @return Response
- */
- public function store($data)
- {
- // snipped
- }
- /**
- * Remove the specified resource from storage.
- *
- * @return Response
- */
- public function destroy()
- {
- $this->sentry->logout();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement