• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP sfLogger类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: depp_prioritiser

/**
 * Return the HTML code for an unordered list showing opinions that can be voted (no AJAX)
 * If the user has already voted, then a message appears
 * 
 * @param  BaseObject  $object   Propel object instance to vote
 * @param  string      $message  a message string to be displayed in the voting-message block
 * @param  array       $options  Array of HTML options to apply on the HTML list
 * @return string
 **/
function depp_prioritiser($object, $message = '', $options = array())
{
    if (is_null($object)) {
        sfLogger::getInstance()->debug('A NULL object cannot be prioritised');
        return '';
    }
    $user_id = sfContext::getInstance()->getUser()->getId();
    try {
        $options = _parse_attributes($options);
        if (!isset($options['id'])) {
            $options = array_merge($options, array('id' => 'prioritising-items'));
        }
        $object_id = $object->getPrioritisableReferenceKey();
        $list_content = '';
        $object_priority = is_null($object->getPriorityValue()) ? 1 : $object->getPriorityValue();
        for ($i = $object->allowsNullPriority() ? 0 : 1; $i <= $object->getMaxPriority(); $i++) {
            if ($object_priority == $i) {
                if ($object->getPriorityLastUser() != 0) {
                    $label = sprintf('Priorit&agrave; impostata da user_id:%d il %s alle %s', $object->getPriorityLastUser(), $object->getPriorityLastUpdate('d/m/Y'), $object->getPriorityLastUpdate('h:i'));
                } else {
                    $label = 'Priorit&agrave; di default';
                }
                $list_content .= content_tag('li', content_tag('span', $i, array('title' => $label)), array('class' => 'current'));
            } else {
                $label = sprintf(__('Set priority to %d'), $i);
                $list_content .= content_tag('li', link_to($i, sprintf('deppPrioritising/prioritise?object_id=%d&object_model=%s&priority=%d', $object->getId(), get_class($object), $i), array('title' => $label, 'post' => true)));
            }
        }
        return content_tag('ul', $list_content, $options) . content_tag('div', $message, array('id' => 'priority-message'));
    } catch (Exception $e) {
        sfLogger::getInstance()->err('Exception catched from deppPrioritising helper: ' . $e->getMessage());
    }
}
开发者ID:valerio-bozzolan,项目名称:openparlamento,代码行数:42,代码来源:deppPrioritisingHelper.php


示例2: highlight

 public static function highlight($raw_body)
 {
     $body = sfMarkdown::doConvert($raw_body);
     $matches = array();
     $langs = array();
     preg_match_all("/<pre><code>\\[(\\w*)\\](\\r?\\n)+(.+)(\\r?\\n)+<\\/code><\\/pre>/isU", $body, $matches, PREG_SET_ORDER);
     if (sizeof($matches) > 0) {
         $service = new SnippetServiceClient();
         $cnt = 1;
         foreach ($matches as $match) {
             sfLogger::getInstance()->info("From myUtils: " . $match[3]);
             $languageLower = $match[1];
             $languageUpper = strtoupper($match[1]);
             sfLogger::getInstance()->info("myUtils languages: {$languageLower} {$languageUpper}" . sizeof(self::$languages));
             if (in_array($languageUpper, self::$languages)) {
                 $highlighted = $service->highlight($languageUpper, htmlspecialchars_decode($match[3]));
                 $highlighted['snippet'] = "<div class=\"code-wrapper\">{$highlighted['snippet']}</div>";
                 $body = str_replace($match[0], $highlighted['snippet'], $body, $cnt);
                 $langs[$languageLower] = $langs[$languageLower] ? $langs[$languageLower] + 1 : 1;
             } else {
                 sfLogger::getInstance()->info("myUtils : {$languageLower} is not supported.");
                 $langs[$languageLower] = $langs[$languageLower] ? $langs[$languageLower] + 1 : 1;
                 $body = str_replace($match[0], "<div class=\"code-wrapper\"><pre><code>{$match[3]}</code></pre></div>", $body, $cnt);
             }
         }
     }
     return array('body' => $body, 'langs' => $langs);
 }
开发者ID:hoydaa,项目名称:snippets.hoydaa.org,代码行数:28,代码来源:myUtils.class.php


示例3: depp_omnibus_selector

/**
 * Return the HTML code for an unordered list showing opinions that can be voted (no AJAX)
 * If the user has already voted, then a message appears
 * 
 * @param  BaseObject  $object   Propel object instance to vote
 * @param  string      $message  a message string to be displayed in the voting-message block
 * @param  array       $options  Array of HTML options to apply on the HTML list
 * @return string
 **/
function depp_omnibus_selector($object, $message = '', $options = array())
{
    if (is_null($object)) {
        sfLogger::getInstance()->debug('A NULL object cannot be flagged as Omnibus');
        return '';
    }
    $user_id = sfContext::getInstance()->getUser()->getId();
    try {
        $options = _parse_attributes($options);
        if (!isset($options['id'])) {
            $options = array_merge($options, array('id' => 'omnibus-flag'));
        }
        $object_is_omnibus = $object->getIsOmnibus();
        $object_will_be_omnibus = !$object_is_omnibus;
        $selector = '';
        if ($object_is_omnibus) {
            $status = "Questo atto &egrave; Omnibus";
            $label = "Marcalo come non-Omnibus";
        } else {
            $status = "Questo atto non &egrave; Omnibus";
            $label = "Marcalo come Omnibus";
        }
        $selector .= link_to($label, sprintf('atto/setOmnibusStatus?id=%d&status=%d', $object->getId(), $object_will_be_omnibus), array('post' => true));
        return content_tag('div', $status) . content_tag('div', $selector, $options);
    } catch (Exception $e) {
        sfLogger::getInstance()->err('Exception catched from deppOmnibus helper: ' . $e->getMessage());
    }
}
开发者ID:valerio-bozzolan,项目名称:openparlamento,代码行数:37,代码来源:deppOmnibusHelper.php


示例4: executePrioritise

 /**
  * <p>Vote a propel object, un-ajax style</p>
  * 
  * @see  deppPropelActAsVotableBehavior API
  */
 public function executePrioritise()
 {
     try {
         if ($this->getRequest()->getMethod() !== sfRequest::POST) {
             $this->setError($this->messages['post_only']);
         }
         // Retrieve parameters from request
         $object_id = $this->getRequestParameter('object_id');
         $object_model = $this->getRequestParameter('object_model');
         $priority = $this->getRequestParameter('priority');
         // Retrieve ratable propel object
         if (is_null($priority) || is_null($object_id) || is_null($object_model)) {
             $this->setError($this->messages['missing_params']);
         }
         $object = deppPropelActAsPrioritisableBehaviorToolkit::retrievePrioritisableObject($object_model, $object_id);
         if (is_null($object)) {
             $this->setError($this->message['prioritisable_error']);
         }
         // User retrieval
         $user_id = sfContext::getInstance()->getUser()->getId();
         if (!$object->allowsNullPriority() && $priority == 0) {
             $msg = $this->messages['null_not_allowed'];
             sfLogger::getInstance()->warning($msg);
             $this->setError($msg);
         } else {
             $object->setPriorityValue((int) $priority, $user_id);
             $message = $this->messages['thank_you'];
         }
         $this->setFlash('depp_prioritising_message', $message);
         $this->redirect($this->getRequest()->getReferer());
     } catch (Exception $e) {
         $this->setError($e->getMessage());
     }
 }
开发者ID:valerio-bozzolan,项目名称:openparlamento,代码行数:39,代码来源:actions.class.php


示例5: convertLogPriority

 /**
  * Converts the log priority into its string representation.
  *
  * @param sfEvent $event
  * @param array $logEntry
  *
  * @return array
  */
 public static function convertLogPriority(sfEvent $event, array $logEntry)
 {
     if (is_int($logEntry['priority'])) {
         $logEntry['priority'] = sfLogger::getPriorityName($logEntry['priority']);
     }
     return $logEntry;
 }
开发者ID:havvg,项目名称:sfMongoDBLoggerPlugin,代码行数:15,代码来源:sfMongoDBLoggerListener.class.php


示例6: execute

 public function execute($filterChain)
 {
     $filterChain->execute();
     $response = $this->getContext()->getResponse();
     $request = $this->getContext()->getRequest();
     $controller = $this->getContext()->getController();
     // don't highlight:
     // * for XHR requests
     // * if 304
     // * if not rendering to the client
     // * if HTTP headers only
     if ($request->isXmlHttpRequest() || strpos($response->getContentType(), 'html') === false || $response->getStatusCode() == 304 || $controller->getRenderMode() != sfView::RENDER_CLIENT || $response->isHeaderOnly()) {
         return;
     }
     $timer = sfTimerManager::getTimer('Highlight Filter');
     try {
         if (!$this->highlight()) {
             $this->removeNotice();
         }
     } catch (sfSolrHighlighterException $e) {
         sfLogger::getInstance()->err('{sfSolrHighlightFilter} silently ignoring exception: ' . $e->getMessage());
         if ($this->testMode) {
             $timer->addTime();
             throw $e;
         }
     } catch (Exception $e) {
         $timer->addTime();
         throw $e;
     }
     $timer->addTime();
 }
