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


PHP LogHelper::log_info方法代码示例

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


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

示例1: load

    public function load(AbstractMetaModel $environment_metamodel, array $filters = NULL) {
        LogHelper::log_notice(t('Loading Environment Meta Model from GovDashboard Content Types ...'));

        // Note we do not apply filters because we do not have any
        // if we want to use the filters we would need to prepare list of data source names
        // but to prepare those name we need to load meta model.
        // but that is what we are trying to do in this code
        // Catch 22
        if (isset($filters)) {
            throw new UnsupportedOperationException(t('Filters are not supported during data source loading'));
        }

        $datamartNodes = gd_datamart_get_datamarts(LOAD_ENTITY);

        // preparing data sources
        foreach ($datamartNodes as $datamartNode) {
            GD_DataMartMetaModelLoaderHelper::prepareDataSource($environment_metamodel, $datamartNode);
        }

        // finalizing the preparation
        foreach($datamartNodes as $datamartNode) {
            $datasource = GD_DataMartMetaModelLoaderHelper::getDataSourceByNodeId($environment_metamodel->datasources, $datamartNode->nid);

            GD_DataMartMetaModelLoaderHelper::finalizeDataSourcePreparation($environment_metamodel, $datasource);
        }

        LogHelper::log_info(t('Processed @datamartCount data mart node(s)', array('@datamartCount' => count($datamartNodes))));
    }
开发者ID:reisystems-india,项目名称:GovDashboard-Community,代码行数:28,代码来源:GD_DataMartMetaModelLoader.php

示例2: prepareColumnsMetaDataProperties

 protected function prepareColumnsMetaDataProperties(DataSourceMetaData $datasource, array $tableNames)
 {
     $datasourceHandler = DataSourceQueryFactory::getInstance()->getHandler($datasource->type);
     $sql = 'SELECT c.relname AS ' . self::PROPERTY__TABLE_NAME . ', ' . '       a.attname AS ' . self::PROPERTY__COLUMN_NAME . ', ' . '       a.attnum AS ' . self::PROPERTY__COLUMN_INDEX . ', ' . '       t.typname AS ' . self::PROPERTY__COLUMN_TYPE . '  FROM pg_class c INNER JOIN pg_namespace ns ON ns.oid = c.relnamespace' . '       INNER JOIN pg_attribute a ON a.attrelid = c.oid' . '       INNER JOIN pg_type t ON t.oid = a.atttypid' . " WHERE c.relname IN ('" . implode("', '", $tableNames) . "')" . "   AND c.relkind IN ('r','v')" . "   AND ns.nspname = '{$datasource->schema}'" . '   AND a.attnum > 0';
     LogHelper::log_info(new StatementLogMessage('metadata.dataset.systemTable', $sql));
     return $datasourceHandler->executeQuery(new DataControllerCallContext(), $datasource, $sql, new PassthroughResultFormatter());
 }
开发者ID:ecs-hk,项目名称:Checkbook,代码行数:7,代码来源:PostgreSQLMetaModelLoader.php

示例3: apply

    public function apply ( $patients ) {

        if ( !is_array($patients) ) {
            $patients = array($patients);
        }

        foreach ( $patients as $patient ) {
            \LogHelper::log_info('Applying ReportConfigRemoveColumnConfig treatment to: ' . $patient->reportNodeId);

            $node = node_load($patient->reportNodeId);

            $reportConfigText = get_node_field_value($node, 'field_report_conf', 0, 'value', FALSE);
            $reportConfig = isset($reportConfigText) ? json_decode($reportConfigText) : NULL;
            if (!isset($reportConfig)) {
                \LogHelper::log_info('Report configuration is EMPTY');
                return;
            }

            // check column configs
            if (!empty($reportConfig->columnConfigs)) {
                foreach ($reportConfig->columnConfigs as $key => $value) {
                    if (empty($value->columnId)) {
                        unset($reportConfig->columnConfigs[$key]);
                    }
                }

                $node->field_report_conf[$node->language][0]['value'] = json_encode($reportConfig);
                node_save($node);
            }
        }
    }
