Re: [PHP] Object size

2011-10-28 Thread Tommy Pham
On Fri, Oct 28, 2011 at 9:43 AM, QI.VOLMAR QI wrote: > Is there a function or method that calculate the object size in PHP?. > Or maybe that calculates a xml buffer of a file? I need to check a > size of a file, and if it's size is bigger than 500kb. I will need to > make another file to the subs

[PHP] Object size

2011-10-28 Thread QI.VOLMAR QI
Is there a function or method that calculate the object size in PHP?. Or maybe that calculates a xml buffer of a file? I need to check a size of a file, and if it's size is bigger than 500kb. I will need to make another file to the subsequent content. Any help will serve. Tks, Volmar -- PHP Gene

Re: [PHP] Object Query Language optimization

2011-05-21 Thread jean-baptiste verrey
hi, "I often use SQL that is far, far more complex than this." well, this is why my OQL is pretty simple, it does not intend to do any crazy stuff that you can do with SQL (as I can load objects from SQL as well) I had a look at other ORM, and the problem is that some are extremely complicated (D

Re: [PHP] Object Query Language optimization

2011-05-21 Thread Mark Kelly
Hi. On Saturday 21 May 2011 at 15:56 jean-baptiste verrey wrote: > I'm writing an Object Query Language [snip] > (queries don't get much more complicated than that, you have multiple > alias.fieldName in the select, then multiple joins) I often use SQL that is far, far more complex than this.

[PHP] Object Query Language optimization

2011-05-21 Thread jean-baptiste verrey
hi folks, I'm writing an Object Query Language which is pretty simple, you do request such as *SELECT e.*,c.firstName * *FROM employee e * *JOIN contact c ON e* *WHERE e.id=*? (queries don't get much more complicated than that, you have multiple alias.fieldName in the select, then multiple joins)

Re: [PHP] Object or such for building a directory tree?

2010-05-01 Thread tedd
At 1:59 PM +0200 5/1/10, Michelle Konzack wrote: Hello *, before I reinvent the wheel, I ask here, if someone know an "object" or "function" which build from an array of directories (filesystem or IMAP) a directory tree which can be opened and close? I have the need to do this for a "local and

[PHP] Object or such for building a directory tree?

2010-05-01 Thread Michelle Konzack
Hello *, before I reinvent the wheel, I ask here, if someone know an "object" or "function" which build from an array of directories (filesystem or IMAP) a directory tree which can be opened and close? I have the need to do this for a "local and remote filesystem" and a "courier-imap tree".

Re: [PHP] Object Oriented Programming question

2010-03-12 Thread Rene Veerman
I also agree OOP is not a fad. Its a step up from procedural/including. And it's still evolving. While PHP is able to do polymorphism perfectly without OOP/classes, through "require($plugin/className); $varFunctionName ($p1, $p2, etc);", My newsscraper works very well that way. But if you want inh

Re: [PHP] Object Oriented Programming question

2010-03-12 Thread Ashley Sheridan
On Fri, 2010-03-12 at 06:49 -0800, Andrew Brookins wrote: > On Tue, Jan 19, 2010 at 7:11 AM, Ben Stones wrote: > > Hi, > > > > I've been learning about object oriented programming for the past few weeks > > and I've understood it pretty well, but I have one question. Usually with > > PHP scripts

Re: [PHP] Object Oriented Programming question

2010-03-12 Thread Andrew Brookins
On Tue, Jan 19, 2010 at 7:11 AM, Ben Stones wrote: > Hi, > > I've been learning about object oriented programming for the past few weeks > and I've understood it pretty well, but I have one question. Usually with > PHP scripts I make, all the functionality for a specific page is in the > actual PH

Re: [PHP] Object Oriented Programming question

2010-01-20 Thread tedd
At 11:18 AM -0500 1/20/10, Paul M Foster wrote: On Wed, Jan 20, 2010 at 10:11:18AM -0500, tedd wrote: While I teach OOP, I don't write any OOP for clients. My charge is to do things quickly and OOP requires a considerable amount of analysis before creating a solution. In most cases, I don

RE: [PHP] Object Oriented Programming question

2010-01-20 Thread tedd
At 11:31 AM -0500 1/20/10, Bob McConnell wrote: From: tedd At 10:26 AM -0500 1/19/10, Bob McConnell wrote: Some problems will fit into it, some don't. I teach OOP thinking at the local college and haven't run into a problem that doesn't fit. For example, in my last class I had a woman w

