ActiveRecord\Validations::__construct PHP Method

__construct() public method

Constructs a {@link Validations} object.
public __construct ( ActiveRecord\Model $model ) : Validations
$model ActiveRecord\Model The model to validate
return Validations
    public function __construct(Model $model)
    {
        $this->model = $model;
        $this->record = new Errors($this->model);
        $this->klass = Reflections::instance()->get(get_class($this->model));
        $this->validators = array_intersect(array_keys($this->klass->getStaticProperties()), self::$VALIDATION_FUNCTIONS);
    }