本文整理汇总了PHP中CodendiDataAccess::instance方法的典型用法代码示例。如果您正苦于以下问题:PHP CodendiDataAccess::instance方法的具体用法?PHP CodendiDataAccess::instance怎么用?PHP CodendiDataAccess::instance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CodendiDataAccess
的用法示例。
在下文中一共展示了CodendiDataAccess::instance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDynamicUGroupsMembers
/**
* Get Dynamic ugroups members
*
* @param Integer $ugroupId Id of the uGroup
* @param Integer $groupId Id of the project
*
* @return DataAccessResult
*/
public function getDynamicUGroupsMembers($ugroupId, $groupId)
{
if ($ugroupId <= 100) {
$dao = new UGroupUserDao(CodendiDataAccess::instance());
return $dao->searchUserByDynamicUGroupId($ugroupId, $groupId);
}
}
示例2: getDao
function getDao()
{
if (!isset($this->_dao)) {
$this->_dao = new ForumML_MessageDao(CodendiDataAccess::instance());
}
return $this->_dao;
}
示例3: getUserDao
/**
*
* Returns an instance of UserDao
*
* @return UserDao
*/
function getUserDao()
{
if (!$this->userDao) {
$this->userDao = new UserDao(CodendiDataAccess::instance());
}
return $this->userDao;
}
示例4: CodendiUpgrade
function CodendiUpgrade()
{
$this->_upgradeError = null;
$this->setEnvironment();
$da =& CodendiDataAccess::instance();
parent::DataAccessObject($da);
}
示例5: NotificationsDao
function &_getDao()
{
if (!$this->dao) {
$this->dao = new NotificationsDao(CodendiDataAccess::instance());
}
return $this->dao;
}
示例6: listMessages
function listMessages()
{
include_once 'MaillogDao.class.php';
$dao = new MaillogDao(CodendiDataAccess::instance());
$dar = $dao->getAllMessages();
$nb = $dao->getNbMessages();
echo "<h1>List of emails sent by " . $GLOBALS['sys_name'] . "</h1>\n";
echo "<div style=\"text-align: center;\">Nb messages: " . $nb . "</div>\n";
echo "<form name=\"maillog\" method=\"post\" action=\"?\">\n";
echo "<p>\n";
echo "<input type=\"submit\" name=\"delete\" value=\"Delete\" />\n";
echo "</p>\n";
$hp = Codendi_HTMLPurifier::instance();
while ($dar->valid()) {
$row = $dar->current();
$dar2 = $dao->getAllHeaders($row['id_message']);
echo '<table class="table table-bordered table-striped"><tbody>';
while ($dar2->valid()) {
$row2 = $dar2->current();
echo "<tr><th>" . $hp->purify($row2['name']) . ":</th><td>" . $hp->purify($row2['value']) . "</td></tr>";
$dar2->next();
}
$input = preg_replace("/=\r?\n/", '', $row['html_body']);
$input = preg_replace('/=([a-f0-9]{2})/ie', "chr(hexdec('\\1'))", $input);
echo '<tr><th></th><td>';
var_dump(substr($input, 0, 400));
echo '</td></tr>';
echo "</table>\n";
$dar->next();
}
echo "</form>";
}
示例7: instance
/**
* The manager is a singleton
*
* @return PermissionsManager
*/
public static function instance()
{
if (!self::$_permissionmanager_instance) {
self::$_permissionmanager_instance = new PermissionsManager(new PermissionsDAO(CodendiDataAccess::instance()));
}
return self::$_permissionmanager_instance;
}
示例8: __construct
public function __construct()
{
parent::__construct();
$this->initDb();
$this->disk_usage_dao = new Statistics_DiskUsageDao(CodendiDataAccess::instance());
$this->disk_data_purger = new Statistics_DiskUsagePurger($this->disk_usage_dao);
}
示例9: _getDao
/**
* Obtain an instance of SvnNotificationDao
*
* @return SvnNotificationDao
*/
public function _getDao()
{
if (!isset($this->_dao)) {
$this->_dao = new SvnNotificationDao(CodendiDataAccess::instance());
}
return $this->_dao;
}
示例10: _getMailingListDao
protected function _getMailingListDao()
{
if (!$this->_mailinglistdao) {
$this->_mailinglistdao = new MailingListDao(CodendiDataAccess::instance());
}
return $this->_ugroupdao;
}
示例11: DocmanWatermark_MetadataValueDao
private function &_getWatermarkMetadataValueDao()
{
if (!$this->dao) {
$this->dao = new DocmanWatermark_MetadataValueDao(CodendiDataAccess::instance());
}
return $this->dao;
}
示例12: Docman_VersionDao
function &_getVersionDao()
{
if (!$this->dao) {
$this->dao =& new Docman_VersionDao(CodendiDataAccess::instance());
}
return $this->dao;
}
示例13: _getPriorityPluginHookDao
function _getPriorityPluginHookDao()
{
if (!is_a($this->priorityPluginHookDao, 'PriorityPluginHookDao')) {
$this->priorityPluginHookDao = new PriorityPluginHookDao(CodendiDataAccess::instance());
}
return $this->priorityPluginHookDao;
}
示例14: _getDao
function _getDao()
{
if (!$this->dao) {
$this->dao = new Docman_LogDao(CodendiDataAccess::instance());
}
return $this->dao;
}
示例15: _getDao
function _getDao()
{
if (!$this->dao) {
$this->dao = new SystemEventDao(CodendiDataAccess::instance());
}
return $this->dao;
}