Re: [PHP] Object Oriented Programming question

2010-01-20 Thread J Ravi Menon
Hi Bob, [Couldn't resist jumping into this topic :)] Even if you look at traditional unix (or similar) kernel internals, although they tend to use functional paradigms, they do have a OOP-like flavor. Example: Everything in a unix system is a 'file' (well not really with networking logic, but it

RE: [PHP] Object Oriented Programming question

2010-01-20 Thread Bob McConnell
From: tedd > At 10:26 AM -0500 1/19/10, Bob McConnell wrote: >> Some problems will fit into it, some don't. > > I teach OOP thinking at the local college and haven't run into a > problem that doesn't fit. For example, in my last class I had a woman > who wanted to pick out a blue dress for her

Re: [PHP] Object Oriented Programming question

2010-01-20 Thread Paul M Foster
On Wed, Jan 20, 2010 at 10:11:18AM -0500, tedd wrote: > > While I teach OOP, I don't write any OOP for clients. My charge is to > do things quickly and OOP requires a considerable amount of analysis > before creating a solution. In most cases, I don't have the time. > Besides, I'm more of an agi

Re: [PHP] Object Oriented Programming question

2010-01-20 Thread Kim Madsen
tedd wrote on 20/01/2010 16:11: At 10:26 AM -0500 1/19/10, Bob McConnell wrote: Some problems will fit into it, some don't. I teach OOP thinking at the local college and haven't run into a problem that doesn't fit. For example, in my last class I had a woman who wanted to pick out a blue dre

Re: [PHP] Object Oriented Programming question

2010-01-20 Thread Richard Quadling
2010/1/20 tedd : > Also IMO, one can argue the advantages that OOP and Design Patterns bring to > the table over procedural, but after all is said and done, if you know your > stuff in procedural, OOP is not going to provide you with much that you > don't already have. You also have to consider th

Re: [PHP] Object Oriented Programming question

2010-01-20 Thread Robert Cummings
Jay Blanchard wrote: [snip] My viewpoint may be jaundiced from having programmed in C++, but the polymorphism of PHP seems a little crippled by comparison. [/snip] I wholeheartedly agree, but I figured out how to work with it in PHP to my advantage and the advantage of my team. It'll get better.

RE: [PHP] Object Oriented Programming question

2010-01-20 Thread Jay Blanchard
[snip] My viewpoint may be jaundiced from having programmed in C++, but the polymorphism of PHP seems a little crippled by comparison. [/snip] I wholeheartedly agree, but I figured out how to work with it in PHP to my advantage and the advantage of my team. It'll get better... -- PHP General Mai

Re: [PHP] Object Oriented Programming question

2010-01-20 Thread Paul M Foster
On Wed, Jan 20, 2010 at 06:47:04AM -0600, Jay Blanchard wrote: > [snip] > > Another advantage of OOP that is difficult to > > provide via the procedural paradigm is polymorphism. > > Agreed. Though the advantages of polymorphism are questionable, > depending on your viewpoint. > [/snip] > > In a

RE: [PHP] Object Oriented Programming question

2010-01-20 Thread tedd
At 10:26 AM -0500 1/19/10, Bob McConnell wrote: Some problems will fit into it, some don't. I teach OOP thinking at the local college and haven't run into a problem that doesn't fit. For example, in my last class I had a woman who wanted to pick out a blue dress for her upcoming wedding anni

RE: [PHP] Object Oriented Programming question

2010-01-20 Thread Jay Blanchard
[snip] > Another advantage of OOP that is difficult to > provide via the procedural paradigm is polymorphism. Agreed. Though the advantages of polymorphism are questionable, depending on your viewpoint. [/snip] In a loosely typed language like PHP that advantages of polymorphism far outweigh any

Re: [PHP] Object Oriented Programming question

2010-01-19 Thread Paul M Foster
On Tue, Jan 19, 2010 at 01:12:49PM -0500, Robert Cummings wrote: > > I would have to agree that OOP is not a fad, perhaps over-hyped at > times, but definitely not a fad. The argument about class dependencies > is an invalid argument since functions will also have dependencies on > other functio

Re: [PHP] Object Oriented Programming question

2010-01-19 Thread Robert Cummings
Ashley Sheridan wrote: On Tue, 2010-01-19 at 12:30 -0500, Paul M Foster wrote: On Tue, Jan 19, 2010 at 03:11:56PM +, Ben Stones wrote: Hi, I've been learning about object oriented programming for the past few weeks and I've understood it pretty well, but I have one question. Usually with

Re: [PHP] Object Oriented Programming question

2010-01-19 Thread Paul M Foster
On Tue, Jan 19, 2010 at 05:44:56PM +, Ashley Sheridan wrote: > > Oh, and your flame suit failed because you forgot the quotation marks around > the attribute values, and you didn't close the tag :p Dang! I *thought* it felt awfully warm in here. Paul -- Paul M. Foster -- PHP General M

Re: [PHP] Object Oriented Programming question

2010-01-19 Thread Ashley Sheridan
On Tue, 2010-01-19 at 12:30 -0500, Paul M Foster wrote: > On Tue, Jan 19, 2010 at 03:11:56PM +, Ben Stones wrote: > > > Hi, > > > > I've been learning about object oriented programming for the past few weeks > > and I've understood it pretty well, but I have one question. Usually with > > PH

Re: [PHP] Object Oriented Programming question

2010-01-19 Thread Paul M Foster
On Tue, Jan 19, 2010 at 03:11:56PM +, Ben Stones wrote: > Hi, > > I've been learning about object oriented programming for the past few weeks > and I've understood it pretty well, but I have one question. Usually with > PHP scripts I make, all the functionality for a specific page is in the >

Re: [PHP] Object Oriented Programming question

2010-01-19 Thread Ashley Sheridan
On Tue, 2010-01-19 at 15:11 +, Ben Stones wrote: > Hi, > > I've been learning about object oriented programming for the past few weeks > and I've understood it pretty well, but I have one question. Usually with > PHP scripts I make, all the functionality for a specific page is in the > actual

Re: [PHP] Object Oriented Programming question

2010-01-19 Thread Floyd Resler
Ben, I use a combination of procedural and OOP in my scripts. It depends on my needs. As an example, I use OOP for gathering order information. I created a class which gathers all the order information allowing me to easily access any piece of data in the order. I could do this with

RE: [PHP] Object Oriented Programming question

2010-01-19 Thread Bob McConnell
From: Ben Stones > I've been learning about object oriented programming for the past few weeks > and I've understood it pretty well, but I have one question. Usually with > PHP scripts I make, all the functionality for a specific page is in the > actual PHP file, and I'd use PHP functions in a sep

[PHP] Object Oriented Programming question

2010-01-19 Thread Ben Stones
Hi, I've been learning about object oriented programming for the past few weeks and I've understood it pretty well, but I have one question. Usually with PHP scripts I make, all the functionality for a specific page is in the actual PHP file, and I'd use PHP functions in a separate directory which

Re: [PHP] Object of class stdClass could not be converted to string

2009-11-30 Thread LinuxManMikeC
On Mon, Nov 30, 2009 at 10:27 PM, John Taylor-Johnston wrote: > Good grief. It doesn't like printing an INT field like as if it were a > string?? > > I looked at: http://php.ca/manual-lookup.php?pattern=stringtoint like I > might of in Delphi :)p > >    echo " $mydata->2010\n"; >    echo " $mydata

[PHP] Object of class stdClass could not be converted to string

2009-11-30 Thread John Taylor-Johnston
Good grief. It doesn't like printing an INT field like as if it were a string?? I looked at: http://php.ca/manual-lookup.php?pattern=stringtoint like I might of in Delphi :)p echo " $mydata->2010\n"; echo " $mydata->2009\n"; Is this something new in PHP? Geez. John -- PHP General Ma

Re: [PHP] Object type determined at runtime

2009-07-06 Thread James Colannino
Ah, thanks very much. That was very helpful! James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Object type determined at runtime

2009-07-06 Thread David Otton
2009/7/6 James Colannino > Hey everyone.  I have a question.  Hopefully it's clear, because I'm not > sure quite how to ask it.  Basically, I have a variety of different > objects that a variable can be instantiated as in the same block of > code, its type being determined at runtime.  I want to

[PHP] Object type determined at runtime

2009-07-06 Thread James Colannino
Hey everyone. I have a question. Hopefully it's clear, because I'm not sure quite how to ask it. Basically, I have a variety of different objects that a variable can be instantiated as in the same block of code, its type being determined at runtime. I want to be able to do something like this:

Re: [PHP] Object of class could not be converted to string

2009-06-18 Thread Martin Scotta
; > > Or maybe in your class you did not declare the variable > > ex: > private $var1 = NULL; > private $var2 = NULL; > > Yuri Yarlei > > > > From: ang...@elemental.co.za > > To: php-general@lists.php.net > > Date: Thu, 18 Jun 2009 13:20:59 +0200 &g

RE: [PHP] Object of class could not be converted to string

2009-06-18 Thread Yuri Yarlei
foo, "string"); Or maybe in your class you did not declare the variable ex: private $var1 = NULL; private $var2 = NULL; Yuri Yarlei > From: ang...@elemental.co.za > To: php-general@lists.php.net > Date: Thu, 18 Jun 2009 13:20:59 +0200 > Subject: [PHP] Object of class coul

RE: [PHP] Object of class could not be converted to string

2009-06-18 Thread Yuri Yarlei
$foo, "string"); Or maybe in your class you did not declare the variable ex: private $var1 = NULL; private $var2 = NULL; > From: ang...@elemental.co.za > To: php-general@lists.php.net > Date: Thu, 18 Jun 2009 13:20:59 +0200 > Subject: [PHP] Object of class could not be conve

[PHP] Object of class could not be converted to string

2009-06-18 Thread Angelo Zanetti
Dear all, We are experiencing this error: "Object of class xxxClass could not be converted to string" I have searched google a lot mostly the results are for Drupal or badly coded sites. I have further found out that the issue is with PHP 5.2 version. There isn't a problem with the script as

Re: [PHP] object literals

2009-05-03 Thread Richard Heyes
> i'm really lazy about typing. I think every good programmer is... ;-) -- Richard Heyes HTML5 graphing: RGraph (www.rgraph.net) PHP mail: RMail (www.phpguru.org/rmail) PHP datagrid: RGrid (www.phpguru.org/rgrid) PHP Template: RTemplate (www.phpguru.org/rtemplate) -- PHP General Mailing List (

Re: [PHP] object literals

2009-05-02 Thread Tom Worster
On 5/2/09 6:45 AM, "Robert Cummings" wrote: > It's not what I want, I'm not the original poster. as op, i think i'm going to stick with the cast. but it's been an interesting thread and i learned some useful things. > Regardless though, it > comes down to the preference of the developer. It ca

