@param array $options

@return bool
338209
public function save(array $options = [])
    {
        if ($this->exists && ! $this->isDirty()) {
            // If $this->exists and not dirty, parent::save() skips saving and returns
            // false. So we have to save the translations
            if ($this->fireModelEvent('saving') === false) {
                return false;
            }

            if ($saved = $this->saveTranslations()) {
                $this->fireModelEvent('saved', false);
                $this->fireModelEvent('updated', false);
            }

            return $saved;
        }

        // We save the translations only if the instance is saved in the database.
        if (parent::save($options)) {
            return $this->saveTranslations();
        }

        return false;
    }
1315417
public function setOptions($options = []) {

		if(false === is_array($options)) {
            return trigger_error(sprintf('Argument 1 passed to %s() must be of the type array, "%s" given', __METHOD__, gettype($options)), E_USER_ERROR);
        }

		$this -> options = array_merge($this -> options, $options);
	}
686594
public function setOptions(array $options)
	{
		if (isset($options['type']))
		{
			$this->type = $options['type'];
		}

		if (isset($options['timeout']))
		{
			$this->timeout = $options['timeout'];
		}

		return true;
	}
364445
public function checkLimit(array $options)
    {
        $options['limit'] = (int)$options['limit'];
        if (empty($options['limit']) || $options['limit'] < 1) {
            $options['limit'] = 1;
        }
        $options['limit'] = max(min($options['limit'], $options['maxLimit']), 1);

        return $options;
    }
520528
public function setOptions(array $options)
    {
        foreach ($options as $k => $v) {
            $this->_options[$k] = $v;
        }
        return $this;
    }
1195659
public function setOptions($options = [])
    {
        $this->options = $options;
        $this->debug->info(__FUNCTION__, 'setOptions: ', $this->options);

        return $this;
    }
490784
public function setOptions(array $options)
    {
        $this->validateOptions($options, $this->type);

        $this->options = $options;

        return $this;
    }
580390
function validate($options = [])
    {
        $groups = @$options['groups'] ?: [];

        $this->errors = static::validator()->validate($this, $groups);

        return $this->errors->count() === 0;
    }
1182828
public function checkMessages(array $options = [])
    {
        $this->buildCall('/search/messages/'.$this->apiKey.'/'.$this->apiSecret);

        $this->buildBody($options);

        $rawMessages = json_decode($this->getRequest()->getBody()->getContents());

        return $this->makeMessages($rawMessages->items);
    }
143704
public function clear(array $options = []) {
		$options += ['destroySession' => true];
		$cookieClass = get_called_class();

		return function($params) use ($options, $cookieClass) {
			if ($options['destroySession'] && session_id()) {
				session_destroy();
			}
			if (!isset($_COOKIE[$this->_config['name']])) {
				return true;
			}
			$cookies = array_keys(Set::flatten($_COOKIE[$this->_config['name']]));
			foreach ($cookies as $name) {
				$result = setcookie(
					$cookieClass::keyFormat($name, $this->_config),
					"",
					1,
					$this->_config['path'],
					$this->_config['domain'],
					$this->_config['secure'],
					$this->_config['httponly']
				);
				if (!$result) {
					throw new RuntimeException("There was an error clearing {$cookie} cookie.");
				}
			}
			unset($_COOKIE[$this->_config['name']]);
			return true;
		};
	}
612112
private function getOption($option, array $options)
    {
        return isset($options[$option]) ? $options[$option] : $this->$option;
    }
1167900
public function save(array $options = []) {
        $saved = parent::save($options);

        array_walk($this->translations, function($translation, $locale)  {
            if(! array_filter($translation))
                return false;

            $this->newTranslation($locale, $translation)
                ->save();
        });

        return $saved;
    }
1145479
public function forceSave(array $options = [])
    {
        $currentValidatingSetting = $this->getValidating();

        $this->setValidating(false);

        $result = $this->getModel()->save($options);

        $this->setValidating($currentValidatingSetting);

        return $result;
    }
1052156
protected function _isDisabled(array $options)
    {
        if (!isset($options['disabled'])) {
            return false;
        }
        if (is_scalar($options['disabled'])) {
            return ($options['disabled'] === true || $options['disabled'] === 'disabled');
        }
        if (!isset($options['options'])) {
            return false;
        }
        if (is_array($options['options'])) {
            // Simple list options
            $first = $options['options'][array_keys($options['options'])[0]];
            if (is_scalar($first)) {
                return array_diff($options['options'], $options['disabled']) === [];
            }
            // Complex option types
            if (is_array($first)) {
                $disabled = array_filter($options['options'], function ($i) use ($options) {
                    return in_array($i['value'], $options['disabled']);
                });

                return count($disabled) > 0;
            }
        }

        return false;
    }
205457
public function setOptions(array $options)
    {
        $this->options = [];

        foreach ($options as $k => $v) {
            $this->addOption($k, (array)$v);
        }

        return $this;
    }
601623
public function deleteFile(array $options)
    {
        if (!isset($options['FileName'])) {
            $file = $this->getFile($options);

            $options['FileName'] = $file->getName();
        }

        if (!isset($options['FileId']) && isset($options['BucketName']) && isset($options['FileName'])) {
            $file = $this->getFile($options);

            $options['FileId'] = $file->getId();
        }

        try {
            $this->generateAuthenticatedClient([
                'fileName' => $options['FileName'],
                'fileId'   => $options['FileId'],
            ])->request('POST', '/b2_delete_file_version');
        } catch (\Exception $e) {
            return false;
        }

        return true;
    }
40069
public function saveIfExists(array $options = []): bool
    {
        if ($this->exists === false) {
            return false;
        }

        return $this->save($options);
    }