• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Domain类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了Domain类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: saveEmailAddress

 /**
  * @param string $emailAddress
  * @return mixed if true integer otherwise null
  */
 public static function saveEmailAddress($emailAddress)
 {
     $emailID = null;
     $parseEmail = explode('@', strtolower(trim($emailAddress)));
     if (count($parseEmail) == 2) {
         $domain = Domain::model()->findByAttributes(array('name' => $parseEmail[1]));
         if (!$domain) {
             $domain = new Domain();
             $domain->name = $parseEmail[1];
         }
         if ($domain->save()) {
             $email = new Email();
             $email->username = $parseEmail[0];
             $email->domainID = $domain->ID;
             if ($email->save()) {
                 $emailID = $email->ID;
             } else {
                 if ($domain->isNewRecord) {
                     Domain::model()->deleteByPk($domain->ID);
                 }
             }
         }
     }
     return $emailID;
 }
开发者ID:andryluthfi,项目名称:annotation-tools,代码行数:29,代码来源:Util.php


示例3: AddDomain

 public static function AddDomain($uDomain)
 {
     global $sUser;
     global $sDefaultIP;
     global $user_ssh;
     global $user_sftp;
     global $database;
     // Filter Domain
     $uDomain = preg_replace("/[^a-z0-9_ .-]/i", "", $uDomain);
     $uDomain = str_replace("www.", "", $uDomain);
     $sDomain = str_replace("http://", "", $uDomain);
     $result = $database->CachedQuery("SELECT * FROM domains WHERE `domain_name` = :Domain", array(':Domain' => $sDomain), 5);
     if (empty($result)) {
         // Validate path information
         $sUser->sRootDir = '/home/' . $sUser->sUsername . '/';
         $sValidate = new PathValidator($sUser->sRootDir . $sDomain);
         if ($sValidate->ValidatePath($sUser->sRootDir)) {
             // Connect to server
             if (!$user_ssh->login($sUser->sUsername, $_SESSION['password'])) {
                 exit('User Connection To Server Failed!');
             }
             if (!$user_sftp->login($sUser->sUsername, $_SESSION['password'])) {
                 exit('User Connection To Server Failed!');
             }
             // Create folders for domain & logs
             $sPublic = $sUser->sRootDir . $sDomain . "/public_html/";
             $sLogs = $sUser->sRootDir . "/logs/";
             $sCreateFolder = $user_ssh->exec("mkdir " . escapeshellarg($sUser->sRootDir . $sDomain) . ";mkdir " . escapeshellarg($sPublic) . ";mkdir " . escapeshellarg($sLogs) . ";");
             // Generate configs
             $sReplace = array("domain_name" => $sDomain, "username" => $sUser->sUsername);
             $sConfig = file_get_contents('./includes/configs/nginx.default.conf');
             foreach ($sReplace as $key => $value) {
                 $sConfig = str_replace($key, $value, $sConfig);
             }
             $sFileContent = $user_sftp->put('/etc/nginx/sites-enabled/' . $sDomain . '.conf', $sConfig);
             $sTestConfig = $user_ssh->exec("nginx -t -c /etc/nginx/nginx.conf");
             if (strpos($sTestConfig, 'failed') !== false) {
                 $sDeleteConfig = $user_ssh->exec("rm -rf /etc/nginx/sites-enabled/" . $sDomain . ".conf");
                 die("Seems to be a problem setting up the config.");
             }
             $sReload = $user_ssh->exec("/etc/init.d/nginx reload");
             $sReload = $user_ssh->exec("/etc/init.d/pdns reload");
             // Insert Domain Into Database
             $sCreateDomain = new Domain(0);
             $sCreateDomain->uName = $uDomain;
             $sCreateDomain->uOwner = $sUser->sId;
             $sCreateDomain->uActive = 1;
             $sCreateDomain->InsertIntoDatabase();
             // Add DNS Records
             $sResultOne = $database->CachedQuery("INSERT INTO dns.domains (name, type) VALUES(:Domain, 'NATIVE')", array(':Domain' => $sDomain));
             $sDomainId = $database->lastInsertId();
             $sResultTwo = $database->CachedQuery("INSERT INTO dns.records (domain_id, name, content, type, ttl, prio) VALUES(:Id, :Domain, :IPAddress, 'A', '120', 'NULL')", array(':Id' => $sDomainId, ':Domain' => $sDomain, ':IPAddress' => $sDefaultIP->sValue));
             return true;
         } else {
             return false;
         }
     } else {
         return false;
     }
 }
开发者ID:deanet,项目名称:Neon,代码行数:60,代码来源:domain.inc.php


示例4: saveDomain

 private function saveDomain($domain, $grade, $image)
 {
     $model = new Domain();
     $model->domain = $domain;
     $model->image = $image . '.png';
     $model->grade = $grade;
     $model->save(false);
 }
开发者ID:nojdug,项目名称:domain,代码行数:8,代码来源:SaveCommand.php


示例5: setDomainResults

 /**
  * Helper to set results for all the users on a domain to a specific value
  *
  * @param array $users    Array of users (usernames)
  * @param Domain $domain   The domain
  * @param int $val      Value to set 1 or 0 ( Valid,Invalid )
  * @param String $info  Optional , can be used to give additional information about the result
  */
 public function setDomainResults($users, Domain $domain, $val, $info = '')
 {
     if (!is_array($users)) {
         $users = (array) $users;
     }
     foreach ($users as $user) {
         $this->results[$user . '@' . $domain->getDomain()] = array('result' => $val, 'info' => $info);
     }
 }
开发者ID:philhq,项目名称:smtp-validator-email,代码行数:17,代码来源:Results.php


示例6: OnDomainCreated

 public function OnDomainCreated(Domain $domain)
 {
     if ($domain->IsManagedDNSEnabled) {
         $userinfo = $this->DB->GetRow("SELECT * FROM users WHERE id=?", array($domain->UserID));
         $SOA_owner = str_replace("@", ".", $userinfo["email"]);
         $this->DB->Execute("INSERT INTO zones (\t`zone`, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t`soa_owner`, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t`soa_ttl`, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t`soa_parent`, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t`soa_serial`, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t`soa_refresh`, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t`soa_retry`, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t`soa_expire`, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t`min_ttl`, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t`isupdated`\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t   )\r\n\t    \t\t\t\t\t\t\t\t VALUES (?,?,'14400',?,?,'14400','7200','3600000','86400',0)", array($domain->GetHostName(), $SOA_owner, CONFIG::$NS1, date("Ymd") . "01"));
         $zoneid = $this->DB->Insert_ID();
         $this->DB->Execute("INSERT INTO records (id, zoneid, rtype, ttl, rpriority, rvalue, rkey) \r\n\t\t\t\t\t\t\t  SELECT null, '{$zoneid}', rtype, ttl, rpriority, rvalue, rkey FROM records \r\n\t\t\t\t\t\t\t  WHERE zoneid='0'\r\n\t\t\t\t\t\t\t ");
     }
 }
开发者ID:rchicoria,项目名称:epp-drs,代码行数:10,代码来源:class.ManagedDNSRegistryObserver.php


示例7: save

 public function save()
 {
     try {
         $model = new Domain();
         $this->data->domain->entry = 'dom_' . $this->data->domain->entry;
         $model->setData($this->data->domain);
         $model->save();
         $this->renderPrompt('information', 'OK', "editEntry('{$this->data->domain->entry}');");
     } catch (\Exception $e) {
         $this->renderPrompt('error', $e->getMessage());
     }
 }
开发者ID:elymatos,项目名称:expressive_fnbr,代码行数:12,代码来源:DomainController.php


示例8: webpage_select

 public function webpage_select($domain_id)
 {
     //取出domain list
     $this->load->library('kals_resource/Domain');
     $all_domains = $this->domain->find_all();
     $domain = new Domain($domain_id);
     $all_webpages = $domain->get_webpages();
     $title = 'webpage_select';
     $this->load->view('admin_apps/header', array('title' => $title));
     $this->load->view('admin_apps/domain_select', array('all_domains' => $all_domains, 'selected_domain' => $domain));
     $this->load->view('admin_apps/webpage_select', array('all_webpages' => $all_webpages));
     $this->load->view('admin_apps/footer');
 }
