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


PHP Tinebase_Helper::arrayHash方法代码示例

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


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

示例1: testArrayHash

 public function testArrayHash()
 {
     $hash = Tinebase_Helper::arrayHash(array('foo' => 'bar'));
     $this->assertEquals('37b51d194a7513e45b56f6524f2d51f2', $hash);
     $hash = Tinebase_Helper::arrayHash(array('foo' => 'bar'), true);
     $this->assertEquals('3858f62230ac3c915f300c664312c63f', $hash);
 }
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:7,代码来源:HelperTests.php

示例2: getApplicationsHash

 /**
  * get hash of installed applications
  *
  * @param string $_sort optional the column name to sort by
  * @param string $_dir optional the sort direction can be ASC or DESC only
  * @param string $_filter optional search parameter
  * @param int $_limit optional how many applications to return
  * @param int $_start optional offset for applications
  * @return string
  */
 public function getApplicationsHash($_filter = NULL, $_sort = null, $_dir = 'ASC', $_start = NULL, $_limit = NULL)
 {
     $applications = $this->getApplications($_filter, $_sort, $_dir, $_start, $_limit);
     // create a hash of installed applications and their versions
     $applications = array_combine(Tinebase_Application::getInstance()->getApplications()->id, Tinebase_Application::getInstance()->getApplications()->version);
     ksort($applications);
     return Tinebase_Helper::arrayHash($applications, true);
 }
开发者ID:hernot,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:18,代码来源:Application.php

示例3: get

 /**
  * get by id
  *
  * @param string $_id
  * @param int $_containerId
  * @return Expressomail_Model_Account
  */
 public function get($_id, $_containerId = NULL)
 {
     Tinebase_Core::setupCache();
     $cache = Tinebase_Core::getCache();
     $cacheId = Tinebase_Helper::arrayHash(array(Tinebase_Core::getUser()->accountId, $_id));
     $record = $cache->load($cacheId);
     if ($record === FALSE) {
         $record = parent::get($_id, $_containerId);
         if ($record->user_id !== Tinebase_Core::getUser()->accountId) {
             $record = new Expressomail_Model_Account();
         }
         if ($record->type == Expressomail_Model_Account::TYPE_SYSTEM) {
             $this->_addSystemAccountConfigValues($record);
         }
         $cache->save($record, $cacheId, array('expressomailAccount'));
     }
     return $record;
 }
开发者ID:bitExpert,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:25,代码来源:Account.php


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