本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
}
}