I am using phpactiverecord () in a project.
I have definded the following relationships, is there any way to pass a variable, so I can change I looked at the docs and it appears that you can do this: but going through a variable: Text "itemprop =" text "> I am not sure That's what you are trying to achieve here, but you probably want to change the variables at some point in the control flow of your program. Make a call within a client that should make a call and set the value of that stable variable (recommended, see the code below for example) or set it explicitly with your main code (not recommended , Your variable is also required for For simplicity I have used a string variable here, but it works only with arrays. language_id on the fly?
is stable $ is_on = array (array ('language', 'class_name' = & gt; pages_lang ',' conditions' => array ('language_id = 1'))) ;
is static $ is_on = array (array ('language', ' Class_name '= & gt;' pages_lang ',' conditions' = & gt; array ('language_id =?', '1')));
Fixed $ has_one = array (array ('language', 'class_name' => 'Pages_lang ',' Conditions' = & gt; array ('language_id =?', $ Language_id)));
Static Variables are understood only in the context of objects that an object of that kind has actually been created (instantiated) before they come into existence
public )
square fu {static $ has_one = 'initial value'; public stable work sethos ($ value) { Self :: $ has_one = $ value;}} / main code: foo :: set ons ('new value');
No comments:
Post a Comment