RE: [PHP] object literals

2009-05-02 Thread Robert Cummings
On Sat, 2009-05-02 at 12:10 +0100, Ashley Sheridan wrote: > On Sat, 2009-05-02 at 06:45 -0400, Robert Cummings wrote: > > On Sat, 2009-05-02 at 12:39 +0200, Andrea Giammarchi wrote: > > > exactly, why bother with JavaScript literal representation? > > > > > > the foreach loop was just an alternat

RE: [PHP] object literals

2009-05-02 Thread Ashley Sheridan
On Sat, 2009-05-02 at 06:45 -0400, Robert Cummings wrote: > On Sat, 2009-05-02 at 12:39 +0200, Andrea Giammarchi wrote: > > exactly, why bother with JavaScript literal representation? > > > > the foreach loop was just an alternative to explicit object cast cause you > > did not like it I th

RE: [PHP] object literals

2009-05-02 Thread Robert Cummings
On Sat, 2009-05-02 at 12:39 +0200, Andrea Giammarchi wrote: > exactly, why bother with JavaScript literal representation? > > the foreach loop was just an alternative to explicit object cast cause you > did not like it I though it was more about control over what you want to > cast and what

RE: [PHP] object literals

2009-05-02 Thread Andrea Giammarchi
php you have natural type hint over arrays and these are normally slightly faster so I do not get why you want objects rather than arrays ... > Subject: RE: [PHP] object literals > From: rob...@interjinn.com > To: an_...@hotmail.com > CC: f...@thefsb.org; php-general@lists.php.net &g

RE: [PHP] object literals

2009-05-01 Thread Robert Cummings
ou are in PHP, you > should think about being familiar with associative arrays, also > because so far is the only class you cannot create/extend. > > class string { > // ok > } > > class object { > // ok > } > > class array { > // no way > } >

RE: [PHP] object literals

2009-05-01 Thread Andrea Giammarchi
ooops sorry, two more ;-) > having exactly the same number of characterss.aspx _ Windows Live™: Keep your life in sync. Check it out! http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_012009

RE: [PHP] object literals

