Google Groups Home
Help | Sign in
Message from discussion Catch set event
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
robert henniger  
View profile
 More options 4 Jul, 22:20
From: robert henniger <robert.henni...@googlemail.com>
Date: Fri, 4 Jul 2008 14:20:50 -0700 (PDT)
Local: Fri 4 Jul 2008 22:20
Subject: Catch set event
Hi I have a new Question.
In my application logic i have to catch every set event on the
records.
I have attached some logic to the set methode which is executed on
update and on insert.
This works very well....
But when I have some related objects for example:

$group->name = "User" // should call group::set(name, 'User') => works
as expected
$group->user[0]->name = "Robert" // in my opinion
group::user::set(name, 'Robert')

/*
group and user extend Entity
which implements a set methode.
After doing its job this Entity::set calls parent::set()
*/

I know that the property "user" is accessed over the __get methode
because it is "physically" not available.
Now my question: How can i check if the set methode call is for the
actual ('group') record or for the related record ('user').

Thanks in advance.

Best regards

Robert


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google