diff options
| author | polo <ordipolo@gmx.fr> | 2024-08-13 23:45:21 +0200 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2024-08-13 23:45:21 +0200 |
| commit | bf6655a534a6775d30cafa67bd801276bda1d98d (patch) | |
| tree | c6381e3f6c81c33eab72508f410b165ba05f7e9c /vendor/doctrine/orm/src/Query/Expr/Func.php | |
| parent | 94d67a4b51f8e62e7d518cce26a526ae1ec48278 (diff) | |
| download | AppliGestionPHP-bf6655a534a6775d30cafa67bd801276bda1d98d.tar.gz AppliGestionPHP-bf6655a534a6775d30cafa67bd801276bda1d98d.tar.bz2 AppliGestionPHP-bf6655a534a6775d30cafa67bd801276bda1d98d.zip | |
VERSION 0.2 doctrine ORM et entités
Diffstat (limited to 'vendor/doctrine/orm/src/Query/Expr/Func.php')
| -rw-r--r-- | vendor/doctrine/orm/src/Query/Expr/Func.php | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/vendor/doctrine/orm/src/Query/Expr/Func.php b/vendor/doctrine/orm/src/Query/Expr/Func.php new file mode 100644 index 0000000..cd9e8e0 --- /dev/null +++ b/vendor/doctrine/orm/src/Query/Expr/Func.php | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | <?php | ||
| 2 | |||
| 3 | declare(strict_types=1); | ||
| 4 | |||
| 5 | namespace Doctrine\ORM\Query\Expr; | ||
| 6 | |||
| 7 | use Stringable; | ||
| 8 | |||
| 9 | use function implode; | ||
| 10 | |||
| 11 | /** | ||
| 12 | * Expression class for generating DQL functions. | ||
| 13 | * | ||
| 14 | * @link www.doctrine-project.org | ||
| 15 | */ | ||
| 16 | class Func implements Stringable | ||
| 17 | { | ||
| 18 | /** @var mixed[] */ | ||
| 19 | protected array $arguments; | ||
| 20 | |||
| 21 | /** | ||
| 22 | * Creates a function, with the given argument. | ||
| 23 | * | ||
| 24 | * @psalm-param list<mixed>|mixed $arguments | ||
| 25 | */ | ||
| 26 | public function __construct( | ||
| 27 | protected string $name, | ||
| 28 | mixed $arguments, | ||
| 29 | ) { | ||
| 30 | $this->arguments = (array) $arguments; | ||
| 31 | } | ||
| 32 | |||
| 33 | public function getName(): string | ||
| 34 | { | ||
| 35 | return $this->name; | ||
| 36 | } | ||
| 37 | |||
| 38 | /** @psalm-return list<mixed> */ | ||
| 39 | public function getArguments(): array | ||
| 40 | { | ||
| 41 | return $this->arguments; | ||
| 42 | } | ||
| 43 | |||
| 44 | public function __toString(): string | ||
| 45 | { | ||
| 46 | return $this->name . '(' . implode(', ', $this->arguments) . ')'; | ||
| 47 | } | ||
| 48 | } | ||
