Created
May 25, 2024 10:30
-
-
Save cystbear/ca2fb4540e15a97db1d0357b0019ad33 to your computer and use it in GitHub Desktop.
Decorator
This file contains hidden or 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
<?php | |
namespace App; | |
class Decorator | |
{ | |
private $inner; | |
public function __construct($inner) | |
{ | |
$this->inner = $inner; | |
} | |
public function __call($name, ...$arguments) | |
{ | |
return $this->inner->$name($arguments); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment