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