Google Groups Home
Help | Sign in
Catch set event
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all
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.
Jonathan Wage  
View profile
 More options 8 Jul, 13:41
From: "Jonathan Wage" <jonw...@gmail.com>
Date: Tue, 8 Jul 2008 07:41:26 -0500
Local: Tues 8 Jul 2008 13:41
Subject: Re: [doctrine-user] Catch set event

I am not exactly sure what you're trying to accomplish. Can we see some more
sample code? Maybe the code you're using in set()?

- Jon

On Fri, Jul 4, 2008 at 4:20 PM, robert henniger <

--
Jonathan Wage
http://www.jwage.com
http://www.centresource.com

    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.
End of messages
« Back to Discussions « Newer topic     Older topic »

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