-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
自定义组件支持别名配置 (swoft-cloud/swoft-component#181)
* 增加自定义组件支持别名的单测 * 让组件地址支持别名
- Loading branch information
1 parent
8ad44b7
commit f9256a5
Showing
6 changed files
with
71 additions
and
2 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
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,27 @@ | ||
<?php | ||
namespace SwoftTest\Testing\Bean; | ||
|
||
use Swoft\Bean\Annotation\Bean; | ||
use Swoft\Bean\Annotation\Value; | ||
|
||
/** | ||
* Class Config | ||
* @Bean | ||
* @package SwoftTest\Testing\Bean | ||
*/ | ||
class Config | ||
{ | ||
/** | ||
* @Value(env="${TEST_NAME}") | ||
* @var string | ||
*/ | ||
public $name = 'fail'; | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getName(): string | ||
{ | ||
return $this->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,27 @@ | ||
<?php | ||
namespace SwoftTest\Testing\Bean2; | ||
|
||
use Swoft\Bean\Annotation\Bean; | ||
use Swoft\Bean\Annotation\Value; | ||
|
||
/** | ||
* Class Config | ||
* @Bean | ||
* @package SwoftTest\Testing\Bean | ||
*/ | ||
class Config | ||
{ | ||
/** | ||
* @Value(env="${TEST_NAME}") | ||
* @var string | ||
*/ | ||
public $name = 'fail'; | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getName(): string | ||
{ | ||
return $this->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