Author: mahono
Date: 2010-01-21 12:18:28 +0100 (Thu, 21 Jan 2010)
New Revision: 26975
Modified:
plugins/sfSympalPlugin/trunk/lib/task/sfSympalConfigureTask.class.php
Log:
[1.4][sfSympalPlugin][1.0] Adds support for YAML inline values to
sympal:configure task
Modified: plugins/sfSympalPlugin/trunk/lib/task/sfSympalConfigureTask.class.php
===================================================================
--- plugins/sfSympalPlugin/trunk/lib/task/sfSympalConfigureTask.class.php
2010-01-21 11:16:58 UTC (rev 26974)
+++ plugins/sfSympalPlugin/trunk/lib/task/sfSympalConfigureTask.class.php
2010-01-21 11:18:28 UTC (rev 26975)
@@ -40,18 +40,26 @@
$value = is_numeric($value) ? (int) $value : $value;
$value = $value == 'false' ? false : $value;
$value = $value == 'true' ? true : $value;
+
+ $infoValue = $value;
+ if (in_array(substr($value, 0, 1), array('[', '{')))
+ {
+ $value = sfYamlInline::load($value);
+ $infoValue = 'YAML: '.$infoValue;
+ }
+
$writeToApp = isset($options['application']) && $options['application']
? true : false;
if ($group)
{
- $this->logSection('sympal', sprintf('Writing setting "%s" with a value
of "%s" under the "%s" group.', $key, $value, $group));
+ $this->logSection('sympal', sprintf('Writing setting "%s" with a value
of "%s" under the "%s" group.', $key, $infoValue, $group));
sfSympalConfig::writeSetting($group, $key, $value, $writeToApp);
} else {
- $this->logSection('sympal', sprintf('Writing setting "%s" with a value
of "%s".', $key, $value, $group));
+ $this->logSection('sympal', sprintf('Writing setting "%s" with a value
of "%s".', $key, $infoValue, $group));
sfSympalConfig::writeSetting(null, $key, $value, $writeToApp);
}
}
}
-}
\ No newline at end of file
+}
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.