typecast() protected method

If the value is null or an [[Expression]], it will not be converted.
Since: 2.0.3
protected typecast ( mixed $value ) : mixed
$value mixed input value
return mixed converted value
コード例 #1
0
 protected function typecast($value)
 {
     $value = parent::typecast($value);
     if ($this->case !== false && is_string($value)) {
         if ($this->case === CASE_LOWER) {
             $value = strtolower($value);
         } elseif ($this->case === CASE_UPPER) {
             $value = strtoupper($value);
         }
     }
     return utf8_encode($value);
 }