1. Go to this page and download the library: Download phppkg/annotations 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/ */
phppkg / annotations example snippets
composer
/**
* @Defaults(name="user1", lastname = "sample", age='0', address={country=USA, state=NY}, phone="000-00000000")
* @assertResult(false)
* @cache(collation = UTF-8)
*/
class User
{
/**
* @cache(true)
* @type(json)
* @limits(start=10, limit=50)
*/
function load(){
}
/**
* create a record
*
* @Permission(view)
* @Permission(edit)
* @Role(administrator)
*/
public function create()
{
}
}
$annotations = new PhpPkg\Annotations\Annotations();
$result = $annotations->getClassAnnotations('User');
print_r($result);