2009-05-01 Thread Andrea Giammarchi
ray { // no way } Regards > From: rob...@interjinn.com > To: an_...@hotmail.com > CC: f...@thefsb.org; php-general@lists.php.net > Date: Fri, 1 May 2009 11:40:11 -0400 > Subject: RE: [PHP] object literals > > On Fri, 2009-05-01 at 17:36 +0200, Andrea Giammarchi wrote: >

RE: [PHP] object literals

2009-05-01 Thread Robert Cummings
On Fri, 2009-05-01 at 17:36 +0200, Andrea Giammarchi wrote: > var o = { > "a" : "b", > "c" : "d" > }; > > $o = array( > 'a' => "b", > 'c' => "d" > ); > > so I guess the problem is a couple of quotes, isn't it? > > > otherwise define object statically and externally and use json_

RE: [PHP] object literals

2009-05-01 Thread Andrea Giammarchi
se json_decode ;-) > Date: Thu, 30 Apr 2009 16:56:21 -0400 > From: f...@thefsb.org > To: php-general@lists.php.net > Subject: [PHP] object literals > > is there a neat literal syntax for creating objects on the fly without > defining a type? > > whenever i need to do

Re: [PHP] object literals

2009-05-01 Thread Tom Worster
On 5/1/09 4:54 AM, "Richard Heyes" wrote: > Hi, > >>    $x = (object) array('a'=>1, 'b'=>3, ...); >> >> which works but isn't very lovely. it's neater in, for example, javascript. > > Well, you could wrap it up in a function to make it a bit lovelier. Eg: > > $foo = createObject(array('key' =

Re: [PHP] object literals

2009-05-01 Thread Richard Heyes
Hi, > You could use JSON, > > $foo = json_decode('{"a":1,"b":3}'); > > but I guess that's not much better than Richard's suggestion. Didn't think of that (well... it's new). That's actually much better I think, since you get the added boon of ease of portability to JS (if that's even a factor).

Re: [PHP] object literals

2009-05-01 Thread Peter Ford
Richard Heyes wrote: > Hi, > >>$x = (object) array('a'=>1, 'b'=>3, ...); >> >> which works but isn't very lovely. it's neater in, for example, javascript. > > Well, you could wrap it up in a function to make it a bit lovelier. Eg: > > $foo = createObject(array('key' => 'value')); > > It's n

Re: [PHP] object literals

2009-05-01 Thread Richard Heyes
Hi, >    $x = (object) array('a'=>1, 'b'=>3, ...); > > which works but isn't very lovely. it's neater in, for example, javascript. Well, you could wrap it up in a function to make it a bit lovelier. Eg: $foo = createObject(array('key' => 'value')); It's not great, but PHP doesn't have a object

[PHP] object literals

