public function fill(array $array)
 {
     foreach ($array as $key => $value) {
         $method_name = 'set' . App::toCamelCase($key);
         if (method_exists(get_class($this), $method_name)) {
             call_user_func_array(array($this, $method_name), array($value));
         }
     }
 }
 /**
  * Returns a namespace, generated from a bundle name and a model name.
  *
  * @param string $bundle_name Bundle name
  * @param string $model_name Model name (optional)
  *
  * @return string The generated namespace
  */
 public function getNamespace($bundle_name, $model_name = null)
 {
     if ($model_name == null) {
         return Config::$app_namespace . '\\' . App::toCamelCase($bundle_name) . 'Bundle\\Model';
     } else {
         return Config::$app_namespace . '\\' . App::toCamelCase($bundle_name) . 'Bundle\\Model\\' . App::toCamelCase($model_name);
     }
 }