当前位置: 首页>>代码示例>>PHP>>正文


PHP ClusterTool::clusterOverride方法代码示例

本文整理汇总了PHP中ClusterTool::clusterOverride方法的典型用法代码示例。如果您正苦于以下问题:PHP ClusterTool::clusterOverride方法的具体用法?PHP ClusterTool::clusterOverride怎么用?PHP ClusterTool::clusterOverride使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ClusterTool的用法示例。


在下文中一共展示了ClusterTool::clusterOverride方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getApplicationTemplate

    /**
     * @param int $applicationTypeId
     * @return ApplicationTemplate
     */
    public static function getApplicationTemplate( $applicationTypeId )
    {
        $conditionList = ClusterTool::clusterOverride( array('application_type_id' => $applicationTypeId ) );

        foreach ( $conditionList as $condition )
        {
            $applicationTemplate = self::fetchObject( self::definition(), null, $condition );
            if ( $applicationTemplate instanceof self )
            {
                return $applicationTemplate;
            }
        }

        return null;
    }
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:19,代码来源:applicationtemplate.php

示例2: getStaticConfiguration

    /**
     * @param int $applicationId
     * @return ApplicationStaticConfiguration
     */
    static public function getStaticConfiguration( $applicationId )
    {
        $conditionList = ClusterTool::clusterOverride( array('application_id' => $applicationId) );

        foreach ( $conditionList as $condition )
        {
            $staticConfiguration = self::fetchObject( self::definition(), null, $condition );

            if ( $staticConfiguration instanceof self )
            {
                return $staticConfiguration;
            }
        }

        return null;
    }
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:20,代码来源:applicationstaticconfiguration.php

示例3: getExternalConfiguration

    /**
     * @param int $applicationId
     * @return ExternalLinkHandler
     */
    public static function getExternalConfiguration( $applicationId )
    {
        $conditionList = ClusterTool::clusterOverride( array('application_id' => $applicationId) );

        foreach ( $conditionList as $condition )
        {
            $externalConfiguration = self::fetchObject( self::definition(), null, $condition );

            if ( $externalConfiguration instanceof self )
            {
                $externalConfiguration->buildExternalLinkHandler();

                return $externalConfiguration;
            }
        }

        return null;
    }
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:22,代码来源:applicationexternalconfiguration.php

示例4: getMapping

    /**
     * @return array[]
     */
    static function getMapping()
    {
        if ( !empty($_mapping) )
        {
            return self::$_mapping;
        }
        
        $mapping = CacheTool::dailyValue('userSpeMapping');
        
        if ( $mapping === false || is_null($mapping) )
        {
            $conditionList = ClusterTool::clusterOverride( array( 'is_available' => '1' ) );

            foreach ($conditionList as $condition)
            {
                $mapping = self::fetchObjectList(self::definition(), null, $condition, false);
    
                if ( is_array($mapping) && count($mapping) > 0 )
                {
                    break;
                }
            }
            
            $mapping = self::flattenMapping($mapping);

            self::$_mapping = $mapping;

            CacheTool::dailyValue('userSpeMapping', $mapping);
        }
        else
        {
            self::$_mapping = $mapping;
        }
        
        return $mapping;
    }
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:39,代码来源:userspecialitycontentspeciality.php

示例5: buildFacetList

    /**
     * @param int $applicationId
     */
    public function buildFacetList( $applicationId )
    {
        $sort       = array( 'placement' => 'asc' );
        $conditions = array(
            'application_id' => $applicationId
        );

        $conditionList = ClusterTool::clusterOverride( $conditions );

        foreach ( $conditionList as $condition )
        {
            /* @type $applicationHasFacetList ApplicationHasFacet[] */
            $applicationHasFacetList = ApplicationHasFacet::fetchObjectList(
                ApplicationHasFacet::definition(),
                null,
                $condition,
                $sort
            );

            if ( is_array( $applicationHasFacetList ) && count( $applicationHasFacetList ) > 0 )
            {
                break;
            }
        }

        if ( !isset($applicationHasFacetList) || !is_array( $applicationHasFacetList ) || count( $applicationHasFacetList ) == 0 )
        {
            return;
        }

        foreach ( $applicationHasFacetList as $applicationHasFacet )
        {
            /* @type $facet ApplicationFacet */
            $facet = $applicationHasFacet->getFacet();

            if ( $facet instanceof ApplicationFacet )
            {
                $facet->setOnMobile( (bool)$applicationHasFacet->attribute( 'on_mobile' ) );
                $this->facetList[] = $facet;
            }
        }
    }
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:45,代码来源:applicationcontentserviceconfiguration.php


注:本文中的ClusterTool::clusterOverride方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。