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


PHP eZDebugSetting类代码示例

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


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

示例1: run

 function run($url = '', $args = array())
 {
     if (empty($url)) {
         return '';
     }
     $args = array_merge($this->embed_defaults, $args);
     foreach ($this->handlers as $handler) {
         if (in_array('OCCustomEmbedHandlerInterface', class_implements($handler))) {
             if ($regex = call_user_func(array($handler, 'regex'))) {
                 if (preg_match($regex, $url, $matches)) {
                     if (false !== ($result = call_user_func(array($handler, 'callback'), $matches, $url, $args))) {
                         eZDebugSetting::writeNotice('ocembed', 'Autoembed has found url "' . $url . '" in ' . $handler, __METHOD__);
                         return $result;
                     }
                 }
             }
         }
     }
     $oembed = new OCoEmbed();
     $result = $oembed->get_html($url, $args);
     if ($result) {
         eZDebugSetting::writeNotice('ocembed', 'Autoembed has found url "' . $url . '" in a OEmbed provider', __METHOD__);
         if (!eZINI::instance('ocembed.ini')->hasVariable('Settings', 'DisableFixHttps')) {
             $result = str_replace('http://', '//', $result);
         }
         return $result;
     }
     // Still unknown
     eZDebugSetting::writeNotice('ocembed', 'Autoembed did not find url "' . $url . '"', __METHOD__);
     return array($this->maybe_make_link($url));
 }
开发者ID:rantoniazzi,项目名称:ocembed,代码行数:31,代码来源:ocembed.php

示例2: reportWarning

 /**
  * Show tidy warning
  */
 private function reportWarning()
 {
     $warning = tidy_get_error_buffer($this->tidy);
     if (!empty($warning)) {
         eZDebugSetting::writeWarning("extension-eztidy", "{$warning}", 'eZTidy::tidyCleaner()');
     }
 }
开发者ID:philandteds,项目名称:eztidy,代码行数:10,代码来源:eztidy.php

示例3: cleanupEmptyDirectories

 /**
  * Goes trough the directory path and removes empty directories, starting at
  * the leaf and deleting down until a non empty directory is reached.
  * If the path is not a directory, nothing will happen.
  *
  * @param string $path
  */
 public static function cleanupEmptyDirectories($path)
 {
     $dirpath = eZDir::dirpath($path);
     eZDebugSetting::writeDebug('kernel-clustering', "eZClusterFileHandler::cleanupEmptyDirectories( '{$dirpath}' )");
     if (is_dir($dirpath)) {
         eZDir::cleanupEmptyDirectories($dirpath);
     }
 }
开发者ID:mugoweb,项目名称:ezpublish-legacy,代码行数:15,代码来源:ezclusterfilehandler.php

示例4: search

 function search($searchText, $params = array(), $searchTypes = array())
 {
     eZDebug::createAccumulator('Search', 'eZ Find');
     eZDebug::accumulatorStart('Search');
     $error = 'Server not running';
     $asObjects = isset($params['AsObjects']) ? $params['AsObjects'] : true;
     //distributed search: fields to return can be specified in 2 parameters
     $params['FieldsToReturn'] = isset($params['FieldsToReturn']) ? $params['FieldsToReturn'] : array();
     if (isset($params['DistributedSearch']['returnfields'])) {
         $params['FieldsToReturn'] = array_merge($params['FieldsToReturn'], $params['DistributedSearch']['returnfields']);
     }
     $coreToUse = null;
     $shardQueryPart = null;
     if ($this->UseMultiLanguageCores === true) {
         $languages = $this->SiteINI->variable('RegionalSettings', 'SiteLanguageList');
         if (array_key_exists($languages[0], $this->SolrLanguageShards)) {
             $coreToUse = $this->SolrLanguageShards[$languages[0]];
             if ($this->FindINI->variable('LanguageSearch', 'SearchMainLanguageOnly') != 'enabled') {
                 $shardQueryPart = array('shards' => implode(',', $this->SolrLanguageShardURIs));
             }
         }
         //eZDebug::writeNotice( $languages, __METHOD__ . ' languages' );
         eZDebug::writeNotice($shardQueryPart, __METHOD__ . ' shards');
         //eZDebug::writeNotice( $this->SolrLanguageShardURIs, __METHOD__ . ' this languagesharduris' );
     } else {
         $coreToUse = $this->Solr;
     }
     if ($this->SiteINI->variable('SearchSettings', 'AllowEmptySearch') == 'disabled' && trim($searchText) == '') {
         $error = 'Empty search is not allowed.';
         eZDebug::writeNotice($error, __METHOD__);
         $resultArray = null;
     } else {
         eZDebug::createAccumulator('Query build', 'eZ Find');
         eZDebug::accumulatorStart('Query build');
         $queryBuilder = new ezfeZPSolrQueryBuilder($this);
         $queryParams = $queryBuilder->buildSearch($searchText, $params, $searchTypes);
         if (!$shardQueryPart == null) {
             $queryParams = array_merge($shardQueryPart, $queryParams);
         }
         eZDebug::accumulatorStop('Query build');
         eZDebugSetting::writeDebug('extension-ezfind-query', $queryParams, 'Final query parameters sent to Solr backend');
         eZDebug::createAccumulator('Engine time', 'eZ Find');
         eZDebug::accumulatorStart('Engine time');
         $resultArray = $coreToUse->rawSearch($queryParams);
         eZDebug::accumulatorStop('Engine time');
     }
     if ($resultArray) {
         $searchCount = $resultArray['response']['numFound'];
         $objectRes = $this->buildResultObjects($resultArray, $searchCount, $asObjects, $params);
         $stopWordArray = array();
         eZDebug::accumulatorStop('Search');
         return array('SearchResult' => $objectRes, 'SearchCount' => $searchCount, 'StopWordArray' => $stopWordArray, 'SearchExtras' => new ezfSearchResultInfo($resultArray));
     } else {
         eZDebug::accumulatorStop('Search');
         return array('SearchResult' => false, 'SearchCount' => 0, 'StopWordArray' => array(), 'SearchExtras' => new ezfSearchResultInfo(array('error' => ezpI18n::tr('ezfind', $error))));
     }
 }
开发者ID:OpencontentCoop,项目名称:ocsearchtools,代码行数:57,代码来源:ocsolr.php

示例5: modify

 function modify(&$tpl, &$operatorName, &$operatorParameters, &$rootNamespace, &$currentNamespace, &$operatorValue, &$namedParameters)
 {
     switch ($operatorName) {
         case 'tidy_output':
             eZDebugSetting::writeNotice("extension-eztidy", "Use 'tidy_output' template operator", "eZTidy::tidyCleaner()");
             $tidy = eZTidy::instance('OutputFilter');
             $operatorValue = $tidy->tidyCleaner($operatorValue);
             break;
     }
 }
开发者ID:stevoland,项目名称:ez_sbase,代码行数:10,代码来源:tidyoutputoperator.php

示例6: execute

    function execute( $process, $event )
    {
        $parameters = $process->attribute( 'parameter_list' );
        $object = eZContentObject::fetch( $parameters['object_id'] );

        if ( !$object )
        {
            eZDebugSetting::writeError( 'kernel-workflow-waituntildate','The object with ID '.$parameters['object_id'].' does not exist.', 'eZApproveType::execute() object is unavailable' );
            return eZWorkflowType::STATUS_WORKFLOW_CANCELLED;
        }

        $version = $object->version( $parameters['version'] );
        $objectAttributes = $version->attribute( 'contentobject_attributes' );
        $waitUntilDateObject = $this->workflowEventContent( $event );
        $waitUntilDateEntryList = $waitUntilDateObject->attribute( 'classattribute_id_list' );
        $modifyPublishDate = $event->attribute( 'data_int1' );

        foreach ( array_keys( $objectAttributes ) as $key )
        {
            $objectAttribute = $objectAttributes[$key];
            $contentClassAttributeID = $objectAttribute->attribute( 'contentclassattribute_id' );
            if ( in_array( $objectAttribute->attribute( 'contentclassattribute_id' ), $waitUntilDateEntryList ) )
            {
                $dateTime = $objectAttribute->attribute( 'content' );
                if ( $dateTime instanceof eZDateTime or
                     $dateTime instanceof eZTime or
                     $dateTime instanceof eZDate )
                {
                    if ( time() < $dateTime->timeStamp() )
                    {
                        $this->setInformation( "Event delayed until " . $dateTime->toString( true ) );
                        $this->setActivationDate( $dateTime->timeStamp() );
                        return eZWorkflowType::STATUS_DEFERRED_TO_CRON_REPEAT;
                    }
                    else if ( $dateTime->isValid() and $modifyPublishDate )
                    {
                        $object->setAttribute( 'published', $dateTime->timeStamp() );
                        $object->store();
                    }
                    else
                    {
                        return eZWorkflowType::STATUS_ACCEPTED;
//                        return eZWorkflowType::STATUS_WORKFLOW_DONE;
                    }
                }
                else
                {
                    return eZWorkflowType::STATUS_ACCEPTED;
//                   return eZWorkflowType::STATUS_WORKFLOW_DONE;
                }
            }
        }
        return eZWorkflowType::STATUS_ACCEPTED;
//        return eZWorkflowType::STATUS_WORKFLOW_DONE;
    }
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:55,代码来源:ezwaituntildatetype.php

