WowPress-Tailwind/theme/vendor/illuminate/support/HigherOrderTapProxy.php

39 lines
665 B
PHP
Raw Permalink Normal View History

2024-04-15 16:00:49 +02:00
<?php
namespace Illuminate\Support;
class HigherOrderTapProxy
{
/**
* The target being tapped.
*
* @var mixed
*/
public $target;
/**
* Create a new tap proxy instance.
*
* @param mixed $target
* @return void
*/
public function __construct($target)
{
$this->target = $target;
}
/**
* Dynamically pass method calls to the target.
*
* @param string $method
* @param array $parameters
* @return mixed
*/
public function __call($method, $parameters)
{
$this->target->{$method}(...$parameters);
return $this->target;
}
}