public function setField($name, $value)
    {
        if (Helpers\Validate::table($this->name)->field($name) && Helpers\Validate::table($this->name)->type($name, $value))
        {
            $this->set->{$name} = is_string($value) && false === mb_check_encoding($value, 'UTF-8')
                ? utf8_encode($value)
                : $value;
        }

        return $this;
    }
public function setField($name, $value)
    {
        if (Helpers\Validate::table($this->name)->field($name) && Helpers\Validate::table($this->name)->type($name, $value))
        {
            $this->set->{$name} = is_string($value) && false === mb_check_encoding($value, 'UTF-8')
                ? utf8_encode($value)
                : $value;
        }

        return $this;
    }
public function setField ( $ name , $ value ) { if ( Helpers \ Validate :: table ( $ this -> name ) -> field ( $ name ) && Helpers \ Validate :: table ( $ this -> name ) -> type ( $ name , $ value ) ) { $ this -> set -> { $ name } = is_string ( $ value ) && false === mb_check_encoding ( $ value , 'UTF-8' ) ? utf8_encode ( $ value ) : $ value ; } return $ this ; }
Validating fields and setting variables to current operations

@uses \Lazer\Classes\Helpers\Validate::field() to check that field exist
@uses \Lazer\Classes\Helpers\Validate::type() to check that field type is correct
@param string $name  Field name
@param mixed  $value Field value
@return self
@throws LazerException
Validating fields and setting variables to current operations