Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use AnnotationReader instead of SimpleAnnotationReader #52

Open
ghost opened this issue Jan 2, 2017 · 0 comments
Open

Use AnnotationReader instead of SimpleAnnotationReader #52

ghost opened this issue Jan 2, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented Jan 2, 2017

Hello i wanted to ask you why don't you use AnnotationReader instead of SimpleAnnotationReader. If you will use AnnotationReader you can do this:

use Dingo\Blueprint\Annotation as BP;
use Dingo\Blueprint\Annotation\Method as BPM;

/**
 * @BP\Resource("Test")
 */
class TestController extends Controller
{
    /**
     * Ask for new service
     *
     * @BPM\Get("/test")
     * @BP\Versions({"v1"})
     */
     public function test(){
     }
}

And you can also remove this ugly code from your registerAnnotationLoader() function:

$this->reader->addNamespace('Dingo\\Blueprint\\Annotation');
$this->reader->addNamespace('Dingo\\Blueprint\\Annotation\\Method');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants