-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Events for Feature Updates and More (#59)
* + Added more events * - No scope or value, so drop serialization * ~ Fixed after review * formatting --------- Co-authored-by: Taylor Otwell <taylor@laravel.com>
- Loading branch information
1 parent
9c0d9ef
commit 50e3a73
Showing
8 changed files
with
326 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace Laravel\Pennant\Events; | ||
|
||
class AllFeaturesPurged | ||
{ | ||
// | ||
} |
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,36 @@ | ||
<?php | ||
|
||
namespace Laravel\Pennant\Events; | ||
|
||
use Illuminate\Queue\SerializesModels; | ||
|
||
class FeatureDeleted | ||
{ | ||
use SerializesModels; | ||
|
||
/** | ||
* The feature name. | ||
* | ||
* @var string | ||
*/ | ||
public $feature; | ||
|
||
/** | ||
* The scope of the feature deletion. | ||
* | ||
* @var mixed | ||
*/ | ||
public $scope; | ||
|
||
/** | ||
* Create a new event instance. | ||
* | ||
* @param string $feature | ||
* @param mixed $scope | ||
*/ | ||
public function __construct($feature, $scope) | ||
{ | ||
$this->feature = $feature; | ||
$this->scope = $scope; | ||
} | ||
} |
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,45 @@ | ||
<?php | ||
|
||
namespace Laravel\Pennant\Events; | ||
|
||
use Illuminate\Queue\SerializesModels; | ||
|
||
class FeatureUpdated | ||
{ | ||
use SerializesModels; | ||
|
||
/** | ||
* The feature name. | ||
* | ||
* @var string | ||
*/ | ||
public $feature; | ||
|
||
/** | ||
* The scope of the feature update. | ||
* | ||
* @var mixed | ||
*/ | ||
public $scope; | ||
|
||
/** | ||
* The new feature value. | ||
* | ||
* @var mixed | ||
*/ | ||
public $value; | ||
|
||
/** | ||
* Create a new event instance. | ||
* | ||
* @param string $feature | ||
* @param mixed $scope | ||
* @param mixed $value | ||
*/ | ||
public function __construct($feature, $scope, $value) | ||
{ | ||
$this->feature = $feature; | ||
$this->scope = $scope; | ||
$this->value = $value; | ||
} | ||
} |
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,37 @@ | ||
<?php | ||
|
||
namespace Laravel\Pennant\Events; | ||
|
||
use Illuminate\Queue\SerializesModels; | ||
|
||
class FeatureUpdatedForAllScopes | ||
{ | ||
use SerializesModels; | ||
|
||
/** | ||
* The feature name. | ||
* | ||
* @var string | ||
*/ | ||
public $feature; | ||
|
||
/** | ||
* The new feature value. | ||
* | ||
* @var mixed | ||
*/ | ||
public $value; | ||
|
||
/** | ||
* Create a new event instance. | ||
* | ||
* @param string $feature | ||
* @param mixed $scope | ||
* @param mixed $value | ||
*/ | ||
public function __construct($feature, $value) | ||
{ | ||
$this->feature = $feature; | ||
$this->value = $value; | ||
} | ||
} |
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,23 @@ | ||
<?php | ||
|
||
namespace Laravel\Pennant\Events; | ||
|
||
class FeaturesPurged | ||
{ | ||
/** | ||
* The feature names. | ||
* | ||
* @var array | ||
*/ | ||
public $features; | ||
|
||
/** | ||
* Create a new event instance. | ||
* | ||
* @param array $features | ||
*/ | ||
public function __construct($features) | ||
{ | ||
$this->features = $features; | ||
} | ||
} |
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
Oops, something went wrong.