Beispiel #1
0
 /**
  * Adds a new default namespace
  *
  * @param array|string $namespace
  * @return null
  */
 public static function addDefaultNamespaces($namespace)
 {
     if (!is_array($namespace)) {
         $namespace = array((string) $namespace);
     }
     self::$_defaultNamespaces = array_unique(array_merge(self::$_defaultNamespaces, $namespace));
 }
Beispiel #2
0
 /**
  * Set plugin manager to use for locating validators
  *
  * @param  ValidatorPluginManager|null $plugins
  * @return void
  */
 public static function setPluginManager(ValidatorPluginManager $plugins = null)
 {
     // Don't share by default to allow different arguments on subsequent calls
     if ($plugins instanceof ValidatorPluginManager) {
         $plugins->setShareByDefault(false);
     }
     self::$plugins = $plugins;
 }
Beispiel #3
0
 /**
  * Set plugin loader to use for locating validators
  * 
  * @param  Loader\ShortNameLocater|null $loader 
  * @return void
  */
 public static function setPluginLoader(Loader\ShortNameLocater $loader = null)
 {
     self::$_pluginLoader = $loader;
 }
Beispiel #4
0
 /**
  * Set plugin broker to use for locating validators
  * 
  * @param  Broker|null $broke 
  * @return void
  */
 public static function setBroker(Broker $broker = null)
 {
     self::$broker = $broker;
 }