|
Revision 9085, 1.7 kB
(checked in by Carl.Vondrick, 5 years ago)
|
1.1: fixed @param phpdoc to fit specs in config (refs #2991)
|
- Property svn:mime-type set to
text/x-php
- Property svn:eol-style set to
native
- Property svn:keywords set to
Id Rev Date
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
class sfSecurityConfigHandler extends sfYamlConfigHandler |
|---|
| 20 |
{ |
|---|
| 21 |
|
|---|
| 22 |
* Executes this configuration handler. |
|---|
| 23 |
* |
|---|
| 24 |
* @param array $configFiles An array of absolute filesystem path to a configuration file |
|---|
| 25 |
* |
|---|
| 26 |
* @return string Data to be written to a cache file |
|---|
| 27 |
* |
|---|
| 28 |
* @throws <b>sfConfigurationException</b> If a requested configuration file does not exist or is not readable |
|---|
| 29 |
* @throws <b>sfParseException</b> If a requested configuration file is improperly formatted |
|---|
| 30 |
* @throws <b>sfInitializationException</b> If a view.yml key check fails |
|---|
| 31 |
*/ |
|---|
| 32 |
public function execute($configFiles) |
|---|
| 33 |
{ |
|---|
| 34 |
|
|---|
| 35 |
$config = self::getConfiguration($configFiles); |
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 |
$retval = sprintf("<?php\n". |
|---|
| 39 |
"// auto-generated by sfSecurityConfigHandler\n". |
|---|
| 40 |
"// date: %s\n\$this->security = %s;\n", |
|---|
| 41 |
date('Y/m/d H:i:s'), var_export($config, true)); |
|---|
| 42 |
|
|---|
| 43 |
return $retval; |
|---|
| 44 |
} |
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 |
* @see sfConfigHandler |
|---|
| 48 |
*/ |
|---|
| 49 |
static public function getConfiguration(array $configFiles) |
|---|
| 50 |
{ |
|---|
| 51 |
$config = self::flattenConfiguration(self::parseYamls($configFiles)); |
|---|
| 52 |
|
|---|
| 53 |
|
|---|
| 54 |
$config = array_change_key_case($config); |
|---|
| 55 |
|
|---|
| 56 |
return $config; |
|---|
| 57 |
} |
|---|
| 58 |
} |
|---|
| 59 |
|
|---|