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


PHP Wekit::loadDaoFromMap方法代码示例

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


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

示例1: _getDao

 protected function _getDao($fetchmode = self::FETCH_MAIN)
 {
     return Wekit::loadDaoFromMap($fetchmode, $this->_getDaoMap(), 'PwTorrentHistoryDao');
 }
开发者ID:LastRitter,项目名称:WindPT,代码行数:4,代码来源:PwTorrentHistory.php

示例2: _getThreadDao

 protected function _getThreadDao($fetchmode = self::FETCH_MAIN)
 {
     return Wekit::loadDaoFromMap($fetchmode, $this->_getDaoMap(), 'PwThread');
 }
开发者ID:YoursBoss,项目名称:nextwind,代码行数:4,代码来源:PwThread.php

示例3: _getDao

 /**
  * 根据提供的获取类型获取对应的dao类
  *
  * @param int $type 装饰组合值
  * @return WindidUserInterface
  */
 private function _getDao($type = self::FETCH_MAIN)
 {
     if (!($type & self::FETCH_ALL)) {
         return Wekit::loadDao('WSRV:user.dao.WindidUserDefaultDao');
     }
     $maps = array(self::FETCH_MAIN => 'WSRV:user.dao.WindidUserDao', self::FETCH_DATA => 'WSRV:user.dao.WindidUserDataDao', self::FETCH_INFO => 'WSRV:user.dao.WindidUserInfoDao');
     return Wekit::loadDaoFromMap($type, $maps, 'WindidUser');
 }
开发者ID:ccq18,项目名称:EduSoho,代码行数:14,代码来源:WindidUser.php

示例4: _getDao

 /** 
  * 获得用户中心对像
  * 
  * @return PwBaseDao
  */
 protected function _getDao($type = self::FETCH_MAIN)
 {
     $daoMap = array();
     $daoMap[self::FETCH_MAIN] = 'user.dao.PwUserDao';
     $daoMap[self::FETCH_DATA] = 'user.dao.PwUserDataDao';
     $daoMap[self::FETCH_INFO] = 'user.dao.PwUserInfoDao';
     return Wekit::loadDaoFromMap($type, $daoMap, 'PwUser');
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:13,代码来源:PwUser.php

示例5: _writeFounder

 /**
  * 创建创始人
  *
  * @param string $manager
  * @param string $manager_pwd
  * @param string $manager_email
  * @return PwError
  */
 private function _writeFounder($manager, $manager_pwd, $manager_email)
 {
     Wekit::C()->reload('windid');
     Wind::import('SRV:user.dm.PwUserInfoDm');
     $data = array($manager => md5($manager_pwd));
     WindFile::savePhpData($this->_getFounderFile(), $data);
     //TODO 创始人添加:用户的配置信息先更新。添加完之后再更新回 开始
     $config = new PwConfigSet('register');
     $config->set('security.username.max', 15)->set('security.ban.username', '')->set('security.username.min', 1)->set('security.password.max', 25)->set('security.password.min', 1)->flush();
     Wind::import('WINDID:service.config.srv.WindidConfigSet');
     $windidConfig = new WindidConfigSet('reg');
     $windidConfig->set('security.ban.username', '')->set('security.password.max', 25)->set('security.password.min', 1)->set('security.username.max', 15)->set('security.username.min', 1)->flush();
     Wekit::C()->reload('register');
     WindidApi::C()->reload('reg');
     //TODO结束
     $userDm = new PwUserInfoDm();
     $userDm->setUsername($manager)->setPassword($manager_pwd)->setEmail($manager_email)->setGroupid(3)->setRegdate(Pw::getTime())->setLastvisit(Pw::getTime())->setRegip(Wind::getApp()->getRequest()->getClientIp())->setGroups(array('3' => '0'));
     //特殊操作  gao.wanggao
     if (true !== ($result = $userDm->beforeAdd())) {
         $this->showError($result->getError());
     }
     if (($uid = Wekit::load('WSRV:user.WindidUser')->addUser($userDm->dm)) < 1) {
         $this->showError('WINDID:code.' . $uid);
     }
     $userDm->setUid($uid);
     Wind::import('SRV:user.PwUser');
     $daoMap = array();
     $daoMap[PwUser::FETCH_MAIN] = 'user.dao.PwUserDao';
     $daoMap[PwUser::FETCH_DATA] = 'user.dao.PwUserDataDao';
     $daoMap[PwUser::FETCH_INFO] = 'user.dao.PwUserInfoDao';
     Wekit::loadDaoFromMap(PwUser::FETCH_ALL, $daoMap, 'PwUser')->addUser($userDm->getSetData());
     //特殊操作
     //$uid = Wekit::load('user.PwUser')->addUser($userDm);
     //TODO 创始人添加完成:恢复默认数据:开始
     $config = new PwConfigSet('register');
     $config->set('security.username.max', 15)->set('security.ban.username', '创始人,管理员,版主,斑竹,admin')->set('security.username.min', 3)->set('security.password.max', 15)->set('security.password.min', 6)->flush();
     $windidConfig = new WindidConfigSet('reg');
     $windidConfig->set('security.ban.username', '创始人,管理员,版主,斑竹,admin')->set('security.password.max', 15)->set('security.password.min', 6)->set('security.username.max', 15)->set('security.username.min', 3)->flush();
     //TODO 结束
     if ($uid instanceof PwError) {
         $this->showError($uid->getError());
     }
     Wekit::load('user.PwUserBelong')->update($uid, array(3 => 0));
     //特殊操作  gao.wanggao
     $this->_defaultAvatar($uid);
     $this->_defaultAvatar(0);
     //特殊操作
     //Wekit::load('user.srv.PwUserService')->restoreDefualtAvatar($uid);//用户的默认头像需要设置
     //Wekit::load('user.srv.PwUserService')->restoreDefualtAvatar(0);//游客的默认头像需要设置
     //站点统计信息
     Wind::import('SRV:site.dm.PwBbsinfoDm');
     $dm = new PwBbsinfoDm();
     $dm->setNewmember($manager)->addTotalmember(1);
     Wekit::load('site.PwBbsinfo')->updateInfo($dm);
     return $uid;
 }
开发者ID:sanzhumu,项目名称:nextwind,代码行数:64,代码来源:IndexController.php


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