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


PHP LogHelper::log_debug方法代码示例

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


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

示例1: loadFromDirectory

    protected function loadFromDirectory(AbstractMetaModel $metamodel, array $filters = NULL, $path, $namespace, $level = 0) {
        $filecount = 0;

        $handle = opendir($path);
        if ($handle !== FALSE) {
            $indent = str_pad('', $level * 4);
            while (($filename = readdir($handle)) !== FALSE) {
                if (is_dir($path . DIRECTORY_SEPARATOR . $filename)) {
                    if ($filename[0] != '.') {
                        $folder = DIRECTORY_SEPARATOR . $filename;

                        $nestedNameSpace = isset($namespace) ? NameSpaceHelper::addNameSpace($namespace, $filename) : $filename;

                        LogHelper::log_debug(t("{$indent}Scanning '@folderName' ...", array('@folderName' => $folder)));
                        $filecount += $this->loadFromDirectory($metamodel, $filters, $path . $folder, $nestedNameSpace, $level + 1);
                    }
                }
                elseif ($this->fileNameEndsWithJson($filename)) {
                    LogHelper::log_debug(t("{$indent}Processing '@filename' ...", array('@filename' => $filename)));

                    $this->loadFromFile($metamodel, $filters, $namespace, $path . DIRECTORY_SEPARATOR, $filename);
                    $filecount++;
                }
            }

            closedir($handle);
        }

        return $filecount;
    }
开发者ID:reisystems-india,项目名称:GovDashboard-Community,代码行数:30,代码来源:AbstractFileMetaModelLoader.php

示例2: loadFromDirectory

 protected function loadFromDirectory(AbstractMetaModel $metamodel, array $filters = NULL, $path, $namespace, $level = 0)
 {
     $filecount = 0;
     $handle = opendir($path);
     if ($handle !== FALSE) {
         $indent = str_pad('', $level * 4);
         while (($filename = readdir($handle)) !== FALSE) {
             if (is_dir($path . DIRECTORY_SEPARATOR . $filename)) {
                 if ($filename[0] != '.') {
                     $folder = DIRECTORY_SEPARATOR . $filename;
                     // once name space is defined we do not change it
                     // it will be the same for all sub-folders regardless on depth
                     $ns = isset($namespace) ? $namespace : $filename;
                     LogHelper::log_debug(t("{$indent}Scanning '@folderName' ...", array('@folderName' => $folder)));
                     $filecount += $this->loadFromDirectory($metamodel, $filters, $path . $folder, $ns, $level + 1);
                 }
             } elseif ($this->fileNameEndsWithJson($filename)) {
                 LogHelper::log_debug(t("{$indent}Processing '@filename' ...", array('@filename' => $filename)));
                 $this->loadFromFile($metamodel, $filters, $namespace, $path . DIRECTORY_SEPARATOR, $filename);
                 $filecount++;
             }
         }
         closedir($handle);
     }
     return $filecount;
 }
开发者ID:ecs-hk,项目名称:Checkbook,代码行数:26,代码来源:AbstractFileMetaModelLoader.php

示例3: executeDatasetUpdateOperations

    public function executeDatasetUpdateOperations(DataControllerCallContext $callcontext, DatasetMetaData $dataset, array $operations) {
        $request = new UpdateDatasetStorageRequest($dataset->name);
        $request->addOperations($operations);

        LogHelper::log_debug($request);

        $this->datasourceStructureHandler->updateDatasetStorage($callcontext, $request);
    }
开发者ID:reisystems-india,项目名称:GovDashboard-Community,代码行数:8,代码来源:AbstractCreateDatasetStorageImpl.php

示例4: dropDimensionStorage

    public function dropDimensionStorage(DataControllerCallContext $callcontext, DataSourceStructureHandler $datasourceStructureHandler, DatasetMetaData $logicalDataset, $columnName) {
        $lookupDatasetName = StarSchemaNamingConvention::getAttributeRelatedName($logicalDataset->name, $columnName);

        $request = new DatasetStorageRequest($lookupDatasetName);
        LogHelper::log_debug($request);
        $datasourceStructureHandler->dropDatasetStorage($callcontext, $request);

        parent::dropDimensionStorage($callcontext, $datasourceStructureHandler, $logicalDataset, $columnName);
    }
开发者ID:reisystems-india,项目名称:GovDashboard-Community,代码行数:9,代码来源:StarSchemaStringDimensionHandler.php