开发者ID:reisystems-india,项目名称:GovDashboard-Community,代码行数:31,代码来源:RemoveColumnConfigTreatment.php

示例4: load

    public function load(AbstractMetaModel $environment_metamodel, array $filters = NULL) {
        LogHelper::log_notice(t('Loading Environment Meta Model from settings.php ...'));

        $datasourceCount = 0;

        $configurationDataSources = Environment::getInstance()->getConfigurationSection('Data Sources');
        if (isset($configurationDataSources)) {
            foreach ($configurationDataSources as $namespace => $sourceDataSources) {
                foreach ($sourceDataSources as $datasourceName => $sourceDataSource) {
                    $datasourceName = NameSpaceHelper::resolveNameSpace($namespace, $datasourceName);

                    $datasource = new DataSourceMetaData();
                    $datasource->name = $datasourceName;
                    $datasource->initializeFrom($sourceDataSource);
                    // it is possible that configuration contains 'readonly' property. We need to honor it
                    // ... and only when it is not set we mark the data source as read only
                    if (!isset($datasource->readonly)) {
                        $datasource->readonly = TRUE;
                    }

                    $environment_metamodel->registerDataSource($datasource);

                    $datasourceCount++;
                }
            }
        }

        LogHelper::log_info(t('Processed @datasourceCount data sources', array('@datasourceCount' => $datasourceCount)));
    }
开发者ID:reisystems-india,项目名称:GovDashboard-Community,代码行数:29,代码来源:SettingsPHP_EnvironmentMetaModelLoader.php

示例5: apply

    public function apply ( $patients ) {
        if ( !is_array($patients) ) {
            $patients = array($patients);
        }

        foreach ( $patients as $patient ) {
            \LogHelper::log_info('Applying ReportRepairDataset treatment to: ' . $patient->reportNodeId);

            $reportNode = node_load($patient->reportNodeId);
            $reportConfigText = get_node_field_value($reportNode, 'field_report_conf', 0, 'value', FALSE);

            $reportConfig = isset($reportConfigText) ? json_decode($reportConfigText) : NULL;
            if (!isset($reportConfig)) {
                \LogHelper::log_info('Report configuration is EMPTY');
                continue;
            }

            // check columns
            if (!empty($reportConfig->model->datasets)) {
                $reportNode->field_report_dataset_sysnames[$reportNode->language] = array();
                foreach ($reportConfig->model->datasets as $datasetName) {
                    $reportNode->field_report_dataset_sysnames[$reportNode->language][] = array('value' => $datasetName);
                }
                node_save($reportNode);
            }

        }
    }
开发者ID:reisystems-india,项目名称:GovDashboard-Community,代码行数:28,代码来源:RepairDatasetConfigTreatment.php

示例6: join

 public final function join(JoinController_SourceConfiguration $sourceConfigurationA, JoinController_SourceConfiguration $sourceConfigurationB)
 {
     $timeStart = microtime(TRUE);
     $result = $this->joinSourceConfigurations($sourceConfigurationA, $sourceConfigurationB);
     LogHelper::log_info(t('@className execution time: !executionTime', array('@className' => get_class($this), '!executionTime' => ExecutionPerformanceHelper::formatExecutionTime($timeStart))));
     return $result;
 }
开发者ID:ecs-hk,项目名称:Checkbook,代码行数:7,代码来源:AbstractJoinController.php

示例7: apply

    public function apply ( $patients ) {

        if ( !is_array($patients) ) {
            $patients = array($patients);
        }

        foreach ( $patients as $patient ) {
            \LogHelper::log_info('Applying ReportConfigRemoveFilter treatment to: ' . $patient->reportNodeId);

            $node = node_load($patient->reportNodeId);

            $reportConfigText = get_node_field_value($node, 'field_report_conf', 0, 'value', FALSE);
            $reportConfig = isset($reportConfigText) ? json_decode($reportConfigText) : NULL;
            if (!isset($reportConfig)) {
                \LogHelper::log_info('Report configuration is EMPTY');
                return;
            }

            // check column configs
            if (!empty($reportConfig->model->filters)) {
                $preservedFilters = array();
                foreach ($reportConfig->model->filters as $key => $filter) {
                    if ( $patient->filter != $filter ) {
                        $preservedFilters[] = $filter;
                    }
                }
                $reportConfig->model->filters = $preservedFilters;

                $node->field_report_conf[$node->language][0]['value'] = json_encode($reportConfig);
                node_save($node);
            }
        }
    }
