Browse Source

Remove numeric index support when configuring Tables with validators

Chris Burke 11 years ago
parent
commit
f01f8fed6a
1 changed files with 2 additions and 4 deletions
  1. 2 4
      src/ORM/Table.php

+ 2 - 4
src/ORM/Table.php

@@ -215,8 +215,7 @@ class Table implements RepositoryInterface, EventListenerInterface
      * - associations: An AssociationCollection instance.
      * - validator: A Validator instance which is assigned as the "default"
      *   validation set, or an associative array, where key is the name of the
-     *   validation set and value the Validator instance. If a key is omitted, then
-     *   the "default" validation set is assumed.
+     *   validation set and value the Validator instance.
      *
      * @param array $config List of options for this table
      */
@@ -251,8 +250,7 @@ class Table implements RepositoryInterface, EventListenerInterface
             if (!is_array($config['validator'])) {
                 $this->validator(null, $config['validator']);
             } else {
-                foreach ($config['validator'] as $key => $validator) {
-                    $name = (!is_int($key)) ? $key : null;
+                foreach ($config['validator'] as $name => $validator) {
                     $this->validator($name, $validator);
                 }
             }