Core/Html/Form/Traits/ValueTrait.php
public function setValue($value)
    {
        switch (true) {
            case ($this instanceof Select):
                if (! is_array($value)) {
                    $value = (array) $value;
                }

                $this->value = $value;
                break;
            case ($this instanceof Textarea):
                $this->inner = $value;
                break;
            default:
                $this->attribute['value'] = $value;
                break;
        }

        return $this;
    }
public function setValue($value)
    {
        switch (true) {
            case ($this instanceof Select):
                if (! is_array($value)) {
                    $value = (array) $value;
                }

                $this->value = $value;
                break;
            case ($this instanceof Textarea):
                $this->inner = $value;
                break;
            default:
                $this->attribute['value'] = $value;
                break;
        }

        return $this;
    }
public function setValue ( $ value ) { switch ( true ) { case ( $ this instanceof Select ) : if ( ! is_array ( $ value ) ) { $ value = ( array ) $ value ; } $ this -> value = $ value ; break ; case ( $ this instanceof Textarea ) : $ this -> inner = $ value ; break ; default : $ this -> attribute [ 'value' ] = $ value ; break ; } return $ this ; }
Sets value attribute.

@param string|number $value
Sets value attribute .