Hi,
I'd like to propose a new function: spl_class_vars / params / contents.
Notice: I haven't figured out a name yet Please help me find one.. :-)
The function returns an array of the contents of the given class-object.
The class-object parameter may be text or rather directly the object ( new
f
Hello,
On Tue, Jan 20, 2009 at 8:30 PM, Kenan R Sulayman
wrote:
> Hi,
> I'd like to propose a new function: spl_class_vars / params / contents.
>
> Notice: I haven't figured out a name yet Please help me find one.. :-)
>
> The function returns an array of the contents of the given class-object.
Etienne Kneuss schrieb:
> Why can't you use Reflection in this case? It looks like you can quite
> easily implement that in userland from Reflection.
Especially using setAcessible() which was added in PHP 5.3.
--
Sebastian Bergmann http://sebastian-bergmann.de/
GnuPG Ke
setAcessible() is the way to go!
Doctrine 2.0 took advantage of it to be able to move to a completely
VO mapping of models. =)
Cheers,
On Wed, Jan 21, 2009 at 5:43 AM, Sebastian Bergmann
wrote:
> Etienne Kneuss schrieb:
>> Why can't you use Reflection in this case? It looks like you can quite
>
Thanks,
I did propose the function because the construction in user-land is quite
expensive;
Actually tests showed: the user-land algorithm of mapping these objects
(regarding a count of thousand; up to a half million objects / iterations)
took 0,2 - 70 seconds to execute!
Therefore: I would be v
Hi.
On 21.01.2009 11:44 Uhr, Kenan R Sulayman wrote:
I did propose the function because the construction in user-land is quite
expensive;
Reflection is expensive, indeed. The way we solved it for FLOW3 is to
create a ReflectionService that caches such information as long as the
source doesn'
On 21.01.2009, at 12:00, Karsten Dambekalns wrote:
Hi.
On 21.01.2009 11:44 Uhr, Kenan R Sulayman wrote:
I did propose the function because the construction in user-land is
quite
expensive;
Reflection is expensive, indeed. The way we solved it for FLOW3 is
to create a ReflectionService t
Lukas Kahwe Smith wrote:
> On 21.01.2009, at 12:00, Karsten Dambekalns wrote:
>
>> On 21.01.2009 11:44 Uhr, Kenan R Sulayman wrote:
>>> I did propose the function because the construction in user-land is
>>> quite
>>> expensive;
>>
>> Reflection is expensive, indeed. The way we solved it for FLOW3
Christian Schneider schrieb:
> Yes, please. Keep clutter out of the engine especially for stuff which
> should not be used often. If you are relying on Reflection to be fast
> for you everyday code then you're IMHO doing something weird and it is
> ok that you have to write your own caching for it
Christian Schneider wrote:
Lukas Kahwe Smith wrote:
On 21.01.2009, at 12:00, Karsten Dambekalns wrote:
On 21.01.2009 11:44 Uhr, Kenan R Sulayman wrote:
I did propose the function because the construction in user-land is
quite
expensive;
Reflection is expensive, indeed. The way we solved it f
First: I'd understand, I've to build the caching system on my own;
Second: I'd vote for speeding up Reflection.
Thanks,
--
(c) Kenan Sulayman
Freelance Designer and Programmer
Life's Live Poetry
2009/1/21 Nathan Rixham
> Christian Schneider wrote:
>
>> Lukas Kahwe Smith wrote:
>>
>>> On 21.01.
Nathan Rixham wrote:
> seems to me that many of the new requests coming in, including my own
> stupid ones are because people want to build fast decent orm's in php -
Having built an ORM system myself I can say that you don't need
Reflection (or even other fancy features not yet in PHP) for this.
Christian Schneider wrote:
Nathan Rixham wrote:
seems to me that many of the new requests coming in, including my own
stupid ones are because people want to build fast decent orm's in php -
Having built an ORM system myself I can say that you don't need
Reflection (or even other fancy features
On Jan 21, 2009, at 4:20 PM, Christian Schneider wrote:
Nathan Rixham wrote:
seems to me that many of the new requests coming in, including my own
stupid ones are because people want to build fast decent orm's in
php -
Having built an ORM system myself I can say that you don't need
Reflecti
My personal favorite use of Reflection is Class Factories. While this
could be done with:
It seems a little blunt to me, it also doesn't support having a
variable number of arguments to the constructor. I've seen some
pretty egregious hacks to make the above code work with a variable
number of
Roman Borschel schrieb:
> Would you mind sharing (off-list) how you get data in and out of the
> objects **transparently**
Have a look at lp:php-object-freezer.
--
Sebastian Bergmann http://sebastian-bergmann.de/
GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 686
16 matches
Mail list logo