@param $data

@return bool
505590
public function update($data)
    {
        if (isset($data['stackName'])) {
            $txt = Core::make('helper/text');
            $data['cName'] = $data['stackName'];
            $data['cHandle'] = str_replace('-', Config::get('concrete.seo.page_path_separator'), $txt->urlify($data['stackName']));
        }
        $worked = parent::update($data);

        if (isset($data['stackName'])) {
            // Make sure the stack path is always up-to-date after a name change
            $this->rescanCollectionPath();

            $db = Database::connection();
            $stackName = $data['stackName'];
            $db->Execute('update Stacks set stName = ? WHERE cID = ?', [$stackName, $this->getCollectionID()]);
        }

        return $worked;
    }
604795
public function isSupported(array $data)
    {
        try {
            new DateTime($data[$this->getProperty()]);
        } catch (Exception $e) {
            return false;
        }

        return true;
    }
335808
private function isArrayResourceData($data)
    {
        if (!is_array($data) || empty($data)) {
            return false;
        }
        foreach ($data as $datum) {
            if (!$this->isResourceData($datum)) {
                return false;
            }
        }

        return true;
    }
1329055
private function isSelectColumn($data)
    {
        if (null !== $data && !in_array($data, $this->virtualColumns)) {
            return true;
        }

        return false;
    }
647692
public function put($data = [])
	{
		if (empty($data))
			return false;

		$this->setData();

		$data = (array) $data;

		foreach ($data as $name => $value)
			$this->_request[$name] = $_REQUEST[$name] = $this->sanitize($value);

		return $this->_request;
	}
769502
public function set(Data $data)
    {
        $class = get_class($data);
        if (!$this->isEnabled()) {
            return false;
        }

        if ($data->isFresh()) {
            return false;
        }

        if (!$id = $data->id(true)) {
            return false;
        }

        $key = self::key($class, $id);
        $this->members[$key] = $data;
    }
1148412
public function data($data)
    {
        if ($data instanceof Arrayable) {
            $data = $data->toArray();
        }

        $this->data = $data;
    }
1027005
public static function timeStampTypeCheck($data)
    {
        if (!$data) {
            return false;
        }
        if (!isset($data['t']) || !isset($data['sign'])) {
            return false;
        }
        if (md5('t=' . $data['t'] . '&secret=' . self::$secret) != $data['sign']) {
            return false;
        }
        return true;
    }
742076
public function validate($data)
    {
        if($this->skip_validation)
        {
            return $data;
        }

        if(!empty($this->validate))
        {
            foreach($data as $key => $val)
            {
                $_POST[$key] = $val;
            }

            $this->load->library('form_validation');

            if(is_array($this->validate))
            {
                $this->form_validation->set_rules($this->validate);

                if ($this->form_validation->run() === TRUE)
                {
                    return $data;
                }
                else
                {
                    return FALSE;
                }
            }
            else
            {
                if ($this->form_validation->run($this->validate) === TRUE)
                {
                    return $data;
                }
                else
                {
                    return FALSE;
                }
            }
        }
        else
        {
            return $data;
        }
    }
226723
public function verify(array $data)
    {
        if (is_callable($this->callback)) {
            return call_user_func($this->callback, $data);
        }

        return false;
    }
1180892
protected function isEmpty($data): bool
    {
        // Handle specific cases where input can be blank
        if (array_key_exists('option', $data) && in_array($data['option'], static::EMPTY_OPTIONS, true)) {
            return false;
        }

        return parent::isEmpty($data) || empty($data['input']);
    }
328594
public function isValidJson(string $data) : bool {
    json_decode($data);
    
    if (json_last_error() !== JSON_ERROR_NONE) {
      return false;
    }
    
    return true;
  }
143903
public function canParse($data)
	{
		$data = trim($data);
		$data = trim($data, '"');

		if ((substr($data, 0, 1) != '{') && (substr($data, -1, 1) != '}'))
		{
			return false;
		}

		$obj = json_decode($data);
		if (json_last_error() != JSON_ERROR_NONE)
		{
			return false;
		}

		return true;
	}
269823
private function setData($data) {

        if ($data !== false) {
            $this->cache->set($this->name . '_mtime', time(), (int)$this->options['extras']['timeout']);
            return $this->cache->set($this->name, $data, (int)$this->options['extras']['timeout']);
        }

        return false;
    }
663694
public function save($data)
	{
		// Check and make sure this is an array of arrays
		if (!is_array($data))
		{
			return false;
		}

		if (isset($data[0]) && is_array($data[0]))
		{
			foreach ($data as $d)
			{
				if (!parent::save($d))
				{
					return false;
				}
			}
		}
		else
		{
			// If not an array of arrays, we'll assume it's just one item to save
			if (!parent::save($data))
			{
				return false;
			}
		}

		return true;
	}
106800
public static function destroy($data)
    {
        $model = new static();

        $query = $model->db();

        if (empty($data) && 0 !== $data) {
            return false;
        } elseif (is_array($data) && key($data) !== 0) {
            $query->where(self::parseWhere($data));
            $data = null;
        } elseif ($data instanceof \Closure) {
            $data($query);
            $data = null;
        }

        $resultSet = $query->select($data);

        if ($resultSet) {
            foreach ($resultSet as $data) {
                $data->delete();
            }
        }

        return true;
    }
641208
public function yesNo($data = null) {
		if ((bool)$data) {
			$result = $this->_getOptionsForElem('yesNo.yes');
		} else {
			$result = $this->_getOptionsForElem('yesNo.no');
		}

		return $result;
	}