added more facades.

This commit is contained in:
Taylor Otwell
2011-09-03 23:05:06 -05:00
parent 31e2c1c49e
commit 2d170e2314
9 changed files with 38 additions and 45 deletions

View File

@@ -2,7 +2,10 @@
use Laravel\IoC;
use Laravel\Str;
use Laravel\Lang;
use Laravel\Facade;
use Laravel\Lang_Factory;
class Validator_Facade extends Facade { public static $resolve = 'validator'; }
class Validator {
@@ -68,24 +71,11 @@ class Validator {
* @param Lang $lang
* @return void
*/
public function __construct(Lang $lang)
public function __construct(Lang_Factory $lang)
{
$this->lang = $lang;
}
/**
* Factory for creating new validator instances.
*
* @param array $attributes
* @param array $rules
* @param array $messages
* @return Validator
*/
public static function make($attributes, $rules, $messages = array())
{
return IoC::resolve('laravel.validator')->of($attributes, $rules, $messages);
}
/**
* Set the attributes, rules, and messages for the validator.
*
@@ -104,6 +94,8 @@ class Validator {
$this->attributes = $attributes;
$this->messages = $messages;
$this->rules = $rules;
return $this;
}
/**