Sets the users thumbnail photo.

@param string $data
@param bool $encode

@return $this
349996
public function setThumbnail($data, $encode = true)
    {
        if ($encode && ! base64_decode($data, $strict = true)) {
            // If the string we're given is not base 64 encoded, then
            // we will encode it before setting it on the user.
            $data = base64_encode($data);
        }

        return $this->setAttribute($this->schema->thumbnail(), $data);
    }
307014
public function setData(array $data)
    {
        $this->data = $this->parseData($data);

        $this->setRules($this->initialRules);

        return $this;
    }
934979
public function save($data = null) {
		if (!parent::save()) {
			return false;
		}

		if ($data) {
			// new image
			$this->simpletype = 'image';
			$this->saveImageFile($data);
			$this->saveThumbnails();
			$this->extractExifData();
		}

		return true;
	}
1048793
public static function set_meta_data($data)
    {
        if (is_array($data)) {
            foreach ($data as $key => $value) {
                self::$meta_data[strtolower($key)] = $value;
            }
        } else {
            user_error("set_meta_data must be passed an array", E_USER_ERROR);
        }
    }
806252
public function setData($key, $value=null)
	{
	    $this->data->set($key, $value);
	    return $this;
	}
118236
public function setData(array $data)
    {
        $data = $this->setIdFromData($data);

        parent::setData($data);
        return $this;
    }
1294887
public function setData(array $data)
    {
        foreach ($data as $name => $value) {
            if (is_string($name)) {
                $this->__set($name, $value);
            }
        }

        return $this;
    }
183892
protected function encode($data)
    {
        if ($this->getEncoding() === self::ENCODING_BASE64) {
            return base64_encode(serialize($data));
        } else {
            return serialize($data);
        }
    }
206374
public function setData($data)
    {
        // setData() expects array, but we can't prevent users from providing other types.
        // So instead of an exception we just want this input filter to be invalid...
        try {
            parent::setData($data);
            $this->invalidData = null;
            $this->invalidDataTypeException = null;
        } catch (InputFilterInvalidArgumentException $e) {
            $this->invalidData = $data;
            $this->invalidDataTypeException = $e;
        }

        return $this;
    }
1200295
public function addData($data)
    {
        $data = (array) $data;

        if (empty($data)) {
            return $this;
        }

        foreach ($data as $key => $value) {
            $this->setData($key, $value);
        }

        return $this;
    }
156425
public function flush($encode = true)
    {
        $this->_ensureReadable(false);
        $content = stream_get_contents($this->_resource);
        return $encode && $this->_encoding ? Mime::encode($content, $this->_encoding) : $content;
    }
564366
public function setData($data)
    {
        if ($this->getEntryType() === FileType::class) {
            $data = self::normalizeFilesArray($data);
        }

        $this->data = $data;

        return $this;
    }
730726
public function setUpsert($data)
    {
        $document = Document::create($data);
        $this->_upsert = $document;

        return $this;
    }
1320661
public function setData($data)
    {
        parent::setData($data);

        //Set the user data
        $this->getSession()->set('user', KObjectConfig::unbox($data));

        return $this;
    }
444953
public function setData(&$data)
    {
        /**
         * @var Cell\Cell $cell
         */
        foreach ($this->cells as $cell) {
            $cell->setData($data);
        }
        return $this;
    }
678078
public function setData($data)
    {
        if ( ! is_string($data)) {
            throw new UnexpectedValueException('Expected string with file content');
        }

        $this->content = $data;

        $this->size = strlen($data);

        return $this;
    }
1301911
public function setData($data) {
		$data = json_decode(json_encode($data), true);
		$this->data = array_dot($data);

		return $this;
	}