示例5: getValues

 public function getValues(array $names)
 {
     $timeStart = microtime(TRUE);
     $values = parent::getValues($names);
     $nameCount = count($names);
     $loadedValueCount = count($values);
     LogHelper::log_debug(t('[@cacheType] Requested entries: @entryNames', array('@cacheType' => $this->getCacheType(), '@entryNames' => ArrayHelper::printArray(array_values($names), ', ', TRUE, FALSE))));
     LogHelper::log_debug(t('[@cacheType] Retrieved entries: @entryNames', array('@cacheType' => $this->getCacheType(), '@entryNames' => $nameCount == $loadedValueCount ? 'ALL' : (isset($values) ? ArrayHelper::printArray(array_keys($values), ', ', TRUE, FALSE) : 'NONE'))));
     LogHelper::log_info(t('[@cacheType] Execution time for retrieving @entryCount entries is !executionTime. @successFlag', array('@cacheType' => $this->getCacheType(), '@entryCount' => $nameCount, '!executionTime' => ExecutionPerformanceHelper::formatExecutionTime($timeStart), '@successFlag' => isset($values) ? $nameCount == $loadedValueCount ? 'Cache HIT' : "Cache hit for ONLY {$loadedValueCount} entries out of {$nameCount}" : 'Cache NOT hit')));
     return $values;
 }
开发者ID:ecs-hk,项目名称:Checkbook,代码行数:11,代码来源:AbstractSharedCacheHandler.php

示例6: dropDatabase

    public function dropDatabase($datasourceName) {
        $datasourceName = StringHelper::trim($datasourceName);

        $this->checkDataSourceStructurePermission($datasourceName);

        $callcontext = $this->prepareCallContext();

        $request = new DropDatabaseRequest($datasourceName);
        LogHelper::log_debug($request);

        $datasourceStructureHandler = $this->getDataSourceStructureHandler($datasourceName);
        $datasourceStructureHandler->dropDatabase($callcontext, $request);
    }
开发者ID:reisystems-india,项目名称:GovDashboard-Community,代码行数:13,代码来源:DefaultDataStructureController.php

示例7: get_node_field_value

function get_node_field_value($node, $fieldName, $index = 0, $storageSuffixName = 'value', $required = FALSE) {
    $value = NULL;

    if (!isset($node->language)) {
        LogHelper::log_debug($node);
        throw new IllegalArgumentException(t(
            '%fieldName@index field is not accessible because language is not set for the node: %nodeId',
            array(
                '%nodeId' => $node->nid,
                '%fieldName' => $fieldName,
                '@index' => ((!isset($index) || ($index == 0)) ? '' : t('[%index]', array('%index' => $index))))));
    }

    $fieldValue = isset($node->$fieldName) ? $node->$fieldName : NULL;
    if (isset($fieldValue[$node->language])) {
        $fieldLocalizedValues = $fieldValue[$node->language];
        if (isset($index)) {
            // accessing individual value
            if (isset($fieldLocalizedValues[$index][$storageSuffixName])) {
                $value = StringHelper::trim($fieldLocalizedValues[$index][$storageSuffixName]);
            }
        }
        else {
            // we need to return an array of values
            foreach ($fieldLocalizedValues as $i => $fieldLocalizedValue) {
                $v = isset($fieldLocalizedValue[$storageSuffixName]) ? $fieldLocalizedValue[$storageSuffixName] : NULL;
                if (!isset($v)) {
                    $v = StringHelper::trim($v);
                }

                $value[$i] = $v;
            }
        }
    }
    
    if ($required && !isset($value)) {
        LogHelper::log_debug($node);
        throw new IllegalArgumentException(t(
            '%fieldName@index field has not been set for the node: %nodeId',
            array(
                '%nodeId' => $node->nid,
                '%fieldName' => $fieldName,
                '@index' => ((!isset($index) || ($index == 0)) ? '' : t('[%index]', array('%index' => $index))))));
    }

    return $value;
}
开发者ID:reisystems-india,项目名称:GovDashboard-Community,代码行数:47,代码来源:NodeFieldHelper.php

示例8: detectSourceType

    public function detectSourceType(DatasetMetaData $dataset) {
        if (isset($dataset->sourceType)) {
            return $dataset->sourceType;
        }

        if (isset($dataset->source)) {
            $source = trim($dataset->source);
            $isTableName = strpos($source, ' ') === FALSE;

            return $isTableName ? TableDatasetSourceTypeHandler::SOURCE_TYPE : SQLDatasetSourceTypeHandler::SOURCE_TYPE;
        }

        LogHelper::log_debug($dataset);
        throw new IllegalArgumentException(t(
            'Could not detect type of source for the dataset: %datasetName',
            array('%datasetName' => $dataset->publicName)));
    }
