Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- Detect user's language errors and notify it to the current event manager.
- Usage: $this->languageErrorDetector(Yii::app()->user->id, Yii::app()->currentEventManager);
- @param string the User Identificator.
- @param EventManager $event_manager the current event manager
- @returns void
- */
- function languageErrorDetector($user_id, $event_manager) {
- foreach(array_merge(array("haver", "avia", "hise", "ise", "estoi", "quiciera", "cer", "alluda", "boi", "boy, "aser"), $this->allKeywords()) as $keyword)
- $event_manager->fireEvent($user_id, EventManager::FATAL_LANGUAGE_ERROR, $keyword);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement