PHP 에서도 anotation 드리븐을 구현 할 수 있을거 같내요 ㅎ;
잘만 활용 하면, spring framework 장점만 경량화 하여
php 진영에서도 ... framework 도 나오지 않을가 하는
생각을 문득 해봤습니다.
------------------------------------------------------------------
/** @Table("people") */
class Person {
// some code
}
class Person {
// some code
}
$reflection = new ReflectionAnnotatedClass('Person'); // by class name
$reflection->getAnnotation('Table')->value; // contains string "people"
$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'
/** @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'
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'
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 730 |
|
19년 전 | 2754 | |
| 729 |
그레이스웹
|
19년 전 | 3540 | |
| 728 |
|
19년 전 | 2727 | |
| 727 |
|
19년 전 | 2553 | |
| 726 |
|
19년 전 | 2375 | |
| 725 |
|
19년 전 | 2285 | |
| 724 |
|
19년 전 | 2161 | |
| 723 |
|
19년 전 | 4278 | |
| 722 |
|
19년 전 | 2704 | |
| 721 |
|
19년 전 | 2202 | |
| 720 |
|
19년 전 | 2300 | |
| 719 |
|
19년 전 | 2867 | |
| 718 |
|
19년 전 | 1983 | |
| 717 |
|
19년 전 | 3209 | |
| 716 |
|
19년 전 | 2780 | |
| 715 |
|
19년 전 | 2308 | |
| 714 |
|
19년 전 | 1852 | |
| 713 |
|
19년 전 | 2273 | |
| 712 |
|
19년 전 | 2025 | |
| 711 |
|
19년 전 | 1926 | |
| 710 |
|
19년 전 | 2502 | |
| 709 |
|
19년 전 | 2360 | |
| 708 |
|
19년 전 | 3914 | |
| 707 |
|
19년 전 | 3753 | |
| 706 |
|
19년 전 | 2267 | |
| 705 |
|
19년 전 | 3346 | |
| 704 |
|
19년 전 | 2020 | |
| 703 |
|
19년 전 | 2410 | |
| 702 |
|
19년 전 | 2302 | |
| 701 |
홀로남은자
|
19년 전 | 2370 | |
| 700 |
홀로남은자
|
19년 전 | 2192 | |
| 699 | 19년 전 | 2834 | ||
| 698 |
|
19년 전 | 2856 | |
| 697 |
|
19년 전 | 3192 | |
| 696 |
|
19년 전 | 3060 | |
| 695 |
|
19년 전 | 2735 | |
| 694 |
|
19년 전 | 2962 | |
| 693 |
|
19년 전 | 3217 | |
| 692 |
|
19년 전 | 2901 | |
| 691 |
|
19년 전 | 2654 | |
| 690 | 19년 전 | 2956 | ||
| 689 | 19년 전 | 4532 | ||
| 688 | 19년 전 | 2460 | ||
| 687 | 19년 전 | 2481 | ||
| 686 | 19년 전 | 3508 | ||
| 685 | 19년 전 | 3198 | ||
| 684 | 19년 전 | 2874 | ||
| 683 | 19년 전 | 2085 | ||
| 682 | 19년 전 | 1791 | ||
| 681 | 19년 전 | 2888 | ||
| 680 | 19년 전 | 1743 | ||
| 679 | 19년 전 | 2327 | ||
| 678 | 19년 전 | 3979 | ||
| 677 | 19년 전 | 3775 | ||
| 676 | 19년 전 | 3500 | ||
| 675 | 19년 전 | 3428 | ||
| 674 |
|
19년 전 | 1586 | |
| 673 |
|
19년 전 | 1950 | |
| 672 |
|
19년 전 | 1877 | |
| 671 | 19년 전 | 2544 | ||
| 670 | 19년 전 | 4668 | ||
| 669 |
|
19년 전 | 2789 | |
| 668 |
|
19년 전 | 1941 | |
| 667 |
|
19년 전 | 1964 | |
| 666 |
|
19년 전 | 1867 | |
| 665 |
|
19년 전 | 2604 | |
| 664 |
|
19년 전 | 8210 | |
| 663 |
|
19년 전 | 2756 | |
| 662 |
|
19년 전 | 2806 | |
| 661 |
|
19년 전 | 3070 | |
| 660 |
|
19년 전 | 2248 | |
| 659 |
|
19년 전 | 2275 | |
| 658 |
|
19년 전 | 2201 | |
| 657 |
|
19년 전 | 2102 | |
| 656 |
|
19년 전 | 2298 | |
| 655 |
|
19년 전 | 2553 | |
| 654 |
|
19년 전 | 3092 | |
| 653 | 19년 전 | 2348 | ||
| 652 | 19년 전 | 1933 | ||
| 651 |
|
19년 전 | 2876 | |
| 650 | 19년 전 | 5035 | ||
| 649 | 19년 전 | 3537 | ||
| 648 | 19년 전 | 3490 | ||
| 647 | 19년 전 | 2997 | ||
| 646 | 19년 전 | 2437 | ||
| 645 | 19년 전 | 1519 | ||
| 644 | 19년 전 | 3159 | ||
| 643 | 19년 전 | 2030 | ||
| 642 |
|
19년 전 | 5413 | |
| 641 | 19년 전 | 2452 | ||
| 640 | 19년 전 | 3450 | ||
| 639 | 19년 전 | 2893 | ||
| 638 | 19년 전 | 1774 | ||
| 637 | 19년 전 | 3892 | ||
| 636 | 19년 전 | 2442 | ||
| 635 | 19년 전 | 2332 | ||
| 634 |
|
19년 전 | 3030 | |
| 633 |
|
19년 전 | 3320 | |
| 632 | 19년 전 | 2527 | ||
| 631 | 19년 전 | 2286 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기