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


PHP Domain::get方法代码示例

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


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

示例1: moveToClient

function moveToClient()
{
    global $gbl, $sgbl, $login, $ghtml;
    $login->loadAllObjects('ftpuser');
    $l = $login->getList('ftpuser');
    foreach ($l as $b) {
        if (csb($b->parent_clname, 'web-')) {
            list($parentclass, $parentname) = getParentNameAndClass($b->parent_clname);
            $d = new Domain(null, null, $parentname);
            $d->get();
            $b->parent_clname = $d->parent_clname;
            $w = $d->getObject('web');
            $b->directory = "{$w->docroot}/{$b->directory}";
            $b->directory = remove_extra_slash($b->directory);
            $b->setUpdateSubaction();
            $b->write();
        }
    }
    $login->loadAllObjects('mysqldb');
    $l = $login->getList('mysqldb');
    foreach ($l as $b) {
        if (csb($b->parent_clname, 'domain-')) {
            list($parentclass, $parentname) = getParentNameAndClass($b->parent_clname);
            $d = new Domain(null, null, $parentname);
            $d->get();
            $b->parent_clname = $d->parent_clname;
            $b->setUpdateSubaction();
            $b->write();
        }
    }
}
开发者ID:soar-team,项目名称:kloxo,代码行数:31,代码来源:fixmovetoclient.php

示例2: getDomainAlist

 function getDomainAlist(&$alist)
 {
     $rd = null;
     if ($this->default_domain && !$this->isDisabled('default_domain')) {
         $d = new Domain(null, null, $this->default_domain);
         $d->get();
         if ($d->dbaction === 'clean' && $d->parent_clname === $this->getClName()) {
             $rd = $d;
         }
     }
     if (!$rd) {
         $sq = new Sqlite(null, 'domain');
         $list = $sq->getRowsWhere("parent_clname = '{$this->getClName()}'", array('nname'));
         if ($list) {
             $list = get_namelist_from_arraylist($list);
             $dname = getFirstFromList($list);
             $d = new Domain(null, null, $dname);
             $d->get();
             $rd = $d;
         }
     }
     if (!$rd) {
         return;
     }
     $this->getAlistFromChild($rd, $alist);
     try {
         $m = $this->getFromList('mailaccount', "postmaster@{$rd->nname}");
     } catch (exception $e) {
         return;
     }
     $alist['__title_mailaccount'] = "Mailaccount {$m->nname}";
     //$alist[] =   "a=addform&c=mailaccount";
     $malist = $m->createShowAlist($rslist);
     foreach ($malist as $k => $a) {
         if (csb($k, "__title")) {
             //$alist[$k] = $a;
         } else {
             if (is_string($a)) {
                 $alist[] = "j[class]=mailaccount&j[nname]={$m->nname}&{$a}";
             } else {
                 if (!csb($a->url, "http")) {
                     $a->url = "j[class]=mailaccount&j[nname]={$m->nname}&{$a->url}";
                 }
                 $alist[] = $a;
             }
         }
     }
 }
开发者ID:zseand,项目名称:kloxo,代码行数:48,代码来源:clientlib.php

示例3: function

 $di->set('db', function () use($config) {
     $db_config = $config->database[ENVIRONMENT];
     return new DbAdapter(array('host' => $db_config->dbhost, 'username' => $db_config->dbusername, 'password' => $db_config->dbpassword, 'dbname' => $db_config->dbname));
 }, true);
 /**
  * Start the session the first time some component request the session service
  */
 $di->set('cookies', function () use($config) {
     $cookies = new \Phalcon\Http\Response\Cookies();
     $cookies->useEncryption(true);
     return $cookies;
 }, true);
 $di->set('session', function () use($config) {
     $session = new Session(array('servers' => array(array('host' => $config->memcached[ENVIRONMENT]->host, 'port' => (int) $config->memcached->port, 'weight' => 1)), 'client' => array(\Memcached::OPT_HASH => \Memcached::HASH_MD5, \Memcached::OPT_PREFIX_KEY => $config->memcached->prefix, \Memcached::OPT_RECV_TIMEOUT => 1000, \Memcached::OPT_SEND_TIMEOUT => 1000, \Memcached::OPT_TCP_NODELAY => true, \Memcached::OPT_SERVER_FAILURE_LIMIT => 50, \Memcached::OPT_CONNECT_TIMEOUT => 500, \Memcached::OPT_RETRY_TIMEOUT => 300, \Memcached::OPT_DISTRIBUTION => \Memcached::DISTRIBUTION_CONSISTENT, \Memcached::OPT_REMOVE_FAILED_SERVERS => true, \Memcached::OPT_LIBKETAMA_COMPATIBLE => true), 'lifetime' => (int) $config->memcached->lifetime, 'prefix' => $config->memcached->prefix));
     if ($session->status() !== $session::SESSION_ACTIVE) {
         $domain = Domain::get();
         session_set_cookie_params((int) $config->memcached->lifetime, '/', '.' . $domain, (bool) $config->cookie->secure, (bool) $config->cookie->httponly);
         $session->start();
     }
     return $session;
 }, true);
 $di->set('csrf_session_bag', function () use($di) {
     $csrf_session_bag = new \Phalcon\Session\Bag('CSRF_SESSION_BAG');
     $csrf_session_bag->setDI($di);
     return $csrf_session_bag;
 }, true);
 $di->set('url', function () {
     return new \Phalcon\Mvc\Url();
 }, true);
 /**
  * Router
开发者ID:inno-v,项目名称:LinInLiao,代码行数:31,代码来源:index.php

示例4: fromName

 /**
  * Get a record given a name and a Domain instance.
  *
  * @param Rage4Api $api
  * @param string $name
  * @param Domain $domain
  * @param int|null $type
  * @return null|CreatedRecord
  */
 static function fromName(Rage4Api $api, $name, Domain $domain, $type = null)
 {
     return $domain->get($api)->get_record($api, $name, $type);
 }
开发者ID:splitice,项目名称:rage4-api-objective,代码行数:13,代码来源:Record.php

示例5: getDomain

 /**
  * Get a single domain of the project.
  *
  * @param string $name
  *
  * @return Domain|false
  */
 public function getDomain($name)
 {
     return Domain::get($name, $this->getLink('domains'), $this->client);
 }
开发者ID:CompanyOnTheWorld,项目名称:platformsh-client-php,代码行数:11,代码来源:Project.php


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