Skip to content

Commit 772fbf5

Browse files
committed
feat: Added value injection param
1 parent ed5d831 commit 772fbf5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Decorators/Filter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,9 @@ protected function fire_hook( mixed ...$args ): mixed {
225225
protected function get_cb_args( array $args ): array {
226226
if ( $this->params ) {
227227
foreach ( $this->params as $param ) {
228-
$args[] = $this->container->get( $param );
228+
$args[] = ! \str_starts_with( $param, '!value:' )
229+
? $this->container->get( $param )
230+
: \str_replace( '!value:', '', $param );
229231
}
230232

231233
$args[] = $this;

0 commit comments

Comments
 (0)