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


PHP ClusterTool::globCluster方法代码示例

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


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

示例1: parseOptions

function parseOptions(array $options)
{
    $parsedOptions = array();
    $parsedOptions['clusterIdentifier'] = isset($options['clusterIdentifier']) ? explode(',', $options['clusterIdentifier']) : ClusterTool::globCluster();
    $parsedOptions['path'] = isset($options['path']) ? $options['path'] : DEFAULT_BANNER_PATH;
    $parsedOptions['convertPath'] = isset($options['convertPath']) ? $options['convertPath'] : eZINI::instance('image.ini')->variable('ImageMagick', 'ExecutablePath');
    return $parsedOptions;
}
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:8,代码来源:convert_hero_banners.php

示例2: parseOptions

function parseOptions(array $options)
{
    $parsedOptions = array();

    $existingClusters = ClusterTool::globCluster();
    if (empty($options['clusterIdentifier'])) {
        $parsedOptions['clusters'] = $existingClusters;
    } else {
        $clusterList = explode(',', $options['clusterIdentifier']);
        $clusterList = array_intersect($clusterList, $existingClusters);
        $parsedOptions['clusters'] = $clusterList;
    }
    return $parsedOptions;
}
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:14,代码来源:generate_json_translations.php

示例3: getClusterVisibilities

    /**
     * @param int $contentObjectId
     * @return boolean[]
     */
    public static function getClusterVisibilities($contentObjectId)
    {
        $clusters = ClusterTool::globCluster();
        $visibilities = array();

        foreach( $clusters as $cluster )
        {
            $visibilities[$cluster] = !ObjectVisibilityManager::isClusterLimited( $contentObjectId, $cluster );
        }

        return $visibilities;
    }
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:16,代码来源:solrsafeoperatorhelper.php

示例4: array

<?php

/* @type $cli eZCli */
/* @type $script eZScript */

$clusters        = ClusterTool::globCluster();
$solrLimit       = 200;
$globalObjectIds = array();
$solrStart       = 0;
$orFilters       = array();
$filters         = array(
    'meta_installation_id_ms:' . eZSolr::installationID(),
    "meta_class_identifier_ms:article",
);
$rawSolrParams = array(
    'indent'        => 'on',
    'q'             => '',
    'fl'            => "meta_id_si",
    'rows'          => $solrLimit,
    'qt'            => 'ezpublish',
);

foreach ( $clusters as $cluster )
{
    $orFilters[] = "attr_{$cluster}_url_s:full/*";
}
$filters[] = "( " . implode(' OR ', $orFilters ) . " )";

$rawSolrParams['fq'] = implode(' AND ', $filters);

while (true)
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:31,代码来源:fixSolrUrls.php

示例5: isset

    'remove'              => 'Remove old files else copy. Use remove option in a second pass'
));

$remove = isset($options['remove']) && $options['remove'] == true;
$varDir = eZSys::varDirectory();
$newStaticDir = StaticData::directory();

$fileUtils = eZClusterFileHandler::instance( $path );
if( $fileUtils->requiresClusterizing() ) {
    $dfsBackend = new eZDFSFileHandlerDFSBackend();
    $mountPoint = $dfsBackend->getMountPoint();
    $varDir = eZDir::path(array($mountPoint, $varDir));
    $newStaticDir = eZDir::path(array($mountPoint, $newStaticDir));
}

$clusterList = ClusterTool::globCluster();
$oldStaticDir = eZDir::path(array($varDir, 'static-data'));

$applicationList = array();
$rows = ApplicationObject::fetchObjectList(ApplicationObject::definition(), array('identifier'), null, null, null, false);
foreach ($rows as $row) {
    $applicationList[] = $row['identifier'];
}
$applicationList = array_unique($applicationList);

$fileToRemove = array();

function moveIfNeeded($oldPath, $newPath) {
    global $fileToRemove;
    
    $success = true;
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:31,代码来源:image_refactor.php

示例6: getRelations

/**
 * @param eZMySQLiDB $db
 * @return array
 */
function getRelations( $db )
{
    $paths = array();
    $query = "SELECT
                pf.id AS pfid, pf.path AS path, al.cluster_identifier AS cluster
              FROM
                mm_application_has_publisher_folder AS ahpf
              LEFT JOIN
                mm_publisher_folder AS pf ON ahpf.publisher_folder_id = pf.id,
                mm_application_localized AS al
              WHERE
                ahpf.application_localized_id
              IN
                (SELECT id FROM mm_application_localized WHERE cluster_identifier IN ('" . implode( '\', \'', ClusterTool::globCluster() ) . "'))
              AND
                ahpf.application_localized_id = al.id
              ORDER BY
                cluster, pf.id";
    foreach ( $db->arrayQuery( sprintf( $query ) ) as $row )
        $paths[$row['cluster']][$row['pfid']] = $row['path'];

    return $paths;
}
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:27,代码来源:indexnewpublisherfolderrelations.php

示例7: parseClusterIdentifiers

function parseClusterIdentifiers($clusterIdentifiersString, $sanitizeInput = true)
{
    $existingClusters = ClusterTool::globCluster();
    if (strlen($clusterIdentifiersString) == 0) {
       return $existingClusters;
    }
    $clusterIdentifiers = explode(',', $clusterIdentifiersString);
    if ($sanitizeInput) {
        $clusterIdentifiers = array_intersect($existingClusters, $clusterIdentifiers);
    }
    return $clusterIdentifiers;
}
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:12,代码来源:generate_sprite.php

示例8: sprintf

) ) );

// Use admin
$user   = eZUser::fetchByName( 'admin' );
$userID = $user->attribute( 'contentobject_id' );
eZUser::setCurrentlyLoggedInUser( $user, $userID );

$whereClause = "";

$query = "select f.id, f.path as path
        from mm_application_has_publisher_folder as h 
        left join mm_publisher_folder as f on h.publisher_folder_id = f.id
        %s
        order by f.id";

$availableClusters = ClusterTool::globCluster();

if ( isset($options['clusterIdentifier']) && in_array($options['clusterIdentifier'], $availableClusters) )
    $whereClause = " WHERE l.cluster_identifier='{$options['clusterIdentifier']}' ";

$db      = MMDB::instance();
$result  = $db->arrayQuery( sprintf($query, $whereClause) );
$folders = array();
$autoMode = isset($options['auto']);

foreach( $result as $row )
{
    $id      = $row['id'];
    $update  = is_array( eZContentObject::fetchByRemoteID( 'publisher_folder-' . $row['path'], false ) );

    if ( !$update )
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:31,代码来源:synch_publisher.php


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