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'
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 930 | 19년 전 | 3551 | ||
| 929 |
|
19년 전 | 2712 | |
| 928 |
|
19년 전 | 3459 | |
| 927 |
|
19년 전 | 3449 | |
| 926 |
|
19년 전 | 3150 | |
| 925 | 19년 전 | 5436 | ||
| 924 |
|
19년 전 | 2170 | |
| 923 |
|
19년 전 | 2232 | |
| 922 |
|
19년 전 | 2320 | |
| 921 |
|
19년 전 | 3414 | |
| 920 | 19년 전 | 3714 | ||
| 919 |
|
19년 전 | 3750 | |
| 918 |
|
19년 전 | 2371 | |
| 917 |
|
19년 전 | 2402 | |
| 916 |
|
19년 전 | 2712 | |
| 915 | 19년 전 | 3056 | ||
| 914 | 19년 전 | 2467 | ||
| 913 | 19년 전 | 2629 | ||
| 912 | 19년 전 | 2463 | ||
| 911 | 19년 전 | 2221 | ||
| 910 | 19년 전 | 3254 | ||
| 909 | 19년 전 | 3316 | ||
| 908 | 19년 전 | 3046 | ||
| 907 |
|
19년 전 | 4880 | |
| 906 |
|
19년 전 | 2719 | |
| 905 |
|
19년 전 | 3321 | |
| 904 |
|
19년 전 | 3161 | |
| 903 |
|
19년 전 | 2000 | |
| 902 |
|
19년 전 | 3156 | |
| 901 |
|
19년 전 | 1887 | |
| 900 |
|
19년 전 | 2348 | |
| 899 |
|
19년 전 | 2406 | |
| 898 |
|
19년 전 | 3990 | |
| 897 |
|
19년 전 | 3194 | |
| 896 |
|
19년 전 | 3110 | |
| 895 |
|
19년 전 | 2544 | |
| 894 |
|
19년 전 | 2025 | |
| 893 |
|
19년 전 | 1656 | |
| 892 |
|
19년 전 | 2421 | |
| 891 |
|
19년 전 | 2333 | |
| 890 |
|
19년 전 | 1818 | |
| 889 |
|
19년 전 | 1818 | |
| 888 |
|
19년 전 | 2615 | |
| 887 |
|
19년 전 | 2586 | |
| 886 |
|
19년 전 | 1877 | |
| 885 |
|
19년 전 | 2127 | |
| 884 |
|
19년 전 | 3315 | |
| 883 |
|
19년 전 | 1959 | |
| 882 |
|
19년 전 | 2508 | |
| 881 |
|
19년 전 | 2588 | |
| 880 |
|
19년 전 | 2667 | |
| 879 |
|
19년 전 | 2943 | |
| 878 |
|
19년 전 | 2563 | |
| 877 |
|
19년 전 | 2985 | |
| 876 |
|
19년 전 | 2766 | |
| 875 |
|
19년 전 | 3525 | |
| 874 | 19년 전 | 1875 | ||
| 873 | 19년 전 | 2742 | ||
| 872 |
|
19년 전 | 2380 | |
| 871 |
|
19년 전 | 2022 | |
| 870 |
|
19년 전 | 2430 | |
| 869 |
|
19년 전 | 1876 | |
| 868 |
|
19년 전 | 5448 | |
| 867 |
|
19년 전 | 2273 | |
| 866 |
|
19년 전 | 4271 | |
| 865 |
|
19년 전 | 2307 | |
| 864 | 19년 전 | 1857 | ||
| 863 | 19년 전 | 2614 | ||
| 862 | 19년 전 | 2337 | ||
| 861 | 19년 전 | 2536 | ||
| 860 | 19년 전 | 2170 | ||
| 859 | 19년 전 | 3931 | ||
| 858 | 19년 전 | 3427 | ||
| 857 | 19년 전 | 2208 | ||
| 856 |
Power
|
19년 전 | 2111 | |
| 855 | 19년 전 | 1974 | ||
| 854 | 19년 전 | 2008 | ||
| 853 |
pearly
|
19년 전 | 4397 | |
| 852 |
pearly
|
19년 전 | 3360 | |
| 851 | 19년 전 | 2785 | ||
| 850 |
pearly
|
19년 전 | 3356 | |
| 849 |
pearly
|
19년 전 | 3018 | |
| 848 |
pearly
|
19년 전 | 2851 | |
| 847 | 19년 전 | 2373 | ||
| 846 |
|
19년 전 | 2181 | |
| 845 |
pearly
|
19년 전 | 2503 | |
| 844 | 19년 전 | 3110 | ||
| 843 | 19년 전 | 2141 | ||
| 842 |
pearly
|
19년 전 | 3128 | |
| 841 |
pearly
|
19년 전 | 3255 | |
| 840 | 19년 전 | 2932 | ||
| 839 |
|
19년 전 | 1949 | |
| 838 |
|
19년 전 | 1710 | |
| 837 |
|
19년 전 | 2336 | |
| 836 |
|
19년 전 | 2276 | |
| 835 |
|
19년 전 | 1652 | |
| 834 |
|
19년 전 | 1668 | |
| 833 |
|
19년 전 | 1578 | |
| 832 |
|
19년 전 | 2070 | |
| 831 |
|
19년 전 | 1620 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기