PHP code example of gephart / annotation
1. Go to this page and download the library: Download gephart/annotation 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/ */
gephart / annotation example snippets
/**
* @Route /home/
*/
class SuperClass
{
/**
* @Template {
* "url": "index.html"
* }
*/
public function index()
{
}
}
$reader = new \Gephart\Annotation\Reader();
$annotation = $reader->get("Route", SuperClass::class);
// /home/
$annotation = $reader->get("Template", SuperClass::class, "index);
// ["url"=>"index.html"]