开发者ID:119155012,项目名称:kals,代码行数:13,代码来源:statistics.php


示例9: getHTML

 function getHTML($id)
 {
     $U = new mUserdata();
     $U = $U->getUDValue("selectedDomain");
     if ($U == null) {
         $t = new HTMLTable(1);
         $t->addRow("Sie haben keine Domain ausgewählt.<br /><br />Bitte wählen Sie eine Domain im Domain-Plugin, indem Sie auf das graue Kästchen in der Liste auf der rechten Seite klicken.");
         return $t->getHTML();
     }
     $Domain = new Domain($U);
     $Domain->loadMe();
     $variables = array("domainTemplate", "contentTemplate", "naviTemplate", "pageTemplate");
     $variables["domainTemplate"] = array("TITLE", "DESCRIPTION", "NAVIGATION", "HEADER", "PAGE");
     $variables["contentTemplate"] = array("TEXT", "IMAGE", "DOWNLOADS", "CONTENTID", "HANDLER");
     $variables["naviTemplate"] = array("LINK", "URL", "TEXT");
     $variables["pageTemplate"] = array("HEADER", "CONTENT", "DOMAIN");
     $variables["dlTemplate"] = array("TEXT", "DOWNLOADS");
     #$this->setParser("html","Util::base64Parser");
     if ($this->A == null and $id != -1) {
         $this->loadMe();
     }
     if ($id == -1) {
         $this->A = $this->newAttributes();
     }
     $gui = new HTMLGUI();
     $gui->setObject($this);
     $gui->setName("Template");
     $TG = new TemplatesGUI();
     $options = $TG->getAvailableCategories();
     $gui->setType("templateType", "select");
     $gui->setOptions("templateType", array_keys($options), array_values($options));
     $gui->setInputJSEvent("templateType", "onchange", "CMSTemplate.updateVariables(this);");
     $gui->setInputJSEvent("templateType", "onkeyup", "CMSTemplate.updateVariables(this);");
     $gui->setLabel("templateType", "Typ");
     $gui->setType("html", "TextEditor64");
     $gui->setType("TemplateDomainID", "radio");
     $gui->setLabel("TemplateDomainID", "Domain");
     $gui->setOptions("TemplateDomainID", array("0", $U), array("alle", "nur " . $Domain->getA()->title));
     $gui->hideAttribute("TemplateID");
     $gui->setType("aktiv", "hidden");
     $gui->setStandardSaveButton($this, "Templates");
     $vars = "";
     foreach ($variables as $k => $v) {
         if (is_array($variables[$k])) {
             $vars .= "<p id=\"{$k}Variables\" style=\"" . ($this->A->templateType == $k ? "" : "display:none;") . "\">%%%" . implode("%%%<br />%%%", $variables[$k]) . "%%%</p>";
         }
     }
     $html = "\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\tnew Draggable('TBVarsContainer',{handle:'TBVarsHandler', zindex: 2000});\n\t\t\t\toldVarSelected = '" . ($this->A->templateType != null ? $this->A->templateType : "null") . "';\n\t\t\t</script>\n\t\t\t<div \n\t\t\t\tstyle=\"position:absolute;z-index:2000;left:450px;width:200px;border-width:1px;border-style:solid;" . (isset($variables[$this->A->templateType]) ? "" : "display:none;") . "\"\n\t\t\t\tclass=\"backgroundColor0 borderColor1\"\n\t\t\t\tid=\"TBVarsContainer\"\n\t\t\t>\n\t\t\t<div class=\"cMHeader backgroundColor1\" id=\"TBVarsHandler\">Variablen:</div>\n\t\t\t<div>\n\t\t\t\t<p><small>Sie können folgende Variablen in Ihrem HTML verwenden (bitte beachen Sie Groß- und Kleinschreibung):</small></p>\n\t\t\t\t{$vars}\n\t\t\t</div>\n\t\t\t</div>";
     return $html . $gui->getEditHTML();
 }
