Re: [PHP] PHP5 oop question...

2007-05-28 Thread Andrei
Stut wrote: > Andrei wrote: >> Hi list, >> >> I have a class which I use to parse simple bbcode inside some >> comments. >> I noticed on PHP5 that scope of preg_replace function is changed >> when function is called inside a class. To the point: >> >> [CODE] >> class PHS_editor >> { >>

Re: [PHP] PHP5 oop question...

2007-05-28 Thread Stut
Andrei wrote: Hi list, I have a class which I use to parse simple bbcode inside some comments. I noticed on PHP5 that scope of preg_replace function is changed when function is called inside a class. To the point: [CODE] class PHS_editor { ... function parse_content( $str =

Re: [PHP] php5 oop question

2007-04-12 Thread Larry Garfield
I have never heard that described as a "fluent interface" before, but you'd probably like jQuery. :-) It's a javascript library that uses much the same concept, although it refers to it as "function chaining". It also operates on multiple objects simultaneously, which is even niftier. On Thur

Re: [PHP] php5 oop question

2007-04-12 Thread Richard Lynch
a) I don't see how the part about the "dot notation" has anything to do with the class presetned b) I don't see any benefit to the class presented c) Trying to follow the chain of -> operators and method calls just gave me a headache. Other than that, it's really nifty. :-v On Thu, April 12, 20

Re: [PHP] php5 oop question

2007-04-12 Thread Jochem Maas
nice write up. :-) Tim Stiles wrote: > I suppose I should have summarized what I learned from that experiment, > putting myself more squarely on topic: Simply put, a Fluent interface > let me move from > /snip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www

Re: [PHP] php5 oop question

2007-04-12 Thread Tim Stiles
I suppose I should have summarized what I learned from that experiment, putting myself more squarely on topic: Simply put, a Fluent interface let me move from $_input->addCheck('Integer'); $_input->addCheck('Range',3,9); $_input->addCheck('NonEmpty'); to $_input->addCheck('Integer')

Re: [PHP] php5 oop question

2007-04-12 Thread Tim Stiles
I've seen it referred to as a "Fluent Interface". I built one just to see how hard it was, using a standard problem: data validation. The results were promising. I combined it with an object designed to work as a factory for an internally stored decorator pattern. Class Input was the fa

Re: [PHP] php5 oop question

2007-04-12 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-04-11 23:44:16 -0700: > Paul Scott wrote: > >On Wed, 2007-04-11 at 23:22 -0700, Jim Lucas wrote: > > > >>Has anybody else seen this style of syntax? > >> > >http://5ive.uwc.ac.za/index.php?module=blog&action=viewsingle&postid=init_8059_1163957717&userid=5729061010 > > > >

Re: [PHP] php5 oop question

2007-04-12 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-04-11 23:36:56 -0700: > Paul Scott wrote: > >On Wed, 2007-04-11 at 23:22 -0700, Jim Lucas wrote: > >>Has anybody else seen this style of syntax? > > >I don't think that its really useful for anything, except maybe creating > >overly complex SQL queries. > > What about usi

Re: [PHP] php5 oop question

2007-04-11 Thread Jim Lucas
Paul Scott wrote: On Wed, 2007-04-11 at 23:22 -0700, Jim Lucas wrote: Has anybody else seen this style of syntax? http://5ive.uwc.ac.za/index.php?module=blog&action=viewsingle&postid=init_8059_1163957717&userid=5729061010 I don't think that its really useful for anything, except maybe creati

Re: [PHP] php5 oop question

2007-04-11 Thread Jim Lucas
Paul Scott wrote: On Wed, 2007-04-11 at 23:22 -0700, Jim Lucas wrote: Has anybody else seen this style of syntax? http://5ive.uwc.ac.za/index.php?module=blog&action=viewsingle&postid=init_8059_1163957717&userid=5729061010 I don't think that its really useful for anything, except maybe creati

Re: [PHP] php5 oop question

2007-04-11 Thread Paul Scott
On Wed, 2007-04-11 at 23:22 -0700, Jim Lucas wrote: > Has anybody else seen this style of syntax? > http://5ive.uwc.ac.za/index.php?module=blog&action=viewsingle&postid=init_8059_1163957717&userid=5729061010 I don't think that its really useful for anything, except maybe creating overly complex

Re: [PHP] PHP5 - OOP Question

2004-08-09 Thread Curt Zirzow
* Thus wrote Hardik Doshi: > Hello Group, > > I would like to know which one is the most appropriate > way to implement the following scenario. > > For example, I want to display a products catalogue of > 100 products. I do have a base class of product which > contains all the basic property of t

Re: [PHP] PHP5 - OOP Question

2004-08-09 Thread Robby Russell
On Mon, 2004-08-09 at 19:29, Hardik Doshi wrote: > Hello Group, > > I would like to know which one is the most appropriate > way to implement the following scenario. > > For example, I want to display a products catalogue of > 100 products. I do have a base class of product which > contains all t

Re: [PHP] PHP5 - OOP Question

2004-08-09 Thread Robert Cummings
On Mon, 2004-08-09 at 22:29, Hardik Doshi wrote: > Hello Group, > > I would like to know which one is the most appropriate > way to implement the following scenario. > > For example, I want to display a products catalogue of > 100 products. I do have a base class of product which > contains all t