PHP code example of esd / esd-server

1. Go to this page and download the library: Download esd/esd-server 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/ */

    

esd / esd-server example snippets


$this->addPlug(new EasyRoutePlugin());
$this->addPlug(new ScheduledPlugin());
$this->addPlug(new RedisPlugin());
$this->addPlug(new MysqlPlugin());
$this->addPlug(new AutoreloadPlugin());
$this->addPlug(new AopPlugin());

/**
 * @RestController("user")
 * Class CUser
 * @package ESD\Examples\Controller
 */
class CUser extends Base
{
    /**
     * @Inject()
     * @var UserService
     */
    private $userService;

    /**
     * @GetMapping("login")
     * @return string
     */
    public function login()
    {
    }
}

$this->addAspect(new MyAspect);

/**
 * @param MethodInvocation $invocation Invocation
 *
 * @Around("@execution(ESD\Plugins\Mysql\Annotation\Transactional)")
 * @return mixed
 * @throws \Throwable
 */
public function aroundTransactional(MethodInvocation $invocation)