2009-04-30 Thread Tom Worster
is there a neat literal syntax for creating objects on the fly without defining a type? whenever i need to do it i do something like $x = (object) array('a'=>1, 'b'=>3, ...); which works but isn't very lovely. it's neater in, for example, javascript. -- PHP General Mailing List (http://w

Re: [PHP] Object Context Question in object->object->variable SOLVED

2009-03-02 Thread Sancar Saran
On Monday 02 March 2009 20:50:56 Sancar Saran wrote: > Hello list. > > I'm trying to implement someting on OO way. > > I got 2 classes > > class a { > var $config = array(); > var $b = ''; > > function __construct { >$this->b = new b($this->config); > } > > } > > class b { > var $conf

[PHP] Object Context Question in object->object->variable

2009-03-02 Thread Sancar Saran
Hello list. I'm trying to implement someting on OO way. I got 2 classes class a { var $config = array(); var $b = ''; function __construct { $this->b = new b($this->config); } } class b { var $config = array(); function foo() { switch($this->config['bar']) { } } }

Re: [PHP] object persistence within a session

2008-11-10 Thread Andrew Ballard
On Mon, Nov 10, 2008 at 9:47 AM, <[EMAIL PROTECTED]> wrote: > >> But joins are what relation databases excel at, so PHP would be the >> bottleneck in your example. > > Not always... > > If your JOIN can not be easily constrained in the query, until some kind of > processing of the result set take

Re: [PHP] object persistence within a session

2008-11-10 Thread Ashley Sheridan
On Mon, 2008-11-10 at 14:47 +, [EMAIL PROTECTED] wrote: > > But joins are what relation databases excel at, so PHP would be the > > > bottleneck in your example. > > > > Not always... > > > > If your JOIN can not be easily constrained in the query, until some kind of > processing of th

Re: [PHP] object persistence within a session

2008-11-10 Thread ceo
> But joins are what relation databases excel at, so PHP would be the > bottleneck in your example. Not always... If your JOIN can not be easily constrained in the query, until some kind of processing of the result set takes place, you can end up with a monster interim result set that wi

Re: [PHP] object persistence within a session

2008-11-10 Thread Ashley Sheridan
On Mon, 2008-11-10 at 14:29 +, [EMAIL PROTECTED] wrote: > And there are times when the JOINs for the one-query solution will > kill you anyway, but with proper pagination, the dozen multi-query > solution will zip along merrily. But joins are what relation databases excel at, so PHP would be t

RE: [PHP] object persistence within a session

2008-11-10 Thread Boyd, Todd M.
> -Original Message- > From: Andrew Ballard [mailto:[EMAIL PROTECTED] > Sent: Monday, November 10, 2008 8:04 AM > To: [EMAIL PROTECTED] > Cc: php-general@lists.php.net > Subject: Re: [PHP] object persistence within a session > > On Mon, Nov 10, 2008 at 8:55 AM, &

Re: [PHP] object persistence within a session

2008-11-10 Thread ceo
> Perhaps, but the examples I usually find when cleaning up code are of > the variety where a script executes one statement to find a list of > parent records, iterates through those records and inside the loop it > executes another statement (sometimes multiple statements!) to get the > d

Re: [PHP] object persistence within a session

2008-11-10 Thread Eric Butera
On Mon, Nov 10, 2008 at 8:55 AM, <[EMAIL PROTECTED]> wrote: > >> I've found that I don't mind a few well organized database calls per >> page for the information I need. > > Opening up a database connection is very expensive. > > Sending one more simple / fast query is dirt cheap. > > Time it on y

Re: [PHP] object persistence within a session

2008-11-10 Thread Andrew Ballard
On Mon, Nov 10, 2008 at 8:55 AM, <[EMAIL PROTECTED]> wrote: > >> I've found that I don't mind a few well organized database calls per >> page for the information I need. > > Opening up a database connection is very expensive. > > Sending one more simple / fast query is dirt cheap. > > Time it on y

Re: [PHP] object persistence within a session

2008-11-10 Thread ceo
> I've found that I don't mind a few well organized database calls per > page for the information I need. Opening up a database connection is very expensive. Sending one more simple / fast query is dirt cheap. Time it on your system with http://php.net/microtime and see. -- PHP Gene

Re: [PHP] object persistence within a session

2008-11-07 Thread Andrew Ballard
On Fri, Nov 7, 2008 at 3:54 PM, Stan <[EMAIL PROTECTED]> wrote: > Andrew, > Do I feel stupid! > Thanks. Welcome to the list. No need to feel stupid, and you're welcome. We were all here at some point. Even tedd, who has been programming since Rocks apparently. :-) At least you read up on the langu

Re: [PHP] object persistence within a session

2008-11-07 Thread Shawn McKenzie
tedd wrote: > At 7:08 PM +0100 11/7/08, Jochem Maas wrote: >> Stan schreef: >>> If this is the wrong forum, please point me at the correct forum. >>> >>> I am new to PHP but have 40 years experience programming. >> >> cool. we're you around when they programmed with Rocks[tm]? :-) >> (stick aroun

Re: [PHP] object persistence within a session

2008-11-07 Thread tedd
At 7:08 PM +0100 11/7/08, Jochem Maas wrote: Stan schreef: If this is the wrong forum, please point me at the correct forum. I am new to PHP but have 40 years experience programming. cool. we're you around when they programmed with Rocks[tm]? :-) (stick around a while and you'll get to know

Re: [PHP] object persistence within a session

2008-11-07 Thread Stan
Jochem, So ... what I did was to experiment with the idea of creating a database schema that would allow me to define a web page. One row, one web page. Contained navigation information (bar left, right, bottom, top, none), title, pointer to the file containing the HTML document for the main page.

[PHP] object persistence within a session is resolved

2008-11-07 Thread Stan
Thank you all for your assistance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] object persistence within a session

2008-11-07 Thread Stan
Andrew, Do I feel stupid! Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] object persistence within a session

2008-11-07 Thread Jochem Maas
Stan schreef: > If this is the wrong forum, please point me at the correct forum. > > I am new to PHP but have 40 years experience programming. cool. we're you around when they programmed with Rocks[tm]? :-) (stick around a while and you'll get to know that inside joke) > My initial effort inclu

Re: [PHP] object persistence within a session

2008-11-07 Thread Eric Butera
On Fri, Nov 7, 2008 at 8:33 AM, Stan <[EMAIL PROTECTED]> wrote: > If this is the wrong forum, please point me at the correct forum. > > I am new to PHP but have 40 years experience programming. > > My initial effort includes a class definition which needs to persist for the > duration of a WWW ses

