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'
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7830 | 9년 전 | 393 | ||
| 7829 |
|
9년 전 | 572 | |
| 7828 | 9년 전 | 503 | ||
| 7827 | 9년 전 | 392 | ||
| 7826 | 9년 전 | 405 | ||
| 7825 | 9년 전 | 449 | ||
| 7824 | 9년 전 | 426 | ||
| 7823 | 9년 전 | 340 | ||
| 7822 | 10년 전 | 334 | ||
| 7821 | 10년 전 | 284 | ||
| 7820 | 10년 전 | 330 | ||
| 7819 |
|
10년 전 | 733 | |
| 7818 | 10년 전 | 364 | ||
| 7817 | 10년 전 | 482 | ||
| 7816 | 10년 전 | 382 | ||
| 7815 | 10년 전 | 585 | ||
| 7814 | 10년 전 | 412 | ||
| 7813 | 10년 전 | 350 | ||
| 7812 | 10년 전 | 366 | ||
| 7811 | 10년 전 | 374 | ||
| 7810 | 10년 전 | 529 | ||
| 7809 | 10년 전 | 456 | ||
| 7808 | 10년 전 | 339 | ||
| 7807 | 10년 전 | 380 | ||
| 7806 |
프로그래머7
|
10년 전 | 1315 | |
| 7805 | 10년 전 | 1246 | ||
| 7804 |
zahir1312
|
10년 전 | 756 | |
| 7803 |
|
10년 전 | 1353 | |
| 7802 | 10년 전 | 440 | ||
| 7801 | 10년 전 | 841 | ||
| 7800 | 10년 전 | 1072 | ||
| 7799 | 10년 전 | 523 | ||
| 7798 | 10년 전 | 480 | ||
| 7797 | 10년 전 | 481 | ||
| 7796 | 10년 전 | 318 | ||
| 7795 | 10년 전 | 476 | ||
| 7794 | 10년 전 | 511 | ||
| 7793 | 10년 전 | 1022 | ||
| 7792 | 10년 전 | 428 | ||
| 7791 | 10년 전 | 518 | ||
| 7790 | 10년 전 | 477 | ||
| 7789 |
fbastore
|
10년 전 | 1415 | |
| 7788 | 10년 전 | 511 | ||
| 7787 | 10년 전 | 373 | ||
| 7786 | 10년 전 | 536 | ||
| 7785 | 10년 전 | 545 | ||
| 7784 | 10년 전 | 609 | ||
| 7783 | 10년 전 | 421 | ||
| 7782 | 10년 전 | 462 | ||
| 7781 | 10년 전 | 876 | ||
| 7780 | 10년 전 | 794 | ||
| 7779 | 10년 전 | 761 | ||
| 7778 | 10년 전 | 336 | ||
| 7777 | 10년 전 | 426 | ||
| 7776 | 10년 전 | 432 | ||
| 7775 | 10년 전 | 372 | ||
| 7774 | 10년 전 | 614 | ||
| 7773 | 10년 전 | 358 | ||
| 7772 | 10년 전 | 699 | ||
| 7771 | 10년 전 | 348 | ||
| 7770 | 10년 전 | 628 | ||
| 7769 | 10년 전 | 352 | ||
| 7768 | 10년 전 | 576 | ||
| 7767 | 10년 전 | 1139 | ||
| 7766 | 10년 전 | 463 | ||
| 7765 | 10년 전 | 493 | ||
| 7764 |
잘살아보자
|
10년 전 | 350 | |
| 7763 |
|
10년 전 | 1422 | |
| 7762 |
Tosea
|
10년 전 | 1032 | |
| 7761 | 10년 전 | 619 | ||
| 7760 |
잘살아보자
|
10년 전 | 644 | |
| 7759 |
잘살아보자
|
10년 전 | 470 | |
| 7758 |
잘살아보자
|
10년 전 | 560 | |
| 7757 | 10년 전 | 1213 | ||
| 7756 |
ITBANK
|
10년 전 | 1235 | |
| 7755 | 10년 전 | 1913 | ||
| 7754 | 10년 전 | 1028 | ||
| 7753 | 10년 전 | 855 | ||
| 7752 | 10년 전 | 1366 | ||
| 7751 |
잘살아보자
|
10년 전 | 496 | |
| 7750 |
잘살아보자
|
10년 전 | 455 | |
| 7749 |
잘살아보자
|
10년 전 | 458 | |
| 7748 |
잘살아보자
|
10년 전 | 448 | |
| 7747 |
잘살아보자
|
10년 전 | 548 | |
| 7746 |
잘살아보자
|
10년 전 | 658 | |
| 7745 |
잘살아보자
|
10년 전 | 894 | |
| 7744 |
잘살아보자
|
10년 전 | 403 | |
| 7743 | 10년 전 | 927 | ||
| 7742 |
starbros
|
10년 전 | 812 | |
| 7741 |
잘살아보자
|
10년 전 | 636 | |
| 7740 |
잘살아보자
|
10년 전 | 501 | |
| 7739 |
잘살아보자
|
10년 전 | 447 | |
| 7738 |
잘살아보자
|
10년 전 | 508 | |
| 7737 |
잘살아보자
|
10년 전 | 468 | |
| 7736 |
잘살아보자
|
10년 전 | 486 | |
| 7735 |
잘살아보자
|
10년 전 | 822 | |
| 7734 |
잘살아보자
|
10년 전 | 414 | |
| 7733 |
잘살아보자
|
10년 전 | 518 | |
| 7732 |
잘살아보자
|
10년 전 | 674 | |
| 7731 |
잘살아보자
|
10년 전 | 596 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기