I think I was once able to assign to the $this reference in the constructor of a php class so that the new operator would return the object I've assigned...
... The previous behaviour sounds to me like the bug ;-). Usually when I need to handle this dynamic creation of objects, I use a factory method from a manager...
I'm pretty sure I can do it in Javascript, but that's not a formal oop language although one can write and create objects. I'm familiar with the book you...
... 4.4.0-dev from CVS), none returns an ... On 4.2.2, it can be made to transform into an Error object by ommiting the ampersand in the assignment to $this. ...
I just switched some code to use "=" instead of "=&" and it seems to have worked on 4.3. So it would seem that you can assign to $this but you cannot reassign ...
FYI, I have reported this as requested: Bug #21380 Ability to assign to $this in constructor of class Hope this is helpful! Thanks... now I've got to go and...
Hello, This is just a reminder to let you know that the following polls are going on the php-objects mailing list that you are a subscriber. Please do not...
php-objects@yahoogrou...
Jan 5, 2003 11:14 am
964
Is there any way to tell what type a variable is? My problem is this: I query a db table for a primary key that is an integer. If the key exists I return it,...
Rob
rcherry@...
Jan 10, 2003 8:34 am
965
... Try if ($key === false) { // false it is } The third '=' compares the two to see that they are also of the same type. Or if you just want to check the...
Apart from the identity comparison operator mentioned in the list before (===), you can of course the functions gettype() or any of the is_*() functions that ...
I am inserting dates into mysql using the curdate() function, which is generating a date in 2003-01-13 format. I need to do 2 things: 1. be able to retrieve...
Steve Miller
steve@...
Jan 13, 2003 10:35 pm
970
This is not really a OOP in PHP type of question [grin]. A quick look at the MySQL manual would've answer your questions faster than anyone could: ...
Maybe: <? $fromDB_date = "2003-01-14"; $date_array = explode("-", $fromDB_date); // add ten days to the day paramater $new_date = mktime(0,0,0,$date_array[1],...
Hi Steve, If you use PHP, you can get the desired result. See the code snippet below: // $SQLdate is the result from a database query. It is of the form: //...
Thanks all! <tail between legs> And sorry about posting in the wrong list... </<tail between legs> steve...
Steve Miller
steve@...
Jan 14, 2003 1:32 pm
974
... Don't think this will work is date_array[2} + 10 is greater than the number of days in the month. mktime() (check php.net) returns the time in seconds....
Urb LeJeune
urb@...
Jan 14, 2003 3:54 pm
975
Hi, I'm pretty new to PHP and I'm trying to create a PDF file. I would like to create a page header (some specific data needs to be displayed at the top of...
Try fpdf http://www.fpdf.org/* They have tutorials at the site, you will most likely want Tutorial 2. Basically you extend the fpdf class and define a header...
http://www.hotscripts.com/PHP/Scripts_and_Programs/File_Manipulation/ PDF/
___________________________________________________________ Do You Yahoo!? -- Une...
I want to insert the following data into a database. <xml> <value1>56</value1> <value2>1222</value2> <value3>78.5</value3> </xml> This is easy and the SQL...
Fredrik Davidsson
fdqps@...
Jan 15, 2003 8:52 am
985
Hi Fredrik, ... One option would be to use a database that support array/list/enumeration fields. If the values for 'value2' are one of a possible set, you can...