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 #870 from spiral/feature/core-scopes: container wi…
…th isolated scopes
- Loading branch information
Showing
59 changed files
with
2,012 additions
and
260 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,19 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Spiral\Core\Attribute; | ||
|
||
/** | ||
* Define a finalize method for the class. | ||
* | ||
* @internal We are testing this feature, it may be changed in the future. | ||
*/ | ||
#[\Attribute(\Attribute::TARGET_CLASS)] | ||
final class Finalize | ||
{ | ||
public function __construct( | ||
public string $method, | ||
) { | ||
} | ||
} |
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 | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Spiral\Core\Attribute; | ||
|
||
/** | ||
* Set a scope in which the dependency can be resolved. | ||
* | ||
* @internal We are testing this feature, it may be changed in the future. | ||
*/ | ||
#[\Attribute(\Attribute::TARGET_CLASS)] | ||
final class Scope | ||
{ | ||
public function __construct( | ||
public string $name, | ||
) { | ||
} | ||
} |
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,13 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Spiral\Core\Attribute; | ||
|
||
/** | ||
* Mark class as singleton. | ||
*/ | ||
#[\Attribute(\Attribute::TARGET_CLASS)] | ||
final class Singleton | ||
{ | ||
} |
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
Oops, something went wrong.