yii\web\UploadedFile::__toString PHP Method

__toString() public method

This is PHP magic method that returns string representation of an object. The implementation here returns the uploaded file's name.
public __toString ( ) : string
return string the string representation of the object
    public function __toString()
    {
        return $this->name;
    }