Re: [PHP] object persistence within a session

2008-11-07 Thread Andrew Ballard
On Fri, Nov 7, 2008 at 8:33 AM, Stan <[EMAIL PROTECTED]> wrote: > If this is the wrong forum, please point me at the correct forum. > > I am new to PHP but have 40 years experience programming. > > My initial effort includes a class definition which needs to persist for the > duration of a WWW ses

Re: [PHP] object persistence within a session

2008-11-07 Thread uaca man
>Did storing the object reference not also store the class definition? No. You need to include the class definition. Take a look at: http://br.php.net/manual/en/function.unserialize.php, maybe you can use the *unserialize_callback_func *to load the class definition. Ângelo 2008/11/7 Stan <[EM

[PHP] object persistence within a session

2008-11-07 Thread Stan
If this is the wrong forum, please point me at the correct forum. I am new to PHP but have 40 years experience programming. My initial effort includes a class definition which needs to persist for the duration of a WWW session. The code (this snippet is the beginning of Default.php) $value

Re: [PHP] Object overhead vs. arrays

2008-08-07 Thread Nathan Nobbe
On Thu, Aug 7, 2008 at 7:21 AM, Christoph Boget <[EMAIL PROTECTED]>wrote: > I knew that there would be some overhead when working with objects vs > working with arrays, but I didn't expect this much. Is there some > optimization that I could do to improve the performance any? While > the script

[PHP] Object overhead vs. arrays

2008-08-07 Thread Christoph Boget
I knew that there would be some overhead when working with objects vs working with arrays, but I didn't expect this much. Is there some optimization that I could do to improve the performance any? While the script below is just a benchmark test script, it approximates functionality that I'm going

[PHP] Object reference into variable?

2007-08-07 Thread GMail
Hello, I have a question (what a surprise :-) ) I browsed the archives, but didn't find what I'm looking for. I have an object instance stored in some variable (like $myobject). I want to save this instance into another variable (like $tempobject). I thought, this will be the way: $myobject

Re: [PHP] Object instance and session

2007-07-24 Thread Stut
Stefano Esposito wrote: Hi all, i've a self-defined class describing an user. In the login page i create an instance of the user object and store it in $_SESSION['user']. When accessing $_SESSION['user'] from other pages (of course I do require('user.php'); and session_start();) i got this er

[PHP] Object instance and session

2007-07-24 Thread Stefano Esposito
Hi all, i've a self-defined class describing an user. In the login page i create an instance of the user object and store it in $_SESSION['user']. When accessing $_SESSION['user'] from other pages (of course I do require('user.php'); and session_start();) i got this errors: Warning: mysqli::

Re: [PHP] Object-oriented $_REQUEST?

