This repository has been archived by the owner on Sep 19, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Work towards better scope support & docs. Laravel ServiceProvider and…
… Facade
- Loading branch information
Showing
4 changed files
with
126 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,41 @@ | ||
<?php namespace Deefour\Aide\Authorization; | ||
|
||
/** | ||
* Base scope class all application scopes are encouraged to extend. Aide | ||
* expects a `resolve` method to be present on the scope | ||
*/ | ||
abstract class AbstractScope { | ||
|
||
/** | ||
* The user | ||
* | ||
* @var mixed | ||
*/ | ||
protected $user; | ||
|
||
/** | ||
* The | ||
* | ||
* @var mixed | ||
*/ | ||
protected $scope; | ||
|
||
|
||
/** | ||
* Sets expectations for dependencies on the policy class and stores references | ||
* to them locally. | ||
* | ||
* @param mixed $user | ||
* @param mixed $scope | ||
*/ | ||
public function __construct($user, $scope) { | ||
$this->user = $user; | ||
$this->scope = $scope; | ||
} | ||
|
||
/** | ||
* | ||
*/ | ||
abstract public function resolve(); | ||
|
||
} |
Empty file.