-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
1,188 additions
and
569 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
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
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,45 @@ | ||
<?php | ||
|
||
namespace mgboot\core\annotation; | ||
|
||
use Doctrine\Common\Annotations\Annotation\Target; | ||
use mgboot\constant\Regexp; | ||
|
||
/** | ||
* @Annotation | ||
* @Target("ANNOTATION") | ||
*/ | ||
final class MapBind | ||
{ | ||
/** | ||
* @var string[] | ||
*/ | ||
private $rules; | ||
|
||
public function __construct($arg0 = null) | ||
{ | ||
$rules = []; | ||
|
||
if (is_string($arg0) && $arg0 !== '') { | ||
$rules = preg_split(Regexp::COMMA_SEP, $arg0); | ||
} else if (is_array($arg0) && !empty($arg0)) { | ||
foreach ($arg0 as $s1) { | ||
if (!is_string($s1) || $s1 === '') { | ||
continue; | ||
} | ||
|
||
$rules[] = $s1; | ||
} | ||
} | ||
|
||
$this->rules = $rules; | ||
} | ||
|
||
/** | ||
* @return string[] | ||
*/ | ||
public function getRules(): array | ||
{ | ||
return $this->rules; | ||
} | ||
} |
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,30 @@ | ||
<?php | ||
|
||
namespace mgboot\core\annotation; | ||
|
||
use Doctrine\Common\Annotations\Annotation\Target; | ||
|
||
/** | ||
* @Annotation | ||
* @Target("METHOD") | ||
*/ | ||
final class ParamInject | ||
{ | ||
/** | ||
* @var array | ||
*/ | ||
private $value; | ||
|
||
public function __construct(array $values) | ||
{ | ||
$this->value = $values; | ||
} | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public function getValue(): array | ||
{ | ||
return $this->value; | ||
} | ||
} |
Oops, something went wrong.