开发者ID:valerio-bozzolan,项目名称:openparlamento,代码行数:31,代码来源:sfSolrHighlightFilter.class.php


示例7: signIn

 /**
  * uses information in the $xml_user SimpleXML object to give attributes and permissions to the user
  * also sets remember or sso cookie, depending on the value of the $remember parameter
  *
  * @param $xml_user - SimpleXMLObject
  * @param $cookie - boolean
  * @return void
  * @author Guglielmo Celata
  **/
 public function signIn($xml_user, $cookie = 'none')
 {
     // legge i permission dall'xml user
     $permissions = array();
     foreach ($xml_user->permissions->permission as $perm) {
         $permissions[] = $perm;
     }
     $this->setAttribute('subscriber_id', (string) $xml_user->subscriber_id, 'subscriber');
     $this->setAuthenticated(true);
     $expiration_age = sfConfig::get('app_cookies_remember_key_expiration_age', 15 * 24 * 3600);
     $cookie_remember_name = sfConfig::get('app_cookies_remember_name', 'sfRemember');
     $cookie_sso_name = sfConfig::get('app_cookies_sso_name', 'sfSSO');
     $cookie_path = sfConfig::get('app_cookies_path', '/');
     $cookie_domain = sfConfig::get('app_cookies_domain', 'sfDomain.it');
     // if cookie argument was set to 'remember' or 'session' a cookie is set
     // this MUST only happen with signin invoked from validator (form)
     sfContext::getInstance()->getLogger()->info('xxx - signIn - cookie: ' . $cookie);
     if ($cookie == 'remember') {
         //save the key to the remember cookie
         sfContext::getInstance()->getLogger()->info('xxx - setting remember cookie: ' . (string) $xml_user->remember_key);
         sfContext::getInstance()->getResponse()->setCookie($cookie_remember_name, (string) $xml_user->remember_key, time() + $expiration_age, $cookie_path, $cookie_domain);
     } elseif ($cookie == 'session') {
         // save the hash to the sso cookie
         sfContext::getInstance()->getLogger()->info('xxx - setting sso cookie: ' . (string) $xml_user->remember_key);
         sfContext::getInstance()->getResponse()->setCookie($cookie_sso_name, (string) $xml_user->remember_key, 0, $cookie_path, $cookie_domain);
     }
     $this->addCredential('subscriber');
     if (in_array('moderatore', $permissions)) {
         $this->addCredential('moderator');
     }
     if (in_array('amministratore', $permissions)) {
         $this->addCredential('moderator');
         $this->addCredential('administrator');
     }
     // add all credentials from groups and direct permissions
     foreach ($permissions as $perm) {
         $this->addCredential((string) $perm);
     }
     $this->setAttribute('name', (string) $xml_user->name, 'subscriber');
     $this->setAttribute('firstname', (string) $xml_user->firstname, 'subscriber');
     $this->setAttribute('hash', (string) $xml_user->hash, 'subscriber');
     // read the last_login ts from the xml (it comes from the DB)
     $this->setAttribute('last_login', (string) $xml_user->last_login, 'subscriber');
     // store the new last_login ts (now) in the DB
     $remote_guard_host = sfConfig::get('sf_remote_guard_host', 'op_accesso.openpolis.it');
     $script = str_replace('fe', 'be', sfContext::getInstance()->getRequest()->getScriptName());
     if ($script == '/be.php') {
         $script = '/index.php';
     }
     $apikey = sfConfig::get('sf_internal_api_key', 'xxx');
     $last_login_url = sprintf("http://%s%s/setLastLogin/%s/%s/%s", $remote_guard_host, $script, $apikey, (string) $xml_user->hash, urlencode(date('Y-m-d H:i:s')));
     sfLogger::getInstance()->info('xxx: last_login_call: ' . $last_login_url);
     $xml = simplexml_load_file($last_login_url);
     if (!$xml->ok instanceof SimpleXMLElement) {
         sfLogger::getInstance()->info('xxx: error while setting last login: %s' . (string) $xml->error);
     }
 }