示例7: initializeEvent

 function initializeEvent($event, $params)
 {
     eZDebugSetting::writeDebug('kernel-notification', $params, 'params for type');
     $time = 0;
     if (array_key_exists('time', $params)) {
         $time = $params['time'];
     } else {
         $time = time();
     }
     $event->setAttribute('data_int1', $time);
 }
开发者ID:jordanmanning,项目名称:ezpublish,代码行数:11,代码来源:ezcurrenttimetype.php

示例8: passwordHasExpired

 /**
  * Writes audit information and redirects the user to the password change form.
  *
  * @param eZUser $user
  */
 protected static function passwordHasExpired($user)
 {
     $userID = $user->attribute('contentobject_id');
     // Password expired
     eZDebugSetting::writeDebug('kernel-user', $user, 'user password expired');
     // Failed login attempts should be logged
     $userIDAudit = isset($userID) ? $userID : 'null';
     $loginEscaped = eZDB::instance()->escapeString($user->attribute('login'));
     eZAudit::writeAudit('user-failed-login', array('User id' => $userIDAudit, 'User login' => $loginEscaped, 'Comment' => 'Failed login attempt: Password Expired. eZPaExUser::loginUser()'));
     // Redirect user to password change form
     self::redirectToChangePasswordForm($userID);
 }
开发者ID:brookinsconsulting,项目名称:ezecosystem,代码行数:17,代码来源:ezpaexuser.php

示例9: doSeek

 function doSeek($offset, $whence)
 {
     if ($whence == SEEK_SET) {
         $offset = $offset - gztell($this->File);
     } else {
         if ($whence == SEEK_END) {
             eZDebugSetting::writeError('lib-ezfile-gziplibz', "Seeking from end is not supported for gzipped files");
             return false;
         }
     }
     return @gzseek($this->File, $offset);
 }
开发者ID:legende91,项目名称:ez,代码行数:12,代码来源:ezgzipshellcompressionhandler.php

示例10: executeSending

 /**
  * Execute sending process in Email
  * @see extension/ezcomments/classes/ezcomNotificationManager#executeSending($subject, $body, $subscriber)
  */
 public function executeSending($subject, $body, $subscriber)
 {
     $email = $subscriber->attribute('email');
     $parameters = array();
     $parameters['content_type'] = $this->emailContentType;
     $parameters['from'] = $this->emailFrom;
     $transport = eZNotificationTransport::instance('ezmail');
     $result = $transport->send(array($email), $subject, $body, null, $parameters);
     if ($result === false) {
         throw new Exception('Send email error! Subscriber id:' . $subscriber->attribute('id'));
     }
     eZDebugSetting::writeNotice('extension-ezcomments', "An email has been sent to '{$email}' (subject: {$subject})", __METHOD__);
 }
开发者ID:ezsystems,项目名称:ezcomments-ls-extension,代码行数:17,代码来源:ezcomnotificationemailmanager.php

示例11: cachedTree

 static function cachedTree($key, $uri, $res, $templatePath, &$extraParameters)
 {
     $templateCache =& eZTemplateTreeCache::cacheTable();
     $key = eZTemplateTreeCache::internalKey($key);
     $root = null;
     if (isset($templateCache[$key])) {
         $root =& $templateCache[$key]['root'];
         eZDebugSetting::writeDebug('eztemplate-tree-cache', "Cache hit for uri '{$uri}' with key '{$key}'", 'eZTemplateTreeCache::cachedTree');
     } else {
         eZDebugSetting::writeDebug('eztemplate-tree-cache', "Cache miss for uri '{$uri}' with key '{$key}'", 'eZTemplateTreeCache::cachedTree');
     }
     return $root;
 }
