本文整理汇总了PHP中Domain::getName方法的典型用法代码示例。如果您正苦于以下问题:PHP Domain::getName方法的具体用法?PHP Domain::getName怎么用?PHP Domain::getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Domain
的用法示例。
在下文中一共展示了Domain::getName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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();
}
示例2: testDomain
public function testDomain()
{
$domain = new Domain('example.com');
$this->assertEquals('example.com', $domain->getName());
$this->assertEquals('example.com', strval($domain));
$this->assertEquals('com', $domain->getTld());
$this->assertEquals('com', $domain->getExtension());
$this->assertEquals('example', $domain->getBaseName());
$this->assertFalse($domain->isCcTld());
$this->assertFalse($domain->is2ld());
$this->assertFalse($domain->isSubDomain());
$domain = new Domain('www.example.co.nz');
$this->assertEquals('www.example.co.nz', $domain->getName());
$this->assertEquals('www.example.co.nz', strval($domain));
$this->assertEquals('nz', $domain->getTld());
$this->assertEquals('co.nz', $domain->getExtension());
$this->assertEquals('example', $domain->getBaseName());
$this->assertTrue($domain->isCcTld());
$this->assertTrue($domain->is2ld());
$this->assertTrue($domain->isSubDomain());
}
示例3: domain_add
function domain_add($tmp, $page, $domainid = '')
{
if ('' != $domainid) {
$domain = Domain::getDomainById($domainid);
} else {
$domain = new Domain();
}
$msec_conf_a =& ModSecConfiguration::getAllModSecConfigurations();
$msec_confs = array();
$msec_id[] = 0;
$msec_name[] = 'None';
foreach ($msec_conf_a as $conf) {
$msec_id[] = $conf->getId();
$msec_name[] = $conf->getName();
}
$tmp->assign(array('did' => $domain->getId(), 'dname' => $domain->getName(), 'sname' => $domain->getServerName(), 'sip' => $domain->getServerIP(), 'sport' => $domain->getServerPort(), 'sadmin' => $domain->getServerAdmin(), 'salias' => $domain->getAlias(), 'other' => $domain->getOther(), 'msec_id' => $msec_id, 'msec_name' => $msec_name, 'mod_sec_conf' => $domain->getModSecConf(), 'validity' => $domain->isActive()));
$tmp->assign('tab_page', $page);
}
示例4: update
public function update($id, Domain $domain)
{
$this->_access->update(StudyPressDB::getTableNameDomain(), array(StudyPressDB::COL_NAME_DOMAIN => $domain->getName(), StudyPressDB::COL_DESCRIPTION_DOMAIN => $domain->getDescription()), array(StudyPressDB::COL_ID_DOMAIN => $id));
}
示例5: getRequestDataForUpdate
/**
*
*/
public function getRequestDataForUpdate(Domain $domain)
{
$data = array();
$json = STRegistry::Domains()->query($domain->getName());
$currentDomain = Domain::fromJSON($json);
if ($currentDomain->getAuthCode() != $domain->getAuthCode()) {
if (!isset($data['chg'])) {
$data['chg'] = array();
}
$data['chg']['authInfo'] = array('pw' => $domain->getAuthCode());
}
foreach ($currentDomain->getContacts() as $type => $contact) {
$newContacts = $domain->getContacts();
if ($newContacts[$type] !== false && $newContacts[$type] != $contact) {
if (!isset($data['rem']['contact'])) {
$data['rem']['contact'] = array();
}
if (!isset($data['add']['contact'])) {
$data['add']['contact'] = array();
}
$data['rem']['contact'][] = array($type => $contact);
if (!empty($newContacts[$type])) {
$data['add']['contact'][] = array($type => $newContacts[$type]);
}
}
}
foreach ($domain->getNameServers() as $nameserver => $ips) {
if (!in_array($nameserver, array_keys($currentDomain->getNameServers()))) {
if (!isset($data['add']['ns'])) {
$data['add']['ns'] = array();
}
$upd = array('name' => $nameserver);
if (count($ips)) {
$upd['addr'] = array();
foreach ($ips as $ip) {
$upd['addr'][] = array(CommonFunctions::detectIPType($ip) => $ip);
}
}
$data['add']['ns'][] = $upd;
}
}
foreach ($currentDomain->getNameServers() as $nameserver => $ips) {
if (!in_array($nameserver, array_keys($domain->getNameServers()))) {
if (!isset($data['rem']['ns'])) {
$data['rem']['ns'] = array();
}
$data['rem']['ns'][] = $nameserver;
}
}
foreach ($domain->getStatuses() as $status) {
if (!in_array($status, array(Domain::STATUS_HOLD, Domain::STATUS_DELETE_PROHIBITED, Domain::STATUS_RENEW_PROHIBITED, Domain::STATUS_TRANSFER_PROHIBITED, Domain::STATUS_UPDATE_PROHIBITED))) {
continue;
}
if (!in_array($status, $currentDomain->getStatuses())) {
if (!isset($data['add']['status'])) {
$data['add']['status'] = array();
}
$data['add']['status'][] = $status;
}
}
foreach ($currentDomain->getStatuses() as $status) {
if (!in_array($status, array(Domain::STATUS_HOLD, Domain::STATUS_DELETE_PROHIBITED, Domain::STATUS_RENEW_PROHIBITED, Domain::STATUS_TRANSFER_PROHIBITED, Domain::STATUS_UPDATE_PROHIBITED))) {
continue;
}
if (!in_array($status, $domain->getStatuses())) {
if (!isset($data['rem']['status'])) {
$data['rem']['status'] = array();
}
$data['rem']['status'][] = $status;
}
}
return $data;
}
示例6: update
public function update(Domain &$domain)
{
$this->db->query("update Domain set\n \tname='" . $this->db->escape($domain->getName()) . "\n where id=" . $domain->getId());
}