开发者ID:reisystems-india,项目名称:GovDashboard-Community,代码行数:33,代码来源:RemoveFilterTreatment.php

示例8: __call

 public function __call($methodName, $args)
 {
     $timeStart = microtime(TRUE);
     $result = call_user_func_array(array($this->instance, $methodName), $args);
     LogHelper::log_info(t('Data Controller execution time for @methodName(): !executionTime', array('@methodName' => $methodName, '!executionTime' => ExecutionPerformanceHelper::formatExecutionTime($timeStart))));
     return $result;
 }
开发者ID:ecs-hk,项目名称:Checkbook,代码行数:7,代码来源:AbstractDataControllerProxy.php

示例9: load

    public function load(AbstractMetaModel $environment_metamodel, array $filters = NULL) {
        LogHelper::log_notice(t('Generating Environment Meta Model for Drupal database connections ...'));

        global $databases;

        $datasourceCount = 0;
        foreach ($databases as $namespace => $connections) {
            foreach ($connections as $datasourceNameOnly => $connection) {
                $datasource = new DataSourceMetaData();
                $datasource->name = NameSpaceHelper::addNameSpace($namespace, $datasourceNameOnly);
                $datasource->markAsPrivate();
                $datasource->readonly = FALSE;
                // setting required properties
                $this->setDataSourceProperty($datasource, $connection, 'type', 'driver');
                // setting other provided properties
                $this->setDataSourceExtensionProperties($datasource, $connection);

                // registering the data source
                $environment_metamodel->registerDataSource($datasource);
                $datasourceCount++;
            }
        }

        // Default database connection is shared because we store common utilities and dimensions there
        $defaultDataSource = $environment_metamodel->getDataSource(self::$DATASOURCE_NAME__DEFAULT);
        $defaultDataSource->shared = TRUE;

        LogHelper::log_info(t('Generated @datasourceCount data sources', array('@datasourceCount' => $datasourceCount)));
    }
开发者ID:reisystems-india,项目名称:GovDashboard-Community,代码行数:29,代码来源:DrupalDatabaseEnvironmentMetaModelGenerator.php

示例10: executeManipulationStatementBatch

    protected function executeManipulationStatementBatch(DataSourceMetaData $datasource, $sqls) {
        $sql = (count($sqls) == 1)
            ? $sqls
            : $this->getExtension('prepareManipulationStatementBatch')->prepare($this, $sqls);

        LogHelper::log_info(new StatementLogMessage('table.DML', $sql));
        return $this->executeStatement($datasource, $sql);
    }
开发者ID:reisystems-india,项目名称:GovDashboard-Community,代码行数:8,代码来源:AbstractSQLDataSourceManipulationHandler.php