开发者ID:nfrp,项目名称:ezpublish,代码行数:13,代码来源:eztemplatetreecache.php

示例12: handle

 function handle($event)
 {
     eZDebugSetting::writeDebug('kernel-notification', $event, "trying to handle event");
     if ($event->attribute('event_type_string') == 'ezcollaboration') {
         $parameters = array();
         $status = $this->handleCollaborationEvent($event, $parameters);
         if ($status == eZNotificationEventHandler::EVENT_HANDLED) {
             $this->sendMessage($event, $parameters);
         } else {
             return false;
         }
     }
     return true;
 }
开发者ID:jordanmanning,项目名称:ezpublish,代码行数:14,代码来源:ezcollaborationnotificationhandler.php

示例13: create

 static function create($notificationEventTypeString)
 {
     $types =& $GLOBALS["eZNotificationEventTypes"];
     if (!isset($types[$notificationEventTypeString])) {
         eZDebugSetting::writeDebug('kernel-notification', $types, 'notification types');
         eZNotificationEventType::loadAndRegisterType($notificationEventTypeString);
         eZDebugSetting::writeDebug('kernel-notification', $types, 'notification types 2');
     }
     $def = null;
     if (isset($types[$notificationEventTypeString])) {
         $className = $types[$notificationEventTypeString];
         $def =& $GLOBALS["eZNotificationEventTypeObjects"][$notificationEventTypeString];
         if (!is_object($def) || strtolower(get_class($def)) != $className) {
             $def = new $className();
         }
     }
     return $def;
 }
开发者ID:CG77,项目名称:ezpublish-legacy,代码行数:18,代码来源:eznotificationeventtype.php

示例14: setDateForItem

 static function setDateForItem($item, $settings)
 {
     if (!is_array($settings)) {
         return false;
     }
     $dayNum = isset($settings['day']) ? $settings['day'] : false;
     $hour = $settings['hour'];
     $currentDate = getdate();
     $hoursDiff = $hour - $currentDate['hours'];
     switch ($settings['frequency']) {
         case 'day':
             if ($hoursDiff <= 0) {
                 $hoursDiff += 24;
             }
             $secondsDiff = 3600 * $hoursDiff - $currentDate['seconds'] - 60 * $currentDate['minutes'];
             break;
         case 'week':
             $daysDiff = $dayNum - $currentDate['wday'];
             if ($daysDiff < 0 or $daysDiff == 0 and $hoursDiff <= 0) {
                 $daysDiff += 7;
             }
             $secondsDiff = 3600 * ($daysDiff * 24 + $hoursDiff) - $currentDate['seconds'] - 60 * $currentDate['minutes'];
             break;
         case 'month':
             // If the daynum the user has chosen is larger than the number of days in this month,
             // then reduce it to the number of days in this month.
             $daysInMonth = intval(date('t', mktime(0, 0, 0, $currentDate['mon'], 1, $currentDate['year'])));
             if ($dayNum > $daysInMonth) {
                 $dayNum = $daysInMonth;
             }
             $daysDiff = $dayNum - $currentDate['mday'];
             if ($daysDiff < 0 or $daysDiff == 0 and $hoursDiff <= 0) {
                 $daysDiff += $daysInMonth;
             }
             $secondsDiff = 3600 * ($daysDiff * 24 + $hoursDiff) - $currentDate['seconds'] - 60 * $currentDate['minutes'];
             break;
     }
     $sendDate = time() + $secondsDiff;
     eZDebugSetting::writeDebug('kernel-notification', getdate($sendDate), "item date");
     $item->setAttribute('send_date', $sendDate);
     return $sendDate;
 }
开发者ID:legende91,项目名称:ez,代码行数:42,代码来源:eznotificationschedule.php

示例15: move

 /**
  * Move file.
  *
  * \public
  */
 function move($dstPath)
 {
     $srcPath = $this->filePath;
     eZDebugSetting::writeDebug('kernel-clustering', "fs::move( '{$srcPath}', '{$dstPath}' )", __METHOD__);
     eZDebug::accumulatorStart('dbfile', false, 'dbfile');
     eZFileHandler::move($srcPath, $dstPath);
     eZDebug::accumulatorStop('dbfile');
 }
开发者ID:schwabokaner,项目名称:ezpublish-legacy,代码行数:13,代码来源:ezfsfilehandler.php


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