REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.61 KB
Close
/opt/cpanel/ea-wappspector/vendor/php-di/php-di/src/Definition/ObjectDefinition/MethodInjection.php
Text
Base64
<?php declare(strict_types=1); namespace DI\Definition\ObjectDefinition; use DI\Definition\Definition; /** * Describe an injection in an object method. * * @author Matthieu Napoli <matthieu@mnapoli.fr> */ class MethodInjection implements Definition { /** * @param mixed[] $parameters */ public function __construct( private string $methodName, private array $parameters = [], ) { } public static function constructor(array $parameters = []) : self { return new self('__construct', $parameters); } public function getMethodName() : string { return $this->methodName; } /** * @return mixed[] */ public function getParameters() : array { return $this->parameters; } /** * Replace the parameters of the definition by a new array of parameters. */ public function replaceParameters(array $parameters) : void { $this->parameters = $parameters; } public function merge(self $definition) : void { // In case of conflicts, the current definition prevails. $this->parameters += $definition->parameters; } public function getName() : string { return ''; } public function setName(string $name) : void { // The name does not matter for method injections } public function replaceNestedDefinitions(callable $replacer) : void { $this->parameters = array_map($replacer, $this->parameters); } public function __toString() : string { return sprintf('method(%s)', $this->methodName); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 2
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
MethodInjection.php
1.61 KB
lrw-r--r--
2025-08-16 11:10:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
PropertyInjection.php
1.42 KB
lrw-r--r--
2025-08-16 11:10:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).