开发者ID:nemiah,项目名称:projectMankind,代码行数:50,代码来源:TemplateGUI.class.php


示例10: doEdit

function doEdit()
{
    if (isset($_POST['submit'])) {
        $domain_id = $_POST['domain_id'];
        $domainname = $_POST['domainname'];
        $description = $_POST['description'];
        $sector = $_POST['psector'];
        $domain = new Domain();
        $domain->domain_id = $domain_id;
        $domain->domain_name = $domainname;
        $domain->description = $description;
        $domain->sector_id = $sector;
    }
    if ($domain_id == "") {
        message('Domain ID is required!', "error");
        redirect('index.php?view=edit&id=' . $domain_id);
    } elseif ($domainname == "") {
        message('Domain Name is required!', "error");
        redirect('index.php?view=edit&id=' . $domain_id);
    } elseif ($description == "") {
        message('Description is required!', "error");
        redirect('index.php?view=edit&id=' . $domain_id);
    } elseif ($sector == "") {
        message('Sector is required!', "error");
        redirect('index.php?view=edit&id=' . $domain_id);
    } else {
        $domain->update($_GET['id']);
        message('Domain infomation updated successfully!', "info");
        redirect('index.php');
    }
}
开发者ID:allybitebo,项目名称:ucb,代码行数:31,代码来源:controller.php


示例11: byDomain

 public static function byDomain($domain)
 {
     if (Domain::is($domain)) {
         return self::$DOMAIN_LAYOUTS[$domain];
     }
     return self::DEFAULT_LAYOUT;
 }
开发者ID:mkbrv,项目名称:laravel-doctrine-project,代码行数:7,代码来源:Layouts.php


示例12: dcp

 public function dcp()
 {
     $domain = Domain::whereDomain(Request::getHttpHost())->first();
     //$domain = Domain::whereDomain(Request::server("SERVER_NAME"))->first();
     $cookie = Cookie::make('domain_hash', $domain->id);
     return Redirect::to('/')->withCookie($cookie);
 }
开发者ID:digideskio,项目名称:voip-id,代码行数:7,代码来源:PanelController.php


示例13: DiscardWhere

 /**
  * Discard all entities matching the supplied criterion.
  * 
  * @param ICriterion $Criterion The criterion to discard by
  */
 public function DiscardWhere(ICriterion $Criterion)
 {
     if (!$this->Domain->HasEntityMap($Criterion->GetEntityType())) {
         throw $this->TypeMismatch('criterion', $Criterion->GetEntityType());
     }
     $this->DiscardedCriteria[spl_object_hash($Criterion)] = $Criterion;
 }
开发者ID:timetoogo,项目名称:penumbra,代码行数:12,代码来源:UnitOfWork.php


