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


PHP InnomaticContainer::getLogger方法代码示例

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


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

示例1: __construct

 public function __construct(\Innomatic\Dataaccess\DataAccess $rootDA, \Innomatic\Dataaccess\DataAccess $domainDA, $summaries = '')
 {
     $this->container = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer');
     $this->log = $this->container->getLogger();
     $this->rootDA = $rootDA;
     $this->domainDA = $domainDA;
     if (is_array($summaries)) {
         $this->summary = $summaries;
     } else {
         $tmpInnoworkcore = InnoworkCore::instance('\\Innowork\\Core\\InnoworkCore', $this->rootDA, $this->domainDA);
         $this->summary = $tmpInnoworkcore->GetSummaries();
     }
 }
开发者ID:innomatic,项目名称:innowork-core,代码行数:13,代码来源:InnoworkKnowledgeBase.php

示例2: render

 public function render()
 {
     if (!$this->mBuilt) {
         $this->Build();
     }
     if ($this->mBuilt) {
         \Innomatic\Webapp\WebAppContainer::instance('\\Innomatic\\Webapp\\WebAppContainer')->getProcessor()->getResponse()->addHeader('P3P', 'CP="CUR ADM OUR NOR STA NID"');
         echo $this->mLayout;
         return true;
     } else {
         $log = $this->container->getLogger();
         $log->logEvent('innomatic.wui.wui.render', 'Unable to render wui', \Innomatic\Logging\Logger::ERROR);
         throw new \Innomatic\Wui\WuiException(\Innomatic\Wui\WuiException::UNABLE_TO_RENDER);
     }
     return false;
 }
开发者ID:innomatic,项目名称:innomatic-legacy,代码行数:16,代码来源:Wui.php

示例3: update

 /**
  * Updates the component.
  *
  * @param integer $updatemode Update mode (Application::UPDATE_MODE_* constants)
  * @param array $params Parameters in the component definition
  * @param string $domainprescript Full path of an optional PHP script to be executed
  * before proceeding with the component update
  * @param string $domainpostscript Full path of an optional PHP script to be executed
  * after proceeding with the component update
  * @access public
  * @return void
  */
 public function update($updatemode, $params, $domainprescript = '', $domainpostscript = '')
 {
     $result = false;
     if ($this->getIsDomain() or isset($params['override']) and $params['override'] == self::OVERRIDE_DOMAIN) {
         $domainsquery = $this->rootda->execute('SELECT * FROM domains');
         $modquery = $this->rootda->execute('SELECT id FROM applications WHERE appid=' . $this->rootda->formatText($this->appname));
         $appid = $modquery->getFields('id');
     }
     switch ($updatemode) {
         case Application::UPDATE_MODE_ADD:
             if ($this->install($params)) {
                 $result = true;
                 if ($this->getIsDomain() or isset($params['override']) and $params['override'] == self::OVERRIDE_DOMAIN) {
                     if ($domainsquery->getNumberRows() > 0) {
                         while (!$domainsquery->eof) {
                             $domaindata = $domainsquery->getFields();
                             // Check if the application is enabled for the current iteration domain
                             $actquery = $this->rootda->execute('SELECT * FROM applications_enabled WHERE domainid=' . (int) $domaindata['id'] . ' AND applicationid=' . (int) $appid);
                             if ($actquery->getNumberRows()) {
                                 // Enable the component for the current iteration domain
                                 if (!$this->enable($domainsquery->getFields('id'), $params)) {
                                     $result = false;
                                 }
                             }
                             $actquery->free();
                             $domainsquery->moveNext();
                         }
                     }
                 }
             }
             break;
         case Application::UPDATE_MODE_REMOVE:
             // Disables the component for each domain, before uninstalling it
             if ($this->getIsDomain() or isset($params['override']) and $params['override'] == self::OVERRIDE_DOMAIN) {
                 if ($domainsquery->getNumberRows() > 0) {
                     while (!$domainsquery->eof) {
                         $domaindata = $domainsquery->getFields();
                         $actquery = $this->rootda->execute('SELECT * FROM applications_enabled WHERE domainid=' . (int) $domaindata['id'] . ' AND applicationid=' . (int) $appid);
                         if ($actquery->getNumberRows()) {
                             // Disable the component for the current iteration domain
                             if (!$this->disable($domainsquery->getFields('id'), $params)) {
                                 $result = false;
                             }
                         }
                         $actquery->free();
                         $domainsquery->moveNext();
                     }
                 }
             }
             if ($this->uninstall($params)) {
                 $result = true;
             }
             break;
         case Application::UPDATE_MODE_CHANGE:
             if ($this->doUpdateAction($params)) {
                 $result = true;
                 if ($this->getIsDomain() or isset($params['override']) and $params['override'] == self::OVERRIDE_DOMAIN) {
                     if ($domainsquery->getNumberRows() > 0) {
                         while (!$domainsquery->eof) {
                             $domaindata = $domainsquery->getFields();
                             $actquery = $this->rootda->execute('SELECT * FROM applications_enabled WHERE domainid=' . (int) $domaindata['id'] . ' AND applicationid=' . (int) $appid);
                             if ($actquery->getNumberRows()) {
                                 $this->container->startDomain($domaindata['domainid']);
                                 $this->domainda = $this->container->getCurrentDomain()->getDataAccess();
                                 if (strlen($domainprescript) and file_exists($domainprescript)) {
                                     include $domainprescript;
                                 }
                                 if (!$this->doUpdateDomainAction($domainsquery->getFields('id'), $params)) {
                                     $result = false;
                                 }
                                 if (strlen($domainpostscript) and file_exists($domainpostscript)) {
                                     include $domainpostscript;
                                 }
                                 $this->container->stopDomain();
                             }
                             $actquery->free();
                             $domainsquery->moveNext();
                         }
                     }
                 }
             }
             break;
         default:
             $log = $this->container->getLogger();
             $log->logEvent('innomatic.applications.applicationcomponent.update', 'Invalid update mode', \Innomatic\Logging\Logger::ERROR);
             break;
     }
     if ($this->getIsDomain() or isset($params['override']) and $params['override'] == self::OVERRIDE_DOMAIN) {
//.........这里部分代码省略.........
开发者ID:kchizi,项目名称:innomatic-legacy,代码行数:101,代码来源:ApplicationComponent.php

示例4: __construct

 /**
  * Item constructor.
  *
  * @param \Innomatic\Dataaccess\DataAccess $rrootDb Innomatic root data
  * access.
  * @param \Innomatic\Dataaccess\DataAccess $rdomainDA Domain data access.
  * @param string $itemType Item type name
  * @param int $itemId Item identifier number
  * @access public
  * @return void
  */
 public function __construct(\Innomatic\Dataaccess\DataAccess $rrootDb, \Innomatic\Dataaccess\DataAccess $rdomainDA, $itemType, $itemId = 0)
 {
     $this->container = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer');
     require_once 'innowork/core/InnoworkAcl.php';
     // Item identification (type + id)
     $this->mItemType = $itemType;
     $this->mItemId = $itemId;
     // DataAccess
     $this->mrRootDb = $rrootDb;
     $this->mrDomainDA = $rdomainDA;
     // Item keys
     $this->mKeys['id'] = 'integer';
     // Trash support
     if ($this->mNoTrash == false) {
         $this->mKeys['trashed'] = 'boolean';
     }
     // Redundant to the default value but safe
     if (!strlen($this->mSearchOrderBy)) {
         $this->mSearchOrderBy = 'id';
     }
     // Search result keys
     $this->mSearchResultKeys[] = 'id';
     $this->mSearchResultKeys[] = 'ownerid';
     if ($this->mNoTrash == false) {
         // If the item type supports trash action, add trashed field to the
         // search result keys
         $this->mSearchResultKeys[] = 'trashed';
     }
     // If this item doesn't support ACLs and there is no defined default
     // creation ACL, set the item as public.
     if ($this->mNoAcl and !isset($this->_mCreationAcl)) {
         $this->_mCreationAcl = InnoworkAcl::TYPE_PUBLIC;
     }
     // Check if the item id is valid
     if ($this->mItemId) {
         // Extract parent id field, if supported
         $parentField = '';
         if (strlen($this->mParentType) > 0 && strlen($this->mParentIdField) > 0) {
             $parentField = ", {$this->mParentIdField} ";
         }
         $check_query = $this->mrDomainDA->execute("SELECT ownerid {$parentField} FROM " . $this->mTable . ' WHERE id=' . $this->mItemId);
         if ($check_query->getNumberRows()) {
             // Get owner id
             //
             $this->mOwnerId = $check_query->getFields('ownerid');
             // Extract parent id, if supported
             if (strlen($this->mParentType) > 0 && strlen($this->mParentIdField) > 0) {
                 $this->mParentId = $check_query->getFields($this->mParentIdField);
             }
         } else {
             $log = $this->container->getLogger();
             $log->logEvent('innoworkcore.innoworkcore.innoworkitem.innoworkitem', 'Invalid item id ' . $this->mItemId . ' from ' . $this->mItemType . ' item type handler', \Innomatic\Logging\Logger::WARNING);
             $this->mItemId = 0;
         }
         $check_query->Free();
     }
     // Item ACL
     if (strlen($this->mParentType) and $this->mParentId > 0) {
         // Gets the ACL from the parent object
         $core = InnoworkCore::instance('\\Innowork\\Core\\InnoworkCore', $this->mrRootDb, $this->mrDomainDA);
         $summaries = $core->getSummaries();
         unset($core);
         $class_name = $summaries[$this->mParentType]['classname'];
         if (class_exists($class_name)) {
             $tmp_class = new $class_name($this->mrRootDb, $this->mrDomainDA, $this->mParentId);
             $this->mAcl =& $tmp_class->mAcl;
         }
     } else {
         // Gets its own ACL
         $this->mAcl = new InnoworkAcl($this->mrRootDb, $this->mrDomainDA, $this->mItemType, $this->mItemId, $this->mOwnerId);
     }
     // Generic fields
     $this->mGenericFields = array('projectid' => '', 'customerid' => '', 'title' => '', 'content' => '', 'binarycontent' => '', 'date' => '', 'spenttime' => '', 'cost' => '');
     // Item folder in filesystem
     if ($itemId != 0) {
         $this->mFsBasePath = $this->container->getCurrentDomain()->getHome() . 'files/' . $this->getItemTypePlural() . '/' . $this->mItemId . '/';
     }
 }
开发者ID:innomatic,项目名称:innowork-core,代码行数:89,代码来源:InnoworkItem.php


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