| | 5 | class sfCompatAutoload extends sfSimpleAutoload |
|---|
| | 6 | { |
|---|
| | 7 | } |
|---|
| | 8 | |
|---|
| | 9 | if (sfConfig::get('sf_compat_10')) |
|---|
| | 10 | { |
|---|
| | 11 | // autoload classes |
|---|
| | 12 | $autoload = sfCompatAutoload::getInstance(sfConfig::get('sf_app_cache_dir').'/sf_compat_autoloader.txt'); |
|---|
| | 13 | $autoload->addDirectory(dirname(__FILE__).'/../lib'); |
|---|
| | 14 | $autoload->register(); |
|---|
| | 15 | |
|---|
| | 16 | // register config handler for validate/*.yml files |
|---|
| | 17 | sfConfigCache::getInstance()->registerConfigHandler('modules/*/validate/*.yml', 'sfValidatorConfigHandler'); |
|---|
| | 18 | |
|---|
| | 19 | // register the validation execution filter |
|---|
| | 20 | sfConfig::set('sf_execution_filter', array('sfValidationExecutionFilter', array())); |
|---|
| | 21 | } |
|---|
| 6 | | |
|---|
| 7 | | if (sfConfig::get('sf_compat_10')) |
|---|
| 8 | | { |
|---|
| 9 | | // autoload classes |
|---|
| 10 | | $autoload = sfCompatAutoload::getInstance(sfConfig::get('sf_app_cache_dir').'/sf_compat_autoloader.txt'); |
|---|
| 11 | | $autoload->addDirectory(dirname(__FILE__).'/../lib'); |
|---|
| 12 | | $autoload->register(); |
|---|
| 13 | | |
|---|
| 14 | | // register config handler for validate/*.yml files |
|---|
| 15 | | sfConfigCache::getInstance()->registerConfigHandler('modules/*/validate/*.yml', 'sfValidatorConfigHandler'); |
|---|
| 16 | | |
|---|
| 17 | | // register the validation execution filter |
|---|
| 18 | | sfConfig::set('sf_execution_filter', array('sfValidationExecutionFilter', array())); |
|---|
| 19 | | } |
|---|