@@ -46,32 +46,35 @@ class LightMetaProperty implements Stringable
4646 )
4747 );
4848
49- private $ name = null ;
50- private $ columnName = null ;
49+ private $ name = null ;
50+ private $ columnName = null ;
5151
52- private $ type = null ;
53- private $ className = null ;
52+ private $ type = null ;
53+ private $ className = null ;
5454
55- private $ size = null ;
55+ private $ size = null ;
5656
57- private $ min = null ;
58- private $ max = null ;
57+ private $ min = null ;
58+ private $ max = null ;
5959
60- private $ required = false ;
61- private $ generic = false ;
62- private $ inner = false ;
60+ private $ required = false ;
61+ private $ generic = false ;
62+ private $ inner = false ;
6363
6464 /// @see MetaRelation
65- private $ relationId = null ;
65+ private $ relationId = null ;
6666
6767 /// @see FetchStrategy
68- private $ strategyId = null ;
68+ private $ strategyId = null ;
6969
70- private $ getter = null ;
71- private $ setter = null ;
72- private $ dropper = null ;
70+ private $ getter = null ;
71+ private $ setter = null ;
72+ private $ dropper = null ;
7373
74- private $ identifier = null ;
74+ private $ identifier = null ;
75+
76+ private $ label = null ;
77+ private $ description = null ;
7578
7679 /**
7780 * @return LightMetaProperty
@@ -89,10 +92,13 @@ public static function create()
8992 public static function fill (
9093 LightMetaProperty $ property ,
9194 $ name , $ columnName , $ type , $ className , $ size ,
92- $ required , $ generic , $ inner , $ relationId , $ strategyId
95+ $ required , $ generic , $ inner , $ relationId , $ strategyId, $ label = null , $ description = null
9396 )
9497 {
9598 $ property ->name = $ name ;
99+
100+ $ property ->label = $ label ;
101+ $ property ->description = $ description ;
96102
97103 $ methodSuffix = ucfirst ($ name );
98104 $ property ->getter = 'get ' .$ methodSuffix ;
@@ -309,6 +315,12 @@ public function makePrimitive($name)
309315
310316 if ($ this ->required )
311317 $ prm ->required ();
318+
319+ if ($ this ->label )
320+ $ prm ->setLabel ($ this ->label );
321+
322+ if ($ this ->description )
323+ $ prm ->setDescription ($ this ->description );
312324
313325 return $ prm ;
314326 }
@@ -505,6 +517,18 @@ final public function toString()
505517 ? $ this ->strategyId
506518 : 'null '
507519 )
520+ .', '
521+ .(
522+ $ this ->label
523+ ? '\'' .$ this ->label .'\''
524+ : 'null '
525+ )
526+ .', '
527+ .(
528+ $ this ->description
529+ ? '\'' .$ this ->description .'\''
530+ : 'null '
531+ )
508532 .') ' ;
509533 }
510534
0 commit comments