示例11: updateDatasets

    protected function updateDatasets(SystemTableMetaModelLoaderCallContext $callcontext, DataSourceMetaData $datasource) {
        $updatedDatasets = NULL;

        // processing meta data for selected datasets
        $columnsProperties = $this->loadColumnsProperties($callcontext, $datasource);
        if (isset($columnsProperties)) {
            foreach ($columnsProperties as $columnProperties) {
                $tableAccessKey = $this->adjustTableName($columnProperties[self::CN_TABLE_NAME]);
                // checking if we need to work with the table
                if (!isset($callcontext->datasets[$tableAccessKey])) {
                    continue;
                }

                $datasets = $callcontext->datasets[$tableAccessKey];

                // invalidating column indexes
                if (!isset($updatedDatasets[$tableAccessKey])) {
                    foreach ($datasets as $dataset) {
                        $dataset->invalidateColumnIndexes();
                    }

                    $updatedDatasets[$tableAccessKey] = TRUE;
                }

                foreach ($datasets as $dataset) {
                    $column = new ColumnMetaData();
                    $column->name = $this->adjustColumnName($columnProperties[self::CN_COLUMN_NAME]);
                    $column->columnIndex = $columnProperties[self::CN_COLUMN_INDEX];
                    // preparing column type
                    $column->type->databaseType = $columnProperties[self::CN_COLUMN_TYPE];
                    $this->generateColumnApplicationType($callcontext, $datasource, $column);

                    // adjusting column properties
                    if (!isset($column->type->applicationType)) {
                        $column->visible = FALSE;
                    }
                    $this->adjustColumnVisibility($callcontext, $column);

                    $dataset->initializeColumnFrom($column);
                }
            }

            // marking all selected datasets as completed
            foreach ($callcontext->datasets as $tableAccessKey => $datasets) {
                if (!isset($updatedDatasets[$tableAccessKey])) {
                    continue;
                }

                foreach ($datasets as $dataset) {
                    $dataset->markAsComplete();
                }
            }
        }

        LogHelper::log_info(t(
            'Processed system meta data about @tableCount table(s) and @columnCount column(s)',
            array('@tableCount' => count($updatedDatasets), '@columnCount' => count($columnsProperties))));
    }
开发者ID:reisystems-india,项目名称:GovDashboard-Community,代码行数:58,代码来源:AbstractSystemTableMetaModelUpdater.php

示例12: dropDatasetStorage

 public function dropDatasetStorage(DataControllerCallContext $callcontext, DropDatasetStorageRequest $request)
 {
     $environment_metamodel = data_controller_get_environment_metamodel();
     $dataset = DatasetTypeHelper::getTableDataset($request->datasetName);
     $datasource = $environment_metamodel->getDataSource($dataset->datasourceName);
     $sql = $this->getExtension('dropTable')->generate($this, $dataset);
     LogHelper::log_info(new StatementLogMessage('table.drop', $sql));
     $this->executeStatement($datasource, $sql);
 }
开发者ID:ecs-hk,项目名称:Checkbook,代码行数:9,代码来源:AbstractSQLDataSourceStructureHandler.php

示例13: executeQuery

    protected function executeQuery(DataSourceMetaData $datasource, $operationName, $sql) {
        LogHelper::log_info(new StatementLogMessage("metamodel.system.{$operationName}[{$datasource->type}][{$datasource->name}]", $sql));

        $executionCallContext = new DataControllerCallContext();

        $datasourceQueryHandler = DataSourceQueryFactory::getInstance()->getHandler($datasource->type);

        return $datasourceQueryHandler->executeQuery($executionCallContext, $datasource, $sql);
    }
开发者ID:reisystems-india,项目名称:GovDashboard-Community,代码行数:9,代码来源:PostgreSQLMetaModelUpdater.php

示例14: rollbackTransaction

    public function rollbackTransaction($datasourceName) {
        $environment_metamodel = data_controller_get_environment_metamodel();

        $datasource = $environment_metamodel->getDataSource($datasourceName);

        $sql = $this->getExtension('rollbackTransaction')->generate($this, $datasource);
        LogHelper::log_info(new StatementLogMessage('transaction.rollback', $sql));
        $this->executeStatement($datasource, $sql);
    }
开发者ID:reisystems-india,项目名称:GovDashboard-Community,代码行数:9,代码来源:AbstractSQLDataSourceHandler.php

示例15: apply

    public function apply ( $patients ) {
        if ( !is_array($patients) ) {
            $patients = array($patients);
        }

        foreach ( $patients as $patient ) {
            \LogHelper::log_info('Applying ReportConfigRemoveColumnLevel treatment to: ' . $patient->reportNodeId);
        }
    }
开发者ID:reisystems-india,项目名称:GovDashboard-Community,代码行数:9,代码来源:RemoveColumnLevelTreatment.php


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