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


PHP ArrayHelper::mergeArrays方法代码示例

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


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

示例1: assemble

 public function assemble(AbstractSQLDataSourceQueryHandler $datasourceHandler, DataControllerCallContext $callcontext, DatasetMetaData $dataset, array $columnNames = NULL)
 {
     $statement = new Statement();
     $requestedColumnNames = self::prepareRequestedColumnNames($columnNames);
     ArrayHelper::mergeArrays($statement->tables, self::prepareTableSections4Statement($datasourceHandler, $callcontext, $requestedColumnNames, TRUE));
     return $statement;
 }
开发者ID:ecs-hk,项目名称:Checkbook,代码行数:7,代码来源:DateDimensionYearDatasetAssembler.php

示例2: initiateHandler

 public function initiateHandler($operatorName)
 {
     $values = func_get_args();
     array_shift($values);
     $handlerConfiguration = $this->getHandlerConfiguration($operatorName);
     $classname = $handlerConfiguration['handler']['classname'];
     $handlerClass = new ReflectionClass($classname);
     $params = NULL;
     // first parameter is the operator configuration
     $operatorMetaData = $this->getOperatorMetaData($operatorName);
     $params[] = $operatorMetaData;
     // next are parameters which represent values
     if (count($values) === 1 && is_array($values[0])) {
         $parameterCount = count($values[0]);
         $expectedMinimumParameterCount = isset($operatorMetaData) ? $operatorMetaData->getRequiredParameterCount() : 0;
         $expectedTotalParameterCount = isset($operatorMetaData) ? $operatorMetaData->getParameterCount() : 0;
         if ($parameterCount == $expectedTotalParameterCount) {
             ArrayHelper::mergeArrays($params, $values[0]);
         } elseif ($expectedTotalParameterCount === 1) {
             $params[] = $values[0];
         } elseif ($parameterCount < $expectedTotalParameterCount && $parameterCount >= $expectedMinimumParameterCount) {
             // we have some optional parameters which do not need to be provided
             ArrayHelper::mergeArrays($params, $values[0]);
         } else {
             throw new IllegalArgumentException(t("Inconsistent number of arguments for '@name' operator", array('@name' => $operatorName)));
         }
     } else {
         ArrayHelper::mergeArrays($params, $values);
     }
     return $handlerClass->newInstanceArgs($params);
 }
开发者ID:ecs-hk,项目名称:Checkbook,代码行数:31,代码来源:DefaultOperatorFactory.php

示例3: merge

 public function merge(Statement $statement)
 {
     ArrayHelper::mergeArrays($this->tables, $statement->tables);
     ArrayHelper::mergeArrays($this->conditions, $statement->conditions);
     ArrayHelper::mergeArrays($this->groupByColumns, $statement->groupByColumns);
     ArrayHelper::mergeArrays($this->havingConditions, $statement->havingConditions);
 }
开发者ID:ecs-hk,项目名称:Checkbook,代码行数:7,代码来源:Statement.php

示例4: mergeQueryValues

    protected function mergeQueryValues(&$parameters, $request) {
        $this->checkRequestQuery($request);

        if (isset($request->queries)) {
            $query = $request->queries[0];

            ArrayHelper::mergeArrays($parameters, $query);
        }
    }
开发者ID:reisystems-india,项目名称:GovDashboard-Community,代码行数:9,代码来源:AbstractPHPDatasetHandler.php

示例5: log

 public function log($level, &$message)
 {
     if ($message instanceof StatementLogMessage) {
         $statementLogMessage = $message;
         if (is_array($statementLogMessage->statement)) {
             ArrayHelper::mergeArrays(self::$statements, $statementLogMessage->statement);
         } else {
             self::$statements[$statementLogMessage->type][] = $statementLogMessage->statement;
         }
     }
 }
开发者ID:ecs-hk,项目名称:Checkbook,代码行数:11,代码来源:StatementLogMessageKeeper.php

示例6: getHandler

 public function getHandler($type)
 {
     if (isset($this->handlerInstances[$type])) {
         return $this->handlerInstances[$type];
     }
     $handlerConfiguration = $this->getHandlerConfiguration($type);
     $extensionConfiguration = $this->getExtensionConfiguration($type);
     $combinedExtensionConfigurations = NULL;
     // adding generic configuration
     ArrayHelper::mergeArrays($combinedExtensionConfigurations, $extensionConfiguration['extensions']);
     // adding handler specific configurations
     if (isset($handlerConfiguration['extensions'])) {
         ArrayHelper::mergeArrays($combinedExtensionConfigurations, $handlerConfiguration['extensions']);
         unset($handlerConfiguration['extensions']);
     }
     $classname = $handlerConfiguration['handler'];
     $handler = new $classname($type, $combinedExtensionConfigurations);
     $this->handlerInstances[$type] = $handler;
     return $handler;
 }
开发者ID:ecs-hk,项目名称:Checkbook,代码行数:20,代码来源:AbstractDataSourceFactory.php

示例7: assemble

 public function assemble(AbstractSQLDataSourceQueryHandler $datasourceHandler, DataControllerCallContext $callcontext, DatasetMetaData $dataset, array $columnNames = NULL)
 {
     $statement = new Statement();
     $requestedColumnNames = self::prepareRequestedColumnNames($columnNames);
     $tableDates = self::prepareTableSection($datasourceHandler, $callcontext, $requestedColumnNames);
     $statement->tables[] = $tableDates;
     $tableDayOfWeek = self::prepareDefTableSection($datasourceHandler, $callcontext, $requestedColumnNames);
     $isDayOfWeekRequired = isset($tableDayOfWeek->columns);
     $monthTableSections = DateDimensionMonthDatasetAssembler::prepareTableSections4Statement($datasourceHandler, $callcontext, $requestedColumnNames, FALSE);
     $isMonthRequired = isset($monthTableSections);
     if ($isDayOfWeekRequired) {
         $tableDayOfWeek->conditions[] = new JoinConditionSection('day_of_week_def_id', new TableColumnConditionSectionValue(self::$TABLE_ALIAS_SUFFIX__DATES, 'day_of_week_def_id'));
         $statement->tables[] = $tableDayOfWeek;
     }
     if ($isMonthRequired) {
         $tableMonths = $monthTableSections[0];
         $tableMonths->conditions[] = new JoinConditionSection('month_id', new TableColumnConditionSectionValue(self::$TABLE_ALIAS_SUFFIX__DATES, 'month_id'));
         ArrayHelper::mergeArrays($statement->tables, $monthTableSections);
     }
     return $statement;
 }
开发者ID:ecs-hk,项目名称:Checkbook,代码行数:21,代码来源:DateDimensionDateDatasetAssembler.php

示例8: combineFrom

 public function combineFrom(ReferenceRoute $route)
 {
     ArrayHelper::mergeArrays($this->segmentLinkIds, $route->segmentLinkIds);
     $this->weight += $route->weight;
 }
开发者ID:ecs-hk,项目名称:Checkbook,代码行数:5,代码来源:ReferenceLink.php


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