2007-05-02 Thread Richard Lynch
On Sat, April 28, 2007 3:54 pm, js wrote: > For me, PHP's issetting or emptying $_GET, $_POST or $_REQUEST is > cumbersome. > want it to be more easy and comfortable. > > I could say I want a JSP's HttpServletRequest for PHP. > (http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/http/

Re: [PHP] Object-oriented $_REQUEST?

2007-04-28 Thread keviN
I am missing the point of this 'request' class. -Logan > -Original Message- > From: js [mailto:[EMAIL PROTECTED] > Sent: Saturday, April 28, 2007 2:56 PM > To: php-general@lists.php.net > Subject: [PHP] Object-oriented $_REQUEST? > > Hi. > > I'm lo

Re: [PHP] Object-oriented $_REQUEST?

2007-04-28 Thread js
ray (or 4 if you include GPC and request) would become unnecessary overhead. But then again, maybe I am missing the point of this 'request' class. -Logan > -Original Message- > From: js [mailto:[EMAIL PROTECTED] > Sent: Saturday, April 28, 2007 2:56 PM > To: php-gener

RE: [PHP] Object-oriented $_REQUEST?

2007-04-28 Thread Buesching, Logan J
ilto:[EMAIL PROTECTED] > Sent: Saturday, April 28, 2007 2:56 PM > To: php-general@lists.php.net > Subject: [PHP] Object-oriented $_REQUEST? > > Hi. > > I'm looking for implementation of request object > that represent a request that works like this. > >

[PHP] Object-oriented $_REQUEST?

2007-04-28 Thread js
Hi. I'm looking for implementation of request object that represent a request that works like this. $r = new request(); if ($r->method == 'GET') $name = $r->GET->get('name'); $age = $r->GET->get('age'); else if (request.method == 'POST') $name = $r->POST->get('name'); $age = $r->POST

Re: [PHP] Object ID

2007-02-14 Thread Eli
Hmm.. sorry.. just checked it now, and you're right.. The #id in the dump and the hash given by spl_object_hash() give a unique ID among the objects instantiated in your process.. If you unset some of the objects, and re-create new instances of them, you may get the SAME ids you had before..

Re: [PHP] Object ID

2007-02-14 Thread Eli
Every dump of the same node will produce the same #id. Cloned object, is a separated new object which will have a different id. The spl_object_hash function produces such an id too (32 hex chars), which doesn't change if you change the object members. Richard Lynch wrote: I suspect that's not

Re: [PHP] Object ID

2007-02-14 Thread Richard Lynch
I suspect that's not an "absolute" ID, but just an ID for that particular dump. So it has no applicability beyond that dump... On Wed, February 14, 2007 11:31 am, Eli wrote: > Hi, > > How can I get the object ID number of each Object in PHP (v.5.2) ? > > The ID number is the one produced when dum

Re: [PHP] Object ID

2007-02-14 Thread Eli
Roman Neuhauser wrote: How can I get the object ID number of each Object in PHP (v.5.2) ? http://cz2.php.net/manual/en/function.spl-object-hash.php Thanks!!! That is exactly what I need... :-) === output: string(32) "eaa76ef5378142caec7b40b56e4b6314" string(32) "6168ec2b9db13132570a79ef0410

Re: [PHP] Object ID

2007-02-14 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-02-14 19:31:00 +0200: > Hi, > > How can I get the object ID number of each Object in PHP (v.5.2) ? http://cz2.php.net/manual/en/function.spl-object-hash.php -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you

[PHP] Object ID

2007-02-14 Thread Eli
Hi, How can I get the object ID number of each Object in PHP (v.5.2) ? The ID number is the one produced when dumping: === output: object(A)#1 (0) { } object(B)#2 (0) { } I do not want to buffer and parse the dumped string... Is there a nicer way? -thanks! -- PHP General Mailing List (http:/

Re: [PHP] Object-Oriented PHP Courses in the UK

2006-10-18 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-18 16:28:04 +0100: > I'm relatively new to object-oriented PHP. I'm loving things like > Symfony and Smarty etc but really need a little more guidance! > > Does anyone know of a good object-oriented PHP course > available in the UK? > > Perhaps something my company

[PHP] Object-Oriented PHP Courses in the UK

2006-10-18 Thread Matthew Vickery
I'm relatively new to object-oriented PHP. I'm loving things like Symfony and Smarty etc but really need a little more guidance! Does anyone know of a good object-oriented PHP course available in the UK? Perhaps something my company could send me on or I could do in the evenings. Many thanks,

Re: [PHP] Object to array conversion oddity

2006-09-26 Thread Marcus Bointon
On 26 Sep 2006, at 23:52, Richard Lynch wrote: You start using that PHP5 private/protected stuff, and it just doesn't make sense to coerce it to an array, imho. I'm quite aware of that, and in this case I'm using it in a one-off string-and-glue fix for a specific problem until I fix it prope

Re: [PHP] Object to array conversion oddity

2006-09-26 Thread Richard Lynch
On Sat, September 23, 2006 10:39 am, Marcus Bointon wrote: > On 23 Sep 2006, at 16:37, Ray Hauge wrote: > >> Could you do something like this? >> >> $private = "Myclass" >> $protected = "*"; > > No, because if I have a property called 'Myclassfield1', after > casting to an array I can't tell if it'

Re: [PHP] Object to array conversion oddity

2006-09-24 Thread Robert Cummings
On Sun, 2006-09-24 at 22:26 +0100, Marcus Bointon wrote: > On 24 Sep 2006, at 22:07, Ray Hauge wrote: > > > Maybe you missed it, but he did submit a bug report: > > > > http://bugs.php.net/?id=38935 > > > > He just wanted to see if other people had run into a similar > > situation before > > sub

Re: [PHP] Object to array conversion oddity

2006-09-24 Thread Marcus Bointon
On 24 Sep 2006, at 22:07, Ray Hauge wrote: Maybe you missed it, but he did submit a bug report: http://bugs.php.net/?id=38935 He just wanted to see if other people had run into a similar situation before submitting the bug... from my understanding. I don't want to put words in Marcus' mo

  1   2   3   4   >