Esempio n. 1
0
 /**
  * Return the key of the current element
  *
  * @link    http://php.net/manual/en/iterator.key.php
  * @return  scalar
  */
 public function key()
 {
     return $this->valid() ? $this->currentSiteInfo->getSchema() : null;
 }
Esempio n. 2
0
 /**
  * Test create with params
  */
 public function testCreateWithParams()
 {
     $created = date(DATE_ISO8601);
     $info = new SiteInfo(array('siteId' => '1', 'ownerId' => '2', 'domainId' => '3', 'subdomainId' => '4', 'created' => $created, 'schema' => 'schema_value', 'domain' => 'xn--parlez-vous-franais-lyb.com', 'subdomain' => 'fr', 'fulldomain' => 'fr.xn--parlez-vous-franais-lyb.com'));
     $this->assertSame(1, $info->getSiteId());
     $this->assertSame(2, $info->getOwnerId());
     $this->assertSame(3, $info->getDomainId());
     $this->assertSame(4, $info->getSubdomainId());
     $this->assertSame($created, $info->getCreated());
     $this->assertSame('schema_value', $info->getSchema());
     $this->assertSame('xn--parlez-vous-franais-lyb.com', $info->getDomain());
     $this->assertSame('fr', $info->getSubdomain());
     $this->assertSame('fr.xn--parlez-vous-franais-lyb.com', $info->getFulldomain());
     $this->assertSame('parlez-vous-français.com', $info->getIdn());
     $this->assertSame('fr.parlez-vous-français.com', $info->getFullIdn());
 }