-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from adespresso/add-feature-interface
Add FeatureInterface
- Loading branch information
Showing
2 changed files
with
20 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
/** | ||
* @author Carlo Forghieri <[email protected]> | ||
*/ | ||
class Feature | ||
class Feature implements FeatureInterface | ||
{ | ||
/** | ||
* @var FeatureManager | ||
|
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace Ae\FeatureBundle\Service; | ||
|
||
/** | ||
* @author Simone Di Maulo <[email protected]> | ||
*/ | ||
interface FeatureInterface | ||
{ | ||
/** | ||
* Check if a feature (defined by name/parent) is granted to the logged user. | ||
* | ||
* @param string $name | ||
* @param string $parent | ||
* | ||
* @return bool | ||
*/ | ||
public function isGranted($name, $parent); | ||
} |