开发者ID:reisystems-india,项目名称:GovDashboard-Community,代码行数:17,代码来源:DefaultDatasetSourceTypeFactory.php

示例9: castValueImpl

    protected function castValueImpl($value) {
        $array = NULL;

        if (is_array($value)) {
            $array = $value;
        }
        elseif (is_object($value)) {
            $array = get_object_vars($value);
        }
        else {
            $array = json_decode($value, TRUE);
            if (!isset($array)) {
                LogHelper::log_debug($value);
                throw new IllegalArgumentException(t('Incorrect value of type ARRAY'));
            }
        }

        return $array;
    }
开发者ID:reisystems-india,项目名称:GovDashboard-Community,代码行数:19,代码来源:ArrayDataTypeHandler.php

示例10: castValueImpl

    protected function castValueImpl($value) {
        $object = NULL;

        if (is_object($value)) {
            $object = $value;
        }
        elseif (is_array($value)) {
            $object = (object) $value;
        }
        else {
            $object = json_decode($value);
            if (!isset($object)) {
                LogHelper::log_debug($value);
                throw new IllegalArgumentException(t('Incorrect value of type OBJECT'));
            }
        }

        return $object;
    }
开发者ID:reisystems-india,项目名称:GovDashboard-Community,代码行数:19,代码来源:ObjectDataTypeHandler.php

示例11: createDatasetStorage

    /**
     * @param DataControllerCallContext $callcontext
     * @param DatasetMetaData $newDataset
     * @param DatasetStorageObserver[] $observers
     */
    protected function createDatasetStorage(DataControllerCallContext $callcontext, DatasetMetaData $newDataset, array $observers = NULL) {
        // creating physical storage for the dataset
        $request = new DatasetStorageRequest($newDataset->name);
        LogHelper::log_debug($request);
        $this->datasourceStructureHandler->createDatasetStorage($callcontext, $request);

        if (isset($observers)) {
            // notifying that storage for the dataset had been created
            foreach ($observers as $observer) {
                $observer->registerDataset($callcontext, $newDataset, DatasetStorageObserver::STAGE__BEFORE);
            }
            foreach ($observers as $observer) {
                $observer->registerDataset($callcontext, $newDataset, DatasetStorageObserver::STAGE__AFTER);
            }

            // notifying that columns have already been created
            foreach ($newDataset->getColumns(FALSE) as $column) {
                foreach ($observers as $observer) {
                    $observer->registerColumn($callcontext, $newDataset, $column->name, DatasetStorageObserver::STAGE__BEFORE);
                }
                foreach ($observers as $observer) {
                    $observer->registerColumn($callcontext, $newDataset, $column->name, DatasetStorageObserver::STAGE__AFTER);
                }

                if ($column->isUsed() && ($column->persistence == ColumnMetaData::PERSISTENCE__NO_STORAGE)) {
                    foreach ($observers as $observer) {
                        $observer->createColumnStorage(
                            $callcontext, $this->datasourceStructureHandler,
                            $newDataset, $column->name, DatasetStorageObserver::STAGE__BEFORE);
                    }

                    $column->persistence = ColumnMetaData::PERSISTENCE__STORAGE_CREATED;

                    foreach ($observers as $observer) {
                        $observer->createColumnStorage(
                            $callcontext, $this->datasourceStructureHandler,
                            $newDataset, $column->name, DatasetStorageObserver::STAGE__AFTER);
                    }
                }
            }
        }
    }
开发者ID:reisystems-india,项目名称:GovDashboard-Community,代码行数:47,代码来源:CreateDatasetStorageImpl.php

