-
Notifications
You must be signed in to change notification settings - Fork 29
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 #223 from koriym/pecl-aop
Extract PECL code from Aspect to PeclAspect
- Loading branch information
Showing
18 changed files
with
452 additions
and
262 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Ray\Aop\Demo; | ||
|
||
use Ray\Aop\Aspect; | ||
use Ray\Aop\Matcher; | ||
use RuntimeException; | ||
|
||
use const PHP_EOL; | ||
|
||
require __DIR__ . '/bootstrap.php'; | ||
|
||
$aspect = new Aspect(__DIR__ . '/tmp'); | ||
$aspect->bind( | ||
(new Matcher())->any(), | ||
new IsContainsMatcher('charge'), | ||
[new WeekendBlocker()] | ||
); | ||
$aspect->weave(__DIR__. '/src'); | ||
|
||
try { | ||
$billingService = new RealBillingService(); | ||
echo $billingService->chargeOrder(); | ||
} catch (RuntimeException $e) { | ||
echo $e->getMessage() . PHP_EOL; | ||
exit(1); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: "#^Used function method_intercept not found\\.$#" | ||
count: 1 | ||
path: src/AspectPecl.php |
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,3 +1,5 @@ | ||
includes: | ||
- phpstan-baseline.neon | ||
parameters: | ||
phpVersion: 80200 | ||
level: max | ||
|
Oops, something went wrong.