public function getBlameableRules()
    {
        $cache = $this->getCache();
        if ($cache) {
            $this->blameableLocalRules = $cache->get($this->getBlameableRulesCacheKey());
        }
        // 若当前规则不为空，且是数组，则认为是规则数组，直接返回。
        if (!empty($this->blameableLocalRules) && is_array($this->blameableLocalRules)) {
            return $this->blameableLocalRules;
        }

        // 父类规则与确认规则合并。
        if ($cache) {
            TagDependency::invalidate($cache, [$this->getEntityRulesCacheTag()]);
        }
        $rules = array_merge(
            parent::rules(),
            $this->getConfirmationRules(),
            $this->getBlameableAttributeRules(),
            $this->getDescriptionRules(),
            $this->getContentRules(),
            $this->getSelfBlameableRules()
        );
        $this->setBlameableRules($rules);
        return $this->blameableLocalRules;
    }
public function getBlameableRules()
    {
        $cache = $this->getCache();
        if ($cache) {
            $this->blameableLocalRules = $cache->get($this->getBlameableRulesCacheKey());
        }
        // 若当前规则不为空，且是数组，则认为是规则数组，直接返回。
        if (!empty($this->blameableLocalRules) && is_array($this->blameableLocalRules)) {
            return $this->blameableLocalRules;
        }

        // 父类规则与确认规则合并。
        if ($cache) {
            TagDependency::invalidate($cache, [$this->getEntityRulesCacheTag()]);
        }
        $rules = array_merge(
            parent::rules(),
            $this->getConfirmationRules(),
            $this->getBlameableAttributeRules(),
            $this->getDescriptionRules(),
            $this->getContentRules(),
            $this->getSelfBlameableRules()
        );
        $this->setBlameableRules($rules);
        return $this->blameableLocalRules;
    }
public function getBlameableRules ( ) { $ cache = $ this -> getCache ( ) ; if ( $ cache ) { $ this -> blameableLocalRules = $ cache -> get ( $ this -> getBlameableRulesCacheKey ( ) ) ; } // 若当前规则不为空，且是数组，则认为是规则数组，直接返回。 if ( ! empty ( $ this -> blameableLocalRules ) && is_array ( $ this -> blameableLocalRules ) ) { return $ this -> blameableLocalRules ; } // 父类规则与确认规则合并。 if ( $ cache ) { TagDependency :: invalidate ( $ cache , [ $ this -> getEntityRulesCacheTag ( ) ] ) ; } $ rules = array_merge ( parent :: rules ( ) , $ this -> getConfirmationRules ( ) , $ this -> getBlameableAttributeRules ( ) , $ this -> getDescriptionRules ( ) , $ this -> getContentRules ( ) , $ this -> getSelfBlameableRules ( ) ) ; $ this -> setBlameableRules ( $ rules ) ; return $ this -> blameableLocalRules ; }
Get the rules associated with content to be blamed.
@return array rules.
Get the rules associated with content to be blamed .