hmm the data arrays are just "formats" to exchange information between
controllers, functions etc. you could refactor this to be
object-style, but imo this doesnt have much to do with OOprogramming.
cause the "real" objects in OOP are fixed entities (like the models
that we use in cake), in real
Thanks all ;)
I know of limitations of OO in PHP4. I "prefer" version 5 ... if I'm
able to choose not to use it :D
Bret writes :
"to override the core of
cakePHP's behavior and write code that takes cake's array format and
converts it to objects"
That's what I have done (adding some findOO meth
[EMAIL PROTECTED] wrote:
> So, yes [PHP4] does support OO programming. It just doesn't do it well and
> in the truest since of the term.
Neither does PHP5... something like Java is a "true" OO language, PHP5
is still mostly procedural augmented with OO functionality.
But like Chris said... that
Okay, you win. But I don't think it really helps Tony fix the problem
that started this thread. It's not a PHP 4 vs. PHP 5 issue, no
matter how many words you devote to telling me that PHP 5 is true
objected-oriented programming. It's a style issue, and if Tony needs
to mix functional programm
Not TRUE object oriented programming. That is the whole revelation of
PHP5 and why most frameworks aren't available to PHP4. Sure it has it
by being VERY careful in what you are doing. But it still is
cumbersome, prone to errors, and slow as compared to PHP5. Which
again, is why most framework
Hold on there, cowboy. PHP 4 does support object-oriented programming.
On 8/31/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Plus CakePHP works with PHP4 which doesn't support OO programming. So,
> that limitation means that to keep CakePHP working for PHP4 and PHP5
> they would need to
Plus CakePHP works with PHP4 which doesn't support OO programming. So,
that limitation means that to keep CakePHP working for PHP4 and PHP5
they would need to write a whole PHP engine to handle the differences
at the PHP level and bring the true OO when PHP5 is used instead of 4.
--~--~
Tony,
I agree, the retuning of arrays doesn't support good object-oriented
practices. But arrays are extremely flexible and easy to work with in
PHP, so that's probably why the developers chose to use them in
CakePHP. Version 2 of Cake, however, is supposively going to completely
change the way m
Hi there !
New to Cake, I discover the framework. I currently use Rails also.
Is there a reason for find/findAll methods to return an array, rather
than an object (instance of the model class) ? Is there other methods,
not documented, returning object rather than array ?
If returning an object