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 method,
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
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
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.
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 write
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
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