Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
60 additions
and
146 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
/** | ||
* Context | ||
* | ||
* LICENSE | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this package in the file LICENSE.txt. | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to kontakt@beberlei.de so I can send you a copy immediately. | ||
*/ | ||
|
||
namespace Context; | ||
|
||
use Context\Engine; | ||
|
||
/** | ||
* Context Engine Proxy | ||
* | ||
* @author Benjamin Eberlei <kontakt@beberlei.de> | ||
*/ | ||
class Proxy | ||
{ | ||
private $engine; | ||
private $delegatee; | ||
private $options; | ||
|
||
public function __construct(Engine $engine, $delegatee, array $options) | ||
{ | ||
$this->engine = $engine; | ||
$this->delegatee = $delegatee; | ||
$this->options = $options; | ||
} | ||
|
||
public function __call($method, $args) | ||
{ | ||
$options = $this->options; | ||
$options['context'] = array($this->delegatee, $method); | ||
$options['arguments'] = $args; | ||
|
||
return $this->engine->execute($options); | ||
} | ||
} | ||
|
This file was deleted.
Oops, something went wrong.