Synfony2, Doctrine2, PHPUnit 등과 같은 프레임 워크는 annonation을 지원하지만 내 라이브러리에 대한 주석 지원을 추가하고 싶지만 파서/캐싱을 직접 작성하고 싶지는 않습니다. 누구든지 내가 포함 할 수/내 코드에 후크 및 주석을 사용하여 시작할 수 또는 최소한 구문 분석/캐싱 나를위한 기능을 큰 집합을 제공 할 수있는 라이브러리가 있는지?PHP Annotation Framework
답변
반사가 확실히 올바른 경로이지만 아직 모든 파싱을 원하지는 않습니다. https://github.com/nette/nette/blob/master/Nette/Reflection/AnnotationsParser.php
gpl 코드가 너무 좋지 않습니다. – ryanzec
사실 새 BDS와 GNU GPL 중에서 선택할 수 있습니다. 문제는 없을 것입니다. –
가보세요 : test
코드 :
<?php
/**
* This is what you want.
*/
function test() {
}
$ref = new ReflectionFunction('test');
echo $ref->getDocComment();
?>
이것은 PHP에서 작동 5.2 이상 Nette Framework는 당신이 시도 할 수있는 클래스가 있습니다.
이것은 주석 프레임 워크의 핵심 *이지만 주석과 특별히 관련이 없습니다. – LadyCailin
바퀴를 재발 명하지 마십시오. doctrine2 파서를 사용해 보시기 바랍니다. 사용 및 설치가 간편합니다.
- 1. Recess Framework v0.2 : Annotation Tutorial
- 2. IDEA PHP 유형 annotation
- 3. php imagick annotation 안티 앨리어싱
- 4. Doctrine 기본 Annotation Zend Framework 2의 네임 스페이스
- 5. morphia annotation
- 6. @override annotation
- 7. 타입 annotation
- 8. annotation & regex
- 9. Hibernate annotation
- 10. junit annotation
- 11. Android Annotation
- 12. Doctrine2 annotation issue
- 13. php framework help
- 14. ffmpeg + PHP + Zend Framework
- 15. php orm framework
- 16. Hibernate Annotation 필드 정의
- 17. APT (Annotation Processing Tool)
- 18. 문자 diff/annotation 알고리즘
- 19. Netbeans Override Annotation
- 20. MapView annotation 클릭하지 않고보기
- 21. Guice @ Nullable annotation
- 22. MKMapView setRegion to Annotation
- 23. iOS - MKMapView - Buggy Annotation
- 24. Android XML annotation
- 25. ggplot2 annotation with superscripts
- 26. Hibernate annotation - inharitance clarification
- 27. GWt 컨트롤러와 Annotation Approach
- 28. Eclipse가 싫어함 @Override annotation
- 29. Grails Ignoring @Id Annotation
- 30. @SessionAttribute의 올바른 사용법 Annotation
[Reflection] (http://br.php.net/manual/en/class.reflection.php)? –
내 가장 큰 문제는 어떻게 캐 네시 티브 캐쉬를 처리하는 것입니다 – ryanzec
결과를 캐시해야합니까? 'memcached'와 같은 세션이나 메모리 캐시를 사용할 수 있습니다. 파일에 저장할 수도 있지만 성능을 높이려면 memcached를 사용하십시오. 그런 다음 주석을 md5 작성하고 DocComment와 같이 구문 분석하고 저장하고 사용하십시오. :) –