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
>> {
>>
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 =
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
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
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
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')
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
# [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
> >
> >
# [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
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
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
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
Thanks everyone for the recommendations =)
> -Original Message-
> On Fri, 10 Sep 2004 15:09:57 -0700, Ed Lazor <[EMAIL PROTECTED]> wrote:
> >Any recommendations on the best PHP5 OOP book to get? I have Advanced
> PHP
> >Programming by George Schlossnagle. It's turning out to be a great b
On Fri, 10 Sep 2004 15:09:57 -0700, Ed Lazor <[EMAIL PROTECTED]> wrote:
Any recommendations on the best PHP5 OOP book to get? I have Advanced PHP
Programming by George Schlossnagle. It's turning out to be a great book,
but I'd like to read more on PHP5 OOP. The first chapter recommends two
books
Greg Donald wrote:
On Fri, 10 Sep 2004 15:09:57 -0700, Ed Lazor <[EMAIL PROTECTED]> wrote:
Any recommendations on the best PHP5 OOP book to get? I have Advanced PHP
Programming by George Schlossnagle. It's turning out to be a great book,
but I'd like to read more on PHP5 OOP. The first chapter r
On Fri, 10 Sep 2004 15:09:57 -0700, Ed Lazor <[EMAIL PROTECTED]> wrote:
> Any recommendations on the best PHP5 OOP book to get? I have Advanced PHP
> Programming by George Schlossnagle. It's turning out to be a great book,
> but I'd like to read more on PHP5 OOP. The first chapter recommends two
From: "Joel Kitching" <[EMAIL PROTECTED]>
> Hello, I'm trying to get the hang of OOP here but can't quite figure
> out how to relate these classes. I've got one for the main project,
> one for the database, and one for a user. Somehow I need to get the
> user access to the database, without cumb
> Hello, I'm trying to get the hang of OOP here but can't quite figure
> out how to relate these classes. I've got one for the main project,
> one for the database, and one for a user. Somehow I need to get the
> user access to the database, without cumbersome constructor calls
> involving a copy
* 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
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
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
21 matches
Mail list logo