/** * Disco form must be passed in -- callbacks will be attached to various process points in * disco * @param $disco_form The Disco form containing fields whose characters should be limited */ public function __construct($disco_form) { $this->disco_form = $disco_form; $this->disco_form->add_callback(array($this, 'check_field_lengths'), 'run_error_checks'); $this->disco_form->add_callback(array($this, 'include_js'), 'pre_show_form'); $this->disco_form->add_callback(array($this, 'add_limiter_comments'), 'on_every_time'); }
/** * Disco form must be passed in -- callbacks will be attached to various process points in * disco * @param $disco_form The Disco form to check for spam */ public function __construct($disco_form) { $this->disco_form = $disco_form; $this->disco_form->add_callback(array($this, 'detect_spam'), 'run_error_checks'); }