resources: Collapse all jQuery UI modules into one deprecated mega-module
[lhc/web/wiklou.git] / includes / deferred / DataUpdate.php
index d2d8bd7..ed9a746 100644 (file)
 abstract class DataUpdate implements DeferrableUpdate {
        /** @var mixed Result from LBFactory::getEmptyTransactionTicket() */
        protected $ticket;
+       /** @var string Short update cause action description */
+       protected $causeAction = 'unknown';
+       /** @var string Short update cause user description */
+       protected $causeAgent = 'unknown';
 
        public function __construct() {
                // noop
@@ -41,6 +45,29 @@ abstract class DataUpdate implements DeferrableUpdate {
                $this->ticket = $ticket;
        }
 
+       /**
+        * @param string $action Action type
+        * @param string $user User name
+        */
+       public function setCause( $action, $user ) {
+               $this->causeAction = $action;
+               $this->causeAgent = $user;
+       }
+
+       /**
+        * @return string
+        */
+       public function getCauseAction() {
+               return $this->causeAction;
+       }
+
+       /**
+        * @return string
+        */
+       public function getCauseAgent() {
+               return $this->causeAgent;
+       }
+
        /**
         * Convenience method, calls doUpdate() on every DataUpdate in the array.
         *