1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- class sfValidatorCallback extends sfValidatorBase
- {
-
- protected function configure($options = array(), $messages = array())
- {
- $this->addRequiredOption('callback');
- $this->addOption('arguments', array());
- $this->setOption('required', false);
- }
-
- protected function doClean($value)
- {
- return call_user_func($this->getOption('callback'), $this, $value, $this->getOption('arguments'));
- }
- }
|