Set the guid array of blames, it may check all guids if valid.
@param array $guids guid array of blames.
@param boolean $checkValid determines whether checking the blame is valid.
@return false|array all guids.
174949
public function setBlameGuids($guids = [], $checkValid = true)
    {
        if (!is_array($guids) || $this->multiBlamesAttribute === false) {
            return null;
        }
        if ($checkValid) {
            $guids = $this->unsetInvalidBlames($guids);
        }
        $multiBlamesAttribute = $this->multiBlamesAttribute;
        $this->$multiBlamesAttribute = Number::composite_guid($guids);
        return $guids;
    }
180982
public function withGuid(string $guid): self
    {
        $this->guid        = $guid;
        $this->isPermaLink = true;
        return $this;
    }
1200236
public function register($check, $tags = [])
    {
        $check = ['check' => $check, 'tags' => []];
        if (!empty($tags)) {
            $check['tags'] = $tags;
        }

        $this->registeredChecks[] = $check;
    }
708546
protected function unsetInvalidBlames($guids)
    {
        $unchecked = $guids;
        $multiBlamesClass = $this->multiBlamesClass;
        $mbi = $multiBlamesClass::buildNoInitModel();
        foreach ($guids as $key => $guid) {
            $blame = $multiBlamesClass::find()->where([$mbi->guidAttribute => $guid])->exists();
            if (!$blame) {
                unset($guids[$key]);
            }
        }
        $diff = array_diff($unchecked, $guids);
        $eventName = static::$eventMultipleBlamesChanged;
        $this->trigger($eventName, new MultipleBlameableEvent(['blamesChanged' => !empty($diff)]));
        return $guids;
    }
980770
public function createdBy($guid)
    {
        $model = $this->noInitModel;
        if (!is_string($model->createdByAttribute) || empty($model->createdByAttribute)) {
            return $this;
        }
        if ($guid instanceof BaseUserModel) {
            $guid = $guid->getGUID();
        }
        return $this->andWhere([$model->createdByAttribute => $guid]);
    }
942931
public function ensureClaimValues(array $validateClaims)
    {
        foreach ($validateClaims as $claim => $value) {
            if (!isset($this->claims[$claim]) || $this->claims[$claim] !== $value) {
                return false;
            }
        }
        return true;
    }
1029891
protected function setValid($valid)
    {
        if (!isset($this->valid) || true === $this->valid) {
            $this->valid = $valid;
        }

        return $this;
    }
436435
public static function validate($checkType, $value)
    {
        if (array_key_exists($checkType, self::$checks)) {
            if (empty(self::$checks[$checkType])) {
                $blnReturn = true;
            } else {
                if (is_array($value)) {
                    $arrValues = $value;
                    $blnSub = true;
                    foreach ($arrValues as $value) {
                        $blnSub = preg_match(self::$checks[$checkType], $value);
                        if (! $blnSub) {
                            // *** At least 1 value is not valid, skip the rest and return false;
                            exit();
                        }
                    }

                    $blnReturn = $blnSub;
                } else {
                    $blnReturn = preg_match(self::$checks[$checkType], $value);
                }
            }
        } else {
            if (empty($checkType)) {
                $blnReturn = true; // No custom validation set.
            } else {
                $blnReturn = @preg_match($checkType, $value); // Use custom validation
            }
        }

        return $blnReturn;
    }
777218
public function setChecked(bool $checked)
    {
        if ($checked) {
            $this->getTag()->setAttribute('checked', 'checked');
        } else {
            $this->getTag()->removeAttribute('checked');
        }

        return $this;
    }
941578
public function setChecked(bool $checked = true) : FormElement
    {
        if (true === $checked) {
            $this->attributes['checked'] = 'checked';
        } else {
            unset($this->attributes['checked']);
        }
        return $this;
    }
1180789
public function setParentId($parentId)
    {
        return (is_string($this->parentAttribute) && !empty($this->parentAttribute)) ?
        $this->{$this->parentAttribute} = $parentId : null;
    }
374082
public function isHaveValue($checkValue)
    {
        $this->checkFunctions[] = function ($value) use ($checkValue) {
            if (!is_array($value)) {
                return false;
            }
            return in_array($checkValue, $value);
        };
        return $this;
    }
172490
public function verify(string $guid) {
        if (empty($guid)) {
            throw new CasProxyClientException('GUID is required', CasProxyClientException::GUID_INVALID);
        }
        $response = $this->http()->get( $this->getVerifyUrl($guid) );
        
        if ($status = $response->getStatusCode() !== 200) {
            throw new CasProxyClientException($response->getStatusCode() . ': ' . $response->getMessage(), CasProxyClientException::HTTP_EXCEPTION);
        }

        $body = json_decode($response->getBody(), true);
        
        if (!isset($body['code']) || !isset($body['message']) || !isset($body['data'])) {
            throw new CasProxyClientException('Response Invalid', CasProxyClientException::RESPONSE_INVALID);
        }
        
        if (0 !== $body['code']) {
            throw new CasProxyClientException('Code: ' . $body['code'] . '. Message: ' . $body['messaage'], CasProxyClientException::RESPONSE_EXCEPTION);
        }
        
        if (false === $body['data']['valid']) {
            throw new CasProxyClientException('GUID Invalid', CasProxyClientException::GUID_INVALID);
        }
        
        return $body['data']['userid'];
    }
915178
public static function checkGuidExists($guid)
    {
        if (is_string($guid)) {
            if (strlen($guid) == 16) {
                $binary = new Binary($guid, Binary::TYPE_UUID);
            } elseif (preg_match(Number::GUID_REGEX, $guid)) {
                $binary = new Binary(Number::guid_bin($guid), Binary::TYPE_UUID);
            } else {
                return false;
            }
            return static::findOne($binary) !== null;
        }
        if ($guid instanceof Binary) {
            return static::findOne($guid) !== null;
        }
        return false;
    }
1057358
public function getValidationStatus($pageId)
    {
        return array_key_exists($pageId, $this->data['valid'])
               ? $this->data['valid'][$pageId]: null;

    }
700361
public function check(string $cardId, array $codes)
    {
        $params = [
            'card_id' => $cardId,
            'code' => $codes,
        ];

        return $this->httpPostJson('card/code/checkcode', $params);
    }
342155
public function setCheckboxes(array $checkboxes)
    {
        foreach ($checkboxes as $name => $label) {
            $this->checkboxes[$label] = new CmsCheckbox($name);
        }

        return $this;
    }