| | 61 | // validate parameters |
|---|
| | 62 | |
|---|
| | 63 | /* |
|---|
| | 64 | * Behavior classes can implement a `checkConfig(array $parameters, string $class)` method. |
|---|
| | 65 | * |
|---|
| | 66 | * This method can be used to validate configuration given by user. It should throw a `sfConfigurationException` |
|---|
| | 67 | * if supplied configuration is not valid. |
|---|
| | 68 | * |
|---|
| | 69 | * For this to work correctly, behavior name (first argument to |
|---|
| | 70 | * `sfPropelBehavior::add()`, `sfPropelBehavior::registerHook()` and `sfPropelBehavior::registerMethod()`) |
|---|
| | 71 | * must be the name of the class implementing the `checkConfig()` method. |
|---|
| | 72 | */ |
|---|
| | 73 | $validation_callback = array($name, 'checkConfig'); |
|---|
| | 74 | if (is_callable($validation_callback)) |
|---|
| | 75 | { |
|---|
| | 76 | call_user_func($validation_callback, $parameters, $class); |
|---|
| | 77 | } |
|---|
| | 78 | |
|---|