示例12: truncateDatasetStorage

    /**
     * @param DataControllerCallContext $callcontext
     * @param DatasetMetaData $dataset
     * @param DatasetStorageObserver[] $observers
     */
    protected function truncateDatasetStorage(DataControllerCallContext $callcontext, DatasetMetaData $dataset, array $observers = NULL) {
        if (isset($observers)) {
            // notifying observers that we are about to truncate dataset
            foreach ($observers as $observer) {
                $observer->truncateDatasetStorage($callcontext, $dataset);
            }
        }

        // truncating physical storage of the dataset
        $request = new DatasetStorageRequest($dataset->name);
        LogHelper::log_debug($request);
        $this->datasourceStructureHandler->truncateDatasetStorage($callcontext, $request);

        if (isset($observers)) {
            // truncating physical storage of the dataset columns
            foreach ($dataset->getColumns(FALSE) as $column) {
                if ($column->persistence == ColumnMetaData::PERSISTENCE__STORAGE_CREATED) {
                    foreach ($observers as $observer) {
                        $observer->truncateColumnStorage($callcontext, $this->datasourceStructureHandler, $dataset, $column->name);
                    }
                }
            }
        }
    }
开发者ID:reisystems-india,项目名称:GovDashboard-Community,代码行数:29,代码来源:TruncateDatasetStorageImpl.php

示例13: executeCubeCountRequest

 protected function executeCubeCountRequest(DataQueryControllerCubeRequest $request)
 {
     $callcontext = $this->prepareCallContext();
     $requestPreparer = new DataSourceCubeQueryRequestPreparer();
     $cubeCountRequest = $requestPreparer->prepareCubeCountRequest($request);
     $this->prepareCubeRequestMetaData($cubeCountRequest);
     $cubeResultFormatter = isset($request->resultFormatter) ? $request->resultFormatter : $this->getDefaultResultFormatter();
     $cubeResultFormatter->adjustCubeCountRequest($callcontext, $cubeCountRequest);
     LogHelper::log_debug($request);
     $cubeName = $cubeCountRequest->getCubeName();
     return $this->getDataSourceQueryHandlerByCubeName($cubeName)->countCubeRecords($callcontext, $cubeCountRequest, $cubeResultFormatter);
 }
开发者ID:ecs-hk,项目名称:Checkbook,代码行数:12,代码来源:DefaultDataQueryController.php

示例14: registerCube

    public function registerCube(CubeMetaData $cube) {
        $this->checkAssemblingStarted();

        if (!isset($cube->name)) {
            LogHelper::log_debug($cube);
            throw new IllegalArgumentException(t('Cube name has not been defined'));
        }

        $cubeName = $cube->name;
        NameSpaceHelper::checkAlias($cubeName);

        $existingCube = $this->findCube($cubeName, TRUE);
        if (isset($existingCube)) {
            if ($cube->isTemporary()) {
                $this->unregisterCube($cubeName);
            }
            else {
                LogHelper::log_debug($existingCube);
                LogHelper::log_debug($cube);
                throw new IllegalArgumentException(t(
                    'Cube with name %cubeName has already been defined',
                    array('%cubeName' => $cube->publicName)));
            }
        }

        if (!$cube->isTemporary()) {
            // we support only one cube per dataset
            $cube2 = $this->findCubeByDatasetName($cube->factsDatasetName);
            if (isset($cube2)) {
                LogHelper::log_debug($cube2);
                LogHelper::log_debug($cube);
                throw new IllegalArgumentException(t(
                    'Found several cubes for %datasetName dataset: [%cubeName1, %cubeName2]',
                    array('%datasetName' => $cube->factsDatasetName, '%cubeName1' => $cube->publicName, '%cubeName2' => $cube2->publicName)));
            }
        }

        // fixing cube properties
        if (isset($cube->dimensions)) {
            foreach ($cube->dimensions as $dimension) {
                if (!isset($dimension->attributeColumnName)) {
                    $dimension->attributeColumnName = $dimension->name;
                }
            }
        }

        $this->cubes[$cubeName] = $cube;
    }
开发者ID:reisystems-india,项目名称:GovDashboard-Community,代码行数:48,代码来源:MetaModel.php

示例15: errorDimensionNotFound

    protected function errorDimensionNotFound($dimensionName) {
        // logging list of available dimension names
        $availableDimensionNames = NULL;
        if (isset($this->dimensions)) {
            foreach ($this->dimensions as $dimension) {
                if ($dimension->isUsed()) {
                    $availableDimensionNames[] = $dimension->name;
                }
            }
        }
        LogHelper::log_debug(t('Available dimensions:'));
        LogHelper::log_debug($availableDimensionNames);

        throw new IllegalArgumentException(t(
        	'%dimensionName dimension is not registered in %cubeName cube',
            array('%dimensionName' => $dimensionName, '%cubeName' => $this->publicName)));
    }
开发者ID:reisystems-india,项目名称:GovDashboard-Community,代码行数:17,代码来源:CubeMetaData.php


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