PHP 에서도 anotation 드리븐을 구현 할 수 있을거 같내요 ㅎ;
http://code.google.com/p/addendum/
잘만 활용 하면, spring framework 장점만 경량화 하여
php 진영에서도 ... framework 도 나오지 않을가 하는
생각을 문득 해봤습니다.
------------------------------------------------------------------
/** @Table("people") */
class Person {
// some code
}
$reflection = new ReflectionAnnotatedClass('Person'); // by class name
$reflection->getAnnotation('Table')->value; // contains string "people"
----------------------------------------------------------------------
class RolesAllowed extends Annotation {}
/** @RolesAllowed({'admin', 'web-editor'}) */
class CMS {
// some code
}
$reflection = new ReflectionAnnotatedClass('CMS');
$annotation = $reflection->getAnnotation('RolesAllowed');
$annotation->value; // contains array('admin', 'web-editor'
-------------------------------------------------------------
/** @Mapping(inheritance = @SingleTableInheritance, columns = {@ColumnMapping('id'), @ColumnMapping('name')}) */
class Person {}
$reflection = new ReflectionAnnotatedClass('Person');
$annotation = $reflection->getAnnotation('Mapping');
$annotation->inheritance; // SingleTableInheritance annotation
$annotation->columns; // array of ColumnMapping annotations
$annotation->columns[0]->value; // 'id'
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 6830 |
112211dd
|
11년 전 | 792 | |
| 6829 |
진짜다진짜가나타남
|
11년 전 | 1209 | |
| 6828 | 11년 전 | 822 | ||
| 6827 |
봉보로봉봉
|
11년 전 | 916 | |
| 6826 |
jinion
|
11년 전 | 827 | |
| 6825 | 11년 전 | 805 | ||
| 6824 |
yunkiri486
|
11년 전 | 725 | |
| 6823 |
2donggalbi
|
11년 전 | 852 | |
| 6822 | 11년 전 | 852 | ||
| 6821 | 11년 전 | 803 | ||
| 6820 | 11년 전 | 3106 | ||
| 6819 | 11년 전 | 1253 | ||
| 6818 | 11년 전 | 518 | ||
| 6817 |
|
11년 전 | 613 | |
| 6816 | 11년 전 | 2081 | ||
| 6815 | 11년 전 | 1216 | ||
| 6814 | 11년 전 | 870 | ||
| 6813 | 11년 전 | 611 | ||
| 6812 |
|
11년 전 | 985 | |
| 6811 | 11년 전 | 590 | ||
| 6810 | 11년 전 | 1537 | ||
| 6809 |
낚시가좋아
|
11년 전 | 1047 | |
| 6808 | 11년 전 | 442 | ||
| 6807 | 11년 전 | 768 | ||
| 6806 |
Unhappy
|
11년 전 | 1775 | |
| 6805 | 11년 전 | 1609 | ||
| 6804 | 11년 전 | 1126 | ||
| 6803 | 11년 전 | 573 | ||
| 6802 |
asdfg
|
11년 전 | 1137 | |
| 6801 |
아트귀농인
|
11년 전 | 503 | |
| 6800 | 11년 전 | 2557 | ||
| 6799 | 11년 전 | 1357 | ||
| 6798 | 11년 전 | 1468 | ||
| 6797 | 11년 전 | 628 | ||
| 6796 |
purple63
|
11년 전 | 431 | |
| 6795 | 11년 전 | 2638 | ||
| 6794 |
커네드커네드
|
11년 전 | 963 | |
| 6793 | 11년 전 | 409 | ||
| 6792 | 11년 전 | 2500 | ||
| 6791 | 11년 전 | 528 | ||
| 6790 | 11년 전 | 2259 | ||
| 6789 |
리아빌리티
|
11년 전 | 3098 | |
| 6788 | 11년 전 | 1345 | ||
| 6787 | 11년 전 | 680 | ||
| 6786 | 11년 전 | 392 | ||
| 6785 | 11년 전 | 721 | ||
| 6784 |
|
11년 전 | 850 | |
| 6783 | 11년 전 | 586 | ||
| 6782 | 11년 전 | 3657 | ||
| 6781 |
리아빌리티
|
11년 전 | 487 | |
| 6780 | 11년 전 | 540 | ||
| 6779 | 11년 전 | 484 | ||
| 6778 | 11년 전 | 4697 | ||
| 6777 |
바보온달123
|
11년 전 | 619 | |
| 6776 | 11년 전 | 931 | ||
| 6775 | 11년 전 | 733 | ||
| 6774 |
DANet
|
11년 전 | 642 | |
| 6773 | 11년 전 | 1560 | ||
| 6772 | 11년 전 | 1356 | ||
| 6771 | 11년 전 | 619 | ||
| 6770 | 11년 전 | 1160 | ||
| 6769 | 11년 전 | 955 | ||
| 6768 | 11년 전 | 691 | ||
| 6767 | 11년 전 | 586 | ||
| 6766 | 11년 전 | 1264 | ||
| 6765 |
크림나이트
|
11년 전 | 1000 | |
| 6764 | 11년 전 | 1550 | ||
| 6763 | 11년 전 | 2605 | ||
| 6762 | 11년 전 | 537 | ||
| 6761 |
|
11년 전 | 784 | |
| 6760 |
|
11년 전 | 713 | |
| 6759 | 11년 전 | 3352 | ||
| 6758 | 11년 전 | 1007 | ||
| 6757 | 11년 전 | 1269 | ||
| 6756 | 11년 전 | 893 | ||
| 6755 |
|
11년 전 | 568 | |
| 6754 |
|
11년 전 | 720 | |
| 6753 |
|
11년 전 | 1386 | |
| 6752 | 11년 전 | 608 | ||
| 6751 |
|
11년 전 | 653 | |
| 6750 |
|
11년 전 | 2023 | |
| 6749 | 11년 전 | 1216 | ||
| 6748 |
|
11년 전 | 1118 | |
| 6747 | 11년 전 | 1172 | ||
| 6746 | 11년 전 | 840 | ||
| 6745 |
|
11년 전 | 912 | |
| 6744 | 11년 전 | 851 | ||
| 6743 | 11년 전 | 1293 | ||
| 6742 | 11년 전 | 541 | ||
| 6741 |
Abilityarch
|
11년 전 | 611 | |
| 6740 | 11년 전 | 655 | ||
| 6739 |
leewin20
|
11년 전 | 1235 | |
| 6738 | 11년 전 | 507 | ||
| 6737 | 11년 전 | 1219 | ||
| 6736 | 11년 전 | 1258 | ||
| 6735 | 11년 전 | 547 | ||
| 6734 | 11년 전 | 1284 | ||
| 6733 |
RipperTNT
|
11년 전 | 1840 | |
| 6732 |
|
11년 전 | 1337 | |
| 6731 |
|
11년 전 | 1395 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기