开发者ID:valerio-bozzolan,项目名称:openparlamento,代码行数:66,代码来源:sfRemoteGuardSecurityUser.class.php


示例8: getPreference

 public function getPreference($preference)
 {
     if ($item = $this->getAttribute("app_preference_{$preference}")) {
         return $item;
     }
     $item = sfConfig::get("app_preference_{$preference}");
     sfLogger::getInstance()->info("Sending default preference for app_preference_{$preference}={$item}");
     return $item;
 }
开发者ID:hoydaa,项目名称:snippets.hoydaa.org,代码行数:9,代码来源:myUser.class.php


示例9: getInstance

 /**
  * Returns the sfLogger instance.
  *
  * @return  object the sfLogger instance
  */
 public static function getInstance()
 {
     if (!sfLogger::$logger) {
         // the class exists
         $class = __CLASS__;
         sfLogger::$logger = new $class();
         sfLogger::$logger->initialize();
     }
     return sfLogger::$logger;
 }
开发者ID:taryono,项目名称:school,代码行数:15,代码来源:sfLogger.class.php


示例10: __construct

 /**
  * Class constructor.
  *
  * @param string The error message
  * @param int    The error code
  */
 public function __construct($message = null, $code = 0)
 {
     if ($this->getName() === null) {
         $this->setName('sfException');
     }
     parent::__construct($message, $code);
     if (sfConfig::get('sf_logging_enabled') && $this->getName() != 'sfStopException') {
         sfLogger::getInstance()->err('{' . $this->getName() . '} ' . $message);
     }
 }
开发者ID:taryono,项目名称:school,代码行数:16,代码来源:sfException.class.php


示例11: getLogger

 private static function getLogger()
 {
     if (!self::$logger) {
         if (class_exists('sfLogger')) {
             self::$logger = sfLogger::getInstance();
         } else {
             self::$logger = KalturaLog::getInstance();
         }
     }
     return self::$logger;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:11,代码来源:kLog.class.php


示例12: initialize

 /**
  * Initializes this logger.
  *
  * Available options:
  *
  * - loggers: Logger objects that extends sfLogger.
  *
  * @param  sfEventDispatcher $dispatcher  A sfEventDispatcher instance
  * @param  array             $options     An array of options.
  *
  * @return Boolean      true, if initialization completes successfully, otherwise false.
  */
 public function initialize(sfEventDispatcher $dispatcher, $options = array())
 {
     $this->dispatcher = $dispatcher;
     if (isset($options['loggers'])) {
         if (!is_array($options['loggers'])) {
             $options['loggers'] = array($options['loggers']);
         }
         $this->addLoggers($options['loggers']);
     }
     return parent::initialize($dispatcher, $options);
 }
开发者ID:Phennim,项目名称:symfony1,代码行数:23,代码来源:sfAggregateLogger.class.php


示例13: initialize

 /**
  * Initializes the cache.
  *
  * @param array An array of options
  * Available options:
  *  - database:                database name
  *  - automaticCleaningFactor: disable / tune automatic cleaning process (int)
  *
  */
 public function initialize($options = array())
 {
     if (isset($options['database'])) {
         $this->setDatabase($options['database']);
         unset($options['database']);
     }
     $availableOptions = array('automaticCleaningFactor');
     foreach ($options as $key => $value) {
         if (!in_array($key, $availableOptions) && sfConfig::get('sf_logging_enabled')) {
             sfLogger::getInstance()->err(sprintf('sfSQLiteCache cannot take "%s" as an option', $key));
         }
         $this->{$key} = $value;
     }
 }
开发者ID:Daniel-Marynicz,项目名称:symfony1-legacy,代码行数:23,代码来源:sfSQLiteCache.class.php


示例14: depp_voter

/**
 * Return the HTML code for an unordered list showing opinions that can be voted
 * If the user has already voted, then a message appears
 * 
 * @param  BaseObject  $object   Propel object instance to vote
 * @param  string      $domid    unique css identifier for the block (div) containing the voter tool
 * @param  string      $message  a message string to be displayed in the voting-message block
 * @param  array       $options  Array of HTML options to apply on the HTML list
 * @return string
 **/
function depp_voter($object, $domid = 'depp-voter-block', $message = '', $options = array())
{
    if (is_null($object)) {
        sfLogger::getInstance()->debug('A NULL object cannot be voted');
        return '';
    }
    $user_id = deppPropelActAsVotableBehaviorToolkit::getUserId();
    // anonymous votes
    if ((is_null($user_id) || $user_id == '') && !$object->allowsAnonymousVoting()) {
        return __('Anonymous voting is not allowed') . ", " . __('please') . " " . link_to('login', '/login');
    }
    try {
        $voting_range = $object->getVotingRange();
        $options = _parse_attributes($options);
        if (!isset($options['id'])) {
            $options = array_merge($options, array('id' => 'voting-items'));
        }
        if ($object instanceof sfOutputEscaperObjectDecorator) {
            $object_class = get_class($object->getRawValue());
        } else {
            $object_class = get_class($object);
        }
        $object_id = $object->getReferenceKey();
        $token = deppPropelActAsVotableBehaviorToolkit::addTokenToSession($object_class, $object_id);
        // already voted
        if ($object->hasBeenVotedByUser($user_id)) {
            $message .= "&nbsp;" . link_to_remote(__('Take your vote back'), array('url' => sprintf('deppVoting/unvote?domid=%s&token=%s', $domid, $token), 'update' => $domid, 'script' => true, 'complete' => visual_effect('appear', $domid) . visual_effect('highlight', $domid)));
        }
        $list_content = '';
        for ($i = -1 * $voting_range; $i <= $voting_range; $i++) {
            if ($i == 0 && !$object->allowsNeutralPosition()) {
                continue;
            }
            $text = sprintf("[%d]", $i);
            $label = sprintf(__('Vote %d!'), $i);
            if ($object->hasBeenVotedByUser($user_id) && $object->getUserVoting($user_id) == $i) {
                $list_content .= content_tag('li', $text);
            } else {
                $list_content .= '  <li>' . link_to_remote($text, array('url' => sprintf('deppVoting/vote?domid=%s&token=%s&voting=%d', $domid, $token, $i), 'update' => $domid, 'script' => true, 'complete' => visual_effect('appear', $domid) . visual_effect('highlight', $domid)), array('title' => $label)) . '</li>';
            }
        }
        $results = get_component('deppVoting', 'votingDetails', array('object' => $object));
        return content_tag('ul', $list_content, $options) . content_tag('div', $message, array('id' => 'voting-message')) . content_tag('div', $results, array('id' => 'voting-results'));
    } catch (Exception $e) {
        sfLogger::getInstance()->err('Exception catched from sf_rater helper: ' . $e->getMessage());
    }
}
开发者ID:valerio-bozzolan,项目名称:openparlamento,代码行数:57,代码来源:deppVotingHelper.php


示例15: initialize

 protected function initialize()
 {
     $this->logger = sfLogger::getInstance();
     if (sfConfig::get('sf_logging_enabled')) {
         $this->logger->info('{sfContext} initialization');
     }
     if (sfConfig::get('sf_use_database')) {
         // setup our database connections
         $this->databaseManager = new sfDatabaseManager();
         $this->databaseManager->initialize();
     }
     // create a new action stack
     $this->actionStack = new sfActionStack();
     // include the factories configuration
     require sfConfigCache::getInstance()->checkConfig(sfConfig::get('sf_app_config_dir_name') . '/factories.yml');
     // register our shutdown function
     register_shutdown_function(array($this, 'shutdown'));
 }
开发者ID:Daniel-Marynicz,项目名称:symfony1-legacy,代码行数:18,代码来源:sfContext.class.php


示例16: execute

 /**
  * Action permettant de récupérer l'arbre des jeux de données.
  *
  * @param sfWebRequest $request
  */
 public function execute($request)
 {
     $this->logger = sfContext::getInstance()->getLogger();
     $this->logger->info("----------------------------------------------------------");
     $this->logger->info("---   DEBUT RECUPERATION ARBRE DATA SET");
     $this->getResponse()->setContentType('application/json');
     $this->setLayout(false);
     try {
         $this->getUser()->signIn($this->user, true);
         /** @var EiNodeTable $tableEiNode */
         $tableEiNode = Doctrine_Core::getTable("EiNode");
         // Récupération du noeud du scénario.
         $node = $this->scenario->getEiNode();
         // Recherche de la structure des fichiers des jeux de données.
         $rootFolder = Doctrine_Core::getTable('EiNode')->findOneByRootIdAndType($node->getId(), 'EiDataSetFolder');
         // On récupère ensuite la structure brute des dossiers.
         $structureBrute = $tableEiNode->getStructureDataSets($rootFolder);
         $structureBrute["root"]["name"] = "Root";
         // Puis on la retravaille.
         //            $structure = $this->getReorderedStructure(array(), $structureBrute);
         $response = json_encode(array("tree" => array($structureBrute)));
     } catch (Exception $e) {
         $response = array();
     }
     return $this->renderText($response);
 }
开发者ID:lendji4000,项目名称:compose,代码行数:31,代码来源:getDataSetTreeAction.class.php


示例17: save

 /**
  * Surcharge de la méthode save permettant de mettre à jour la table EiNode.
  *
  * @param Doctrine_Connection $conn
  */
 public function save(Doctrine_Connection $conn = null)
 {
     $this->logger = sfContext::getInstance()->getLogger();
     $this->logger->info("----------------------------------------------------------");
     $this->logger->info("---   DEBUT SAUVEGARDE TEMPLATE");
     $isNew = $this->isNew();
     /** @var EiNode $ei_node */
     if ($isNew) {
         if ($this->getEiNode() == null) {
             $ei_node = new EiNode();
             $this->setEiNode($ei_node);
         } else {
             $ei_node = $this->getEiNode();
         }
     }
     parent::save($conn);
     if ($isNew) {
         $ei_node->setType(EiNode::$TYPE_DATASET_TEMPLATE);
         $ei_node->setObjId($this->getId());
         $ei_node->setName($this->getName());
         $ei_node->save($conn);
     } elseif (!$isNew) {
         $ei_node = $this->getEiNode();
         $ei_node->setName($this->getName());
         $ei_node->save($conn);
     }
     $this->updateCampaignGraphDataSet($conn);
     $this->logger->info("----------------------------------------------------------");
     $this->logger->info("---   FIN SAUVEGARDE TEMPLATE");
 }
开发者ID:lendji4000,项目名称:compose,代码行数:35,代码来源:EiDataSetTemplate.class.php


示例18: initialize

 public function initialize(sfEventDispatcher $dispatcher, $options = array())
 {
     parent::initialize($dispatcher, $options);
     $ops = array_merge($this->defaults, $options);
     $this->r = new Redis($ops['host'], $ops['port']);
     $this->maxlogs = $ops['maxlogs'];
 }
开发者ID:videlalvaro,项目名称:avRedisLoggerPlugin,代码行数:7,代码来源:RedisLogger.class.php


示例19: save

 /**
  * @param Doctrine_Connection $conn
  */
 public function save(Doctrine_Connection $conn = null)
 {
     $this->logger = sfContext::getInstance()->getLogger();
     $this->logger->info("----------------------------------------------------------");
     $this->logger->info("---   DEBUT SAUVEGARDE DATA SET");
     $isNew = $this->isNew();
     if ($isNew) {
         if ($this->getEiNode() == null) {
             $ei_node = new EiNode();
             $this->setEiNode($ei_node);
         } else {
             $ei_node = $this->getEiNode();
         }
     }
     parent::save($conn);
     if ($isNew) {
         $ei_node->setType('EiDataSet');
         $ei_node->setObjId($this->getId());
         $ei_node->setName($this->getName());
         if ($this->getEiDataSetTemplate() != null) {
             $ei_node->setRootId($this->getEiDataSetTemplate()->getEiNode()->getId());
         }
         $ei_node->save($conn);
     } else {
         $ei_node = $this->getEiNode();
         $ei_node->setName($this->getName());
         $ei_node->save($conn);
     }
     $this->logger->info("----------------------------------------------------------");
     $this->logger->info("---   FIN SAUVEGARDE DATA SET");
 }
开发者ID:lendji4000,项目名称:compose,代码行数:34,代码来源:EiDataSet.class.php


示例20: initialize

 public function initialize(sfEventDispatcher $dispatcher, $options = array())
 {
     if (isset($options['ident'])) {
         $this->ident = $options['ident'];
     }
     openlog($this->ident, LOG_PID | LOG_PERROR, LOG_KERN);
     return parent::initialize($dispatcher, $options);
 }
开发者ID:ketheriel,项目名称:ETVA,代码行数:8,代码来源:sfSyslogLogger.class.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP sfMailer类代码示例发布时间:2022-05-23
下一篇:
PHP sfLoader类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap