1. Go to this page and download the library: Download larachimp/pine-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/ */
// Read all class annotations on property.
$annotations = AnnotationsReader::target('property', 'name')->only(PropertyDoubleAnnotation::class)
->read(Baz::class);
class Baz
{
/**
* Some method that does somethin.
*
* @MethodAnnotation(bar="Way")
* @MethodDoubleAnnotation(bar="Otwell")
*
* @return string
*/
public function someMethod()
{
return 'I did something.';
}
}
// Read all class annotations on property.
$annotations = AnnotationsReader::target('method', 'someMethod')->read(Baz::class);
class Baz
{
/**
* Some method that does somethin.
*
* @MethodAnnotation(bar="Way")
* @MethodDoubleAnnotation(bar="Otwell")
*
* @return string
*/
public function someMethod()
{
return 'I did something.';
}
}
// Read all class annotations on property.
$annotations = AnnotationsReader::target('method', 'someMethod')->only(MethodDoubleAnnotation::class)
->read(Baz::class);