示例14: Run

 /**
  * Executor
  *
  * @throws UpdateDomainContactTask_Exception
  */
 public function Run($userid = null)
 {
     try {
         $Factory = RegistryModuleFactory::GetInstance();
         $Registry = $Factory->GetRegistryByExtension($this->Domain->Extension);
         $Manifest = $Registry->GetManifest();
         if ($userid && $this->Domain->UserID != $userid) {
             throw new UpdateDomainContactAction_Exception(_("You don't have permissions for manage this domain"), UpdateDomainContactAction_Exception::DOMAIN_NOT_BELONGS_TO_USER);
         }
         $OldContact = $this->Domain->GetContact($this->contact_type);
         if ($this->NewContact && $this->NewContact->UserID != $this->Domain->UserID) {
             throw new UpdateDomainContactAction_Exception(_("You don't have permissions for using this contact"), UpdateDomainContactAction_Exception::CONTACT_NOT_BELONGS_TO_USER);
         }
         $trade = $Manifest->GetRegistryOptions()->ability->trade == '1';
         if ($this->contact_type != CONTACT_TYPE::REGISTRANT || !$trade) {
             try {
                 $Registry->UpdateDomainContact($this->Domain, $this->contact_type, $OldContact, $this->NewContact);
                 return $this->Domain->HasPendingOperation(Registry::OP_UPDATE) ? UpdateDomainContactAction_Result::PENDING : UpdateDomainContactAction_Result::OK;
             } catch (Exception $e) {
                 throw new UpdateDomainContactAction_Exception(sprintf(_("Cannot change contact. Reason: %s"), $e->getMessage()));
             }
         } else {
             // Execute trade when:
             // - Trade invoice is paid
             // - Previous trade failed
             if ($this->Domain->IncompleteOrderOperation == INCOMPLETE_OPERATION::DOMAIN_TRADE || $this->Invoice && $this->Invoice->Status == INVOICE_STATUS::PAID) {
                 $this->Domain->SetContact($this->NewContact, CONTACT_TYPE::REGISTRANT);
                 $this->Domain->IncompleteOrderOperation = null;
                 $extra["requesttype"] = "ownerChange";
                 try {
                     $trade = $Registry->ChangeDomainOwner($this->Domain, 1, $extra);
                     return $this->Domain->HasPendingOperation(Registry::OP_TRADE) ? UpdateDomainContactAction_Result::PENDING : UpdateDomainContactAction_Result::OK;
                 } catch (Exception $e) {
                     $this->Domain->IncompleteOrderOperation = INCOMPLETE_OPERATION::DOMAIN_TRADE;
                     if ($this->Invoice) {
                         $this->Invoice->ActionStatus = INVOICE_ACTION_STATUS::FAILED;
                         $this->Invoice->ActionFailReason = $e->getMessage();
                     }
                     throw new UpdateDomainContactAction_Exception(sprintf(_("Cannot change contact. Reason: %s"), $e->getMessage()));
                 }
             } else {
                 // Issue an invoice for trade operation
                 $invoiceid = $this->Db->GetOne("SELECT * FROM invoices WHERE status=? AND itemid=? AND purpose=?", array(INVOICE_STATUS::PENDING, $this->Domain->ID, INVOICE_PURPOSE::DOMAIN_TRADE));
                 if (!$invoiceid) {
                     $this->Domain->SetExtraField("NewRegistrantCLID", $this->NewContact->CLID);
                     DBDomain::GetInstance()->Save($this->Domain);
                     $Invoice = new Invoice(INVOICE_PURPOSE::DOMAIN_TRADE, $this->Domain->ID, $userid);
                     $Invoice->Description = sprintf(_("%s domain name trade"), $this->Domain->GetHostName());
                     $Invoice->Save();
                     $this->Invoice = $Invoice;
                     return UpdateDomainContactAction_Result::INVOICE_GENERATED;
                 } else {
                     throw new UpdateDomainContactAction_Exception(_("Another domain trade is already initiated"));
                 }
             }
         }
     } catch (Exception $e) {
         throw new UpdateDomainContactAction_Exception($e->getMessage());
     }
 }
开发者ID:rchicoria,项目名称:epp-drs,代码行数:65,代码来源:class.UpdateDomainContactAction.php


示例15: attemptDetails

 public function attemptDetails($id)
 {
     $attempt = Attempt::find($id);
     $category = Category::find($attempt->category_id) ? Category::find($attempt->category_id)->name : 'N/A';
     $similar_domains = Domain::where('url', 'LIKE', '%' . $attempt->url . '%')->get();
     return View::make('admin.attempt_details')->with(compact('attempt', 'category', 'similar_domains'));
 }
开发者ID:CalinB,项目名称:web-directory,代码行数:7,代码来源:AdminController.php


