Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion #1590: [PATCH] Doctrine_Record_Listener options getter/setter to dis-/enable listener at runtime
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
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
Doctrine  
View profile   Translate to Translated (View Original)
 More options 21 Oct 2008, 10:42
From: "Doctrine" <no-re...@phpdoctrine.org>
Date: Tue, 21 Oct 2008 09:42:30 -0000
Local: Tues 21 Oct 2008 10:42
Subject: [Doctrine] #1590: [PATCH] Doctrine_Record_Listener options getter/setter to dis-/enable listener at runtime
#1590: [PATCH] Doctrine_Record_Listener options getter/setter to  dis-/enable
listener at runtime
---------------------------------------+----------------------------------- -
 Reporter:  su                         |       Owner:  romanb
     Type:  enhancement                |      Status:  new    
 Priority:  minor                      |   Milestone:  Unknown
Component:  Record                     |     Version:  1.0.3  
 Keywords:  record, listener, runtime  |    Has_test:  0      
 Mystatus:  Pending Core Response      |   Has_patch:  1      
---------------------------------------+----------------------------------- -
 As discussed in the mailing-list, I attached a patch which adds a
 $_options class var + getter/setter method to the Doctrine_Record_Listener
 class, which would give us the opportunity to dis-/enable record listener
 at runtime.

 This solution is working if the Listener are checking their options array
 at the corresponding hooks like the bundled Timstampable listener and many
 others does.

 Example code to disable the timestampable (in this example the first
 attached listener) listener at runtime with the applied patch:
 {{{
 // get the first (in our case the timstampable) listener for the record
 $timestampable = $record->getListener()->get(0);

 // disable setting of created_at at the timestampable listener
 $timestampable->setOption(array('created' => array('disabled' => true)));
 }}}

--
Ticket URL: <http://trac.doctrine-project.org/ticket/1590>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper


    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
©2009 Google