/** * (internal use only) * * @param WikiaMockProxyAction $action */ public function notify(WikiaMockProxyAction $action) { $type = $action->getEventType(); $id = $action->getEventId(); $currentState = $this->mocks[$type][$id][self::PROP_STATE]; $desiredState = $this->enabled && $action->isActive(); if ($currentState != $desiredState) { $this->updateState($type, $id, $desiredState); $this->mocks[$type][$id][self::PROP_STATE] = $desiredState; } }