PHP code example of hassankhan / frontman
1. Go to this page and download the library: Download hassankhan/frontman library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
hassankhan / frontman example snippets
use Frontman\Proxy;
use Frontman\ProxyInterface;
class MyClass
{
public function foo()
{
echo 'Foo';
}
}
class MyOtherClass
{
protected $value;
public function __construct($value)
{
$this->value = $value;
}
public function bar()
{
echo 'Bar';
}
}
class MyProxy extends Proxy implements ProxyInterface
{
public static function getRealClass()
{
return 'MyClass';
}
}
class MyOtherProxy extends Proxy implements ProxyInterface
{
public static function getRealClass()
{
return 'MyOtherClass';
}
public static function getConstructorArguments()
{
return array('5');
}
}
MyProxy::foo(); // 'Foo'
MyOtherProxy::bar(); // 'Bar'