예제 #1
0
 public function __construct($config = null)
 {
     if ($config instanceof Zend_Config) {
         $config = $config->toArray();
     }
     if (is_array($config)) {
         if (array_key_exists('locale', $config)) {
             parent::_construct($config['locale']);
             unset($config['locale']);
         }
         foreach ($config as $key => $value) {
             $method = 'set' . ucfirst($key);
             if (method_exists($this, $method)) {
                 $this->{$method}($value);
             }
         }
     }
 }