Changeset 8679
- Timestamp:
- 04/29/08 18:01:14 (5 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfPropelNotificationPlugin/trunk/README
r8655 r8679 273 273 === trunk === 274 274 275 ==== 2008-04-29 ==== 276 * Notification logic methods are now passed the watch instance as second parameter 277 275 278 ==== 2008-04-28 ==== 276 279 * added setBeforeSave() and getBeforeSave() methods to public API plugins/sfPropelNotificationPlugin/trunk/config/sfPropelNotificationPlugin/types.yml
r3571 r8679 1 1 example_type: 2 enabled: o n2 enabled: off 3 3 logic_class: ExampleLogicProvider plugins/sfPropelNotificationPlugin/trunk/lib/util/sfPropelNotificationDispatcher.class.php
r3560 r8679 35 35 foreach ($watches as $watch) 36 36 { 37 if (self::isWorthNotifying($object, $watch _type))37 if (self::isWorthNotifying($object, $watch)) 38 38 { 39 39 foreach ($watch->getNotifiers() as $notifier) … … 74 74 * 75 75 * @param BaseObject $object 76 * @param string $watch_type76 * @param BaseObject $watch 77 77 * @return bool 78 78 */ 79 private static function isWorthNotifying(BaseObject $object, $watch_type)79 private static function isWorthNotifying(BaseObject $object, BaseObject $watch) 80 80 { 81 81 include(sfConfigCache::getInstance()->checkConfig('config/sfPropelNotificationPlugin/types.yml')); 82 82 $types = sfConfig::get('sfPropelNotificationPlugin_types'); 83 83 84 if (!isset($types[$watch _type]))84 if (!isset($types[$watch->getWatchType()])) 85 85 { 86 $msg = sprintf('Unknown notification type "%s"', $watch _type);86 $msg = sprintf('Unknown notification type "%s"', $watch->getWatchType()); 87 87 throw new Exception($msg); 88 88 } 89 89 90 90 return call_user_func(array($types[$watch_type]['logic_class'], 91 sfInflector::camelize($watch _type)), $object);91 sfInflector::camelize($watch->getWatchType())), $object, $watch); 92 92 } 93 93