示例16: _build

 private function _build()
 {
     $deploy = $this->_get_deploy();
     // get domains
     $domains = array();
     foreach ($deploy->{'domains'} as $d) {
         $domain = Domain::fromJson($d);
         $domains[$domain->getId()] = $domain;
         Logger::debug("load domain %s", $domain->toString());
     }
     // get layers
     foreach ($deploy->{'layers'} as $l) {
         $domain = $domains[$l->{'domain_id'}];
         $layer = new Layer($l->{'id'}, $domain);
         $this->_layers[$l->{'id'}] = $layer;
         Logger::debug("load layer %s", $layer->toString());
     }
     // assign experiments
     foreach ($deploy->{'experiments'} as $e) {
         $exp = Experiment::fromJson($e);
         $this->_exps[$exp->getId()] = $exp;
         $layer = $this->_layers[$exp->getLayerId()];
         $layer->assign($exp);
         Logger::debug("load exp %s", $exp->toString());
     }
     foreach ($deploy->{'parameters'} as $p) {
         $param = Parameter::fromJson($p);
         $this->_baseParams[$param->getName()] = $param->getValue();
         Logger::debug("load param %s => %s", $param->getName(), $param->getValue());
     }
 }
开发者ID:qxj,项目名称:exp-sys-toy,代码行数:31,代码来源:exp_sys.php


示例17: searchAjax

    public function searchAjax()
    {
        $response = '';
        $search_term = trim(e(Input::get('search_term')));
        $domains = Domain::where('status', 1)->where('name', 'LIKE', '%' . $search_term . '%')->orWhere('url', 'LIKE', '%' . $search_term . '%')->orWhere('description', 'LIKE', '%' . $search_term . '%')->take(5)->get(['id', 'name', 'thumb']);
        if (count($domains)) {
            foreach ($domains as $domain) {
                $domain_name = strlen($domain->name) > 30 ? substr($domain->name, 0, 30) . '...' : $domain->name;
                $response .= '<div class="search-box">
					<a class="search-result-row" href="' . Domain::seoURL($domain->id) . '">
						<div class="col-lg-5 col-md-5 col-sm-5 col-xs-5">
							<img class="img img-responsive thumbnail" 
								src="' . URL::asset('assets/thumbs/' . $domain->thumb) . '" alt="site preview" />
						</div>			
						<div class="col-lg-7 col-md-7 col-sm-7 col-xs-7">
							' . $domain_name . '	
						</div>	
						<div class="clearfix"></div>
					</a>	
					</div>';
            }
        } else {
            $response .= '<p>' . Lang::get('general.no_results', ['serch_term' => $search_term]) . '</p>';
        }
        print $response;
    }
开发者ID:CalinB,项目名称:web-directory,代码行数:26,代码来源:HomeController.php


示例18: getIndex

 public function getIndex()
 {
     if (Cookie::get('domain_hash') && Domain::find(Cookie::get('domain_hash'))->allow_registration == 0) {
         return Redirect::to('login');
     } else {
         return View::make('register.index');
     }
 }
开发者ID:digideskio,项目名称:voip-id,代码行数:8,代码来源:RegisterController.php


示例19: insertSkipDupes

 public static function insertSkipDupes($domains)
 {
     $query = sprintf('INSERT INTO domains (name) VALUES ("%s") ON DUPLICATE KEY UPDATE name=name', implode('"),("', $domains));
     $status = DB::statement($query);
     Domain::where('created_at', '0000-00-00 00:00:00')->update(['created_at' => DB::raw('NOW()')]);
     Domain::where('created_at', '0000-00-00 00:00:00')->update(['updated_at' => DB::raw('NOW()')]);
     return $status;
 }
开发者ID:nch7,项目名称:domain-metrics-checker,代码行数:8,代码来源:Domain.php


示例20: copy

 public function copy(Domain $domain)
 {
     $this->defaultValue = $domain->getDefaultValue();
     $this->description = $domain->getDescription();
     $this->name = $domain->getName();
     $this->scale = $domain->getScale();
     $this->size = $domain->getSize();
     $this->sqlType = $domain->getSqlType();
     $this->propelType = $domain->getType();
 }
开发者ID:DBezemer,项目名称:server,代码行数:10,代码来源:Domain.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Doo类代码示例发布时间:2022-05-23
下一篇:
PHP DomXPath类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap