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


PHP CCache::inject方法代码示例

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


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

示例1: __construct

 public function __construct(&$db)
 {
     parent::__construct('#__community_config', 'name', $db);
     // Get cache object.
     $oCache = CCache::inject($this);
     // Remove all cache on configuration change.
     $oCache->addMethod(CCache::METHOD_STORE, CCache::ACTION_REMOVE, COMMUNITY_CACHE_TAG_ALL);
 }
开发者ID:Simarpreet05,项目名称:joomla,代码行数:8,代码来源:configuration.php

示例2: __construct

 /**
  * Constructor
  */
 public function __construct(&$db)
 {
     parent::__construct('#__community_events', 'id', $db);
     // Get cache object.
     $oCache = CCache::inject($this);
     // Remove video cache on every delete & store
     $oCache->addMethod(CCache::METHOD_DEL, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_EVENTS, COMMUNITY_CACHE_TAG_EVENTS_CAT));
     $oCache->addMethod(CCache::METHOD_STORE, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_EVENTS, COMMUNITY_CACHE_TAG_EVENTS_CAT));
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:12,代码来源:event.php

示例3: __construct

 /**
  * Constructor
  */
 public function __construct(&$db)
 {
     parent::__construct('#__community_groups_category', 'id', $db);
     // Get cache object.
     $oCache = CCache::inject($this);
     // Remove groups category cache on every delete & store
     $oCache->addMethod(CCache::METHOD_DEL, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_GROUPS_CAT));
     $oCache->addMethod(CCache::METHOD_STORE, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_GROUPS_CAT));
 }
开发者ID:Simarpreet05,项目名称:joomla,代码行数:12,代码来源:groupcategory.php

示例4: CTableVideosCategory

 /**
  * Constructor
  */
 function CTableVideosCategory(&$db)
 {
     parent::__construct('#__community_videos_category', 'id', $db);
     // Get cache object.
     $oCache = CCache::inject($this);
     // Remove video cache on every delete & store
     $oCache->addMethod(CCache::METHOD_DEL, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_VIDEOS_CAT));
     $oCache->addMethod(CCache::METHOD_STORE, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_VIDEOS_CAT));
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:12,代码来源:videoscategory.php

示例5: __construct

 /**
  * Constructor
  */
 function __construct(&$db)
 {
     parent::__construct('#__community_photos_albums', 'id', $db);
     // Get cache object.
     $oCache = CCache::inject($this);
     // Remove photo cache on album delete.
     $oCache->addMethod(CCache::METHOD_DEL, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_PHOTOS));
     $oCache->addMethod(CCache::METHOD_STORE, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_ALBUMS));
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:12,代码来源:album.php

示例6: __construct

 function __construct()
 {
     // Get cache object.
     $oCache = CCache::inject($this);
     $oCache->addMethod('add', CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_ACTIVITIES));
     $oCache->addMethod('removeOneActivity', CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_ACTIVITIES));
     $oCache->addMethod('removeActivity', CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_ACTIVITIES));
     $oCache->addMethod('deleteActivity', CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_ACTIVITIES));
     parent::__construct();
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:10,代码来源:activities.php

示例7: __construct

 /**
  * Constructor
  */
 public function __construct(&$db)
 {
     parent::__construct('#__community_events', 'id', $db);
     // Get cache object.
     $oCache = CCache::inject($this);
     // Remove video cache on every delete & store
     $oCache->addMethod(CCache::METHOD_DEL, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_EVENTS, COMMUNITY_CACHE_TAG_EVENTS_CAT));
     $oCache->addMethod(CCache::METHOD_STORE, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_EVENTS, COMMUNITY_CACHE_TAG_EVENTS_CAT));
     // Set default timezone to current user's timezone
     $my = CFactory::getUser();
     $this->offset = $my->getParam('timezone');
 }
开发者ID:Simarpreet05,项目名称:joomla,代码行数:15,代码来源:event.php

示例8: CommunityModelGroups

 /**
  * Constructor
  */
 public function CommunityModelGroups()
 {
     parent::JCCModel();
     $mainframe = JFactory::getApplication();
     // Get pagination request variables
     $limit = $mainframe->getCfg('list_limit') == 0 ? 5 : $mainframe->getCfg('list_limit');
     $limitstart = JRequest::getVar('limitstart', 0, 'REQUEST');
     // In case limit has been changed, adjust it
     $limitstart = $limit != 0 ? floor($limitstart / $limit) * $limit : 0;
     $this->setState('limit', $limit);
     $this->setState('limitstart', $limitstart);
     // Get cache object.
     $oCache = CCache::inject($this);
     $oCache->addMethod('setImage', CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_GROUPS));
 }
开发者ID:Simarpreet05,项目名称:joomla,代码行数:18,代码来源:groups.php

示例9: __construct

 /**
  * Constructor
  */
 public function __construct(&$db)
 {
     parent::__construct('#__community_photos_albums', 'id', $db);
     // General Permission as initial permission
     $this->permissions = 0;
     $my = CFactory::getUser();
     $params = $my->getParams();
     if ($my->id > 0 && $params->get('privacyPhotoView')) {
         $this->permissions = $params->get('privacyPhotoView');
     }
     // Get cache object.
     $oCache = CCache::inject($this);
     // Remove photo cache on album delete.
     $oCache->addMethod(CCache::METHOD_DEL, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_PHOTOS));
     $oCache->addMethod(CCache::METHOD_STORE, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_ALBUMS));
 }
开发者ID:Simarpreet05,项目名称:joomla,代码行数:19,代码来源:album.php

示例10: CommunityModelVideos

 public function CommunityModelVideos()
 {
     parent::JCCModel();
     $id = JRequest::getVar('videoid', 0, '', 'int');
     $this->setId((int) $id);
     $mainframe = JFactory::getApplication();
     // Get the pagination request variables
     $limit = $mainframe->getCfg('list_limit') == 0 ? 5 : $mainframe->getCfg('list_limit');
     $limitstart = JRequest::getVar('limitstart', 0, 'REQUEST');
     // In case limit has been changed, adjust limitstart accordingly
     $limitstart = $limit != 0 ? floor($limitstart / $limit) * $limit : 0;
     $this->setState('limit', $limit);
     $this->setState('limitstart', $limitstart);
     // Get cache object.
     $oCache = CCache::inject($this);
     $oCache->addMethod('updatePermission', CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_VIDEOS));
 }
开发者ID:Simarpreet05,项目名称:joomla,代码行数:17,代码来源:videos.php

示例11: __construct

 /**
  * Constructor
  */
 public function __construct(&$db)
 {
     parent::__construct('#__community_videos', 'id', $db);
     require_once JPATH_ROOT . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'core.php';
     CFactory::load('helpers', 'videos');
     $config = CFactory::getConfig();
     $this->_size = $config->get('videosSize');
     $this->_width = CVideosHelper::getVideoSize('width');
     $this->_height = CVideosHelper::getVideoSize('height');
     $this->storage = 'file';
     $this->hits = 0;
     // Get cache object.
     $oCache = CCache::inject($this);
     // Remove video cache on every delete & store
     $oCache->addMethod(CCache::METHOD_DEL, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_VIDEOS, COMMUNITY_CACHE_TAG_VIDEOS_CAT));
     $oCache->addMethod(CCache::METHOD_STORE, CCache::ACTION_REMOVE, array(COMMUNITY_CACHE_TAG_VIDEOS, COMMUNITY_CACHE_TAG_VIDEOS_CAT));
     // load helpers
     CFactory::load('helpers', 'string');
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:22,代码来源:video.php


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