public function setDefault($attribute, $value, $type = null, $required = false, $nullable = false)
    {
        $this->defaults[$attribute] = $value;

        if (empty($type) === false) {
            $this->types[$attribute] = $type;
        }

        if ($required === true) {
            $this->requires[] = $attribute;
        }

        if ($nullable === false) {
            $this->notNullables[] = $attribute;
        }

        return $this;
    }
public function setDefault($attribute, $value, $type = null, $required = false, $nullable = false)
    {
        $this->defaults[$attribute] = $value;

        if (empty($type) === false) {
            $this->types[$attribute] = $type;
        }

        if ($required === true) {
            $this->requires[] = $attribute;
        }

        if ($nullable === false) {
            $this->notNullables[] = $attribute;
        }

        return $this;
    }
public function setDefault ( $ attribute , $ value , $ type = null , $ required = false , $ nullable = false ) { $ this -> defaults [ $ attribute ] = $ value ; if ( empty ( $ type ) === false ) { $ this -> types [ $ attribute ] = $ type ; } if ( $ required === true ) { $ this -> requires [ ] = $ attribute ; } if ( $ nullable === false ) { $ this -> notNullables [ ] = $ attribute ; } return $ this ; }
Sets the default value of a given attribute.

@param string $attribute The name of the attribute
@param mixed  $value     The default value of the attribute
@param string $type      The accepted type. Any type for which a corresponding is_<type>() function exists is
acceptable
@param bool   $required  Is that attribute required?
@param bool   $nullable  Is that attribute nullable?

@return \Yosymfony\Spress\Core\Support\AttributesResolver This instance
Sets the default value of a given attribute .