|
|
@@ -46,8 +46,19 @@ class Zend_Filter_StringToUpper implements Zend_Filter_Interface
|
|
|
*/
|
|
|
public function __construct($options = null)
|
|
|
{
|
|
|
- if (is_array($options) && array_key_exists('encoding', $options)) {
|
|
|
- $options = $options['encoding'];
|
|
|
+ if ($options instanceof Zend_Config) {
|
|
|
+ $options = $options->toArray();
|
|
|
+ } else if (!is_array($options)) {
|
|
|
+ $options = func_get_args();
|
|
|
+ $temp = array();
|
|
|
+ if (!empty($options)) {
|
|
|
+ $temp['encoding'] = array_shift($options);
|
|
|
+ }
|
|
|
+ $options = $temp;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (array_key_exists('encoding', $options)) {
|
|
|
+ $this->setEncoding($options);
|
|
|
}
|
|
|
|
|
|
$this->setEncoding($options);
|