Exemplo n.º 1
0
 /**
  * 
  * @param string $domain
  * @param boolean $withChildren
  * @return array
  */
 public static function getDomain($domain, $withChildren = false)
 {
     $domainList = array();
     $mainDomainId = Domain::getIdByParameter('name', array($domain));
     if (count($mainDomainId) > 0) {
         $domainList[] = Domain::get($mainDomainId[0]);
         if ($withChildren) {
             array_merge($domainList, Domain::getList('*', -1, 0, null, 'ASC', array('parent_id' => $mainDomainId[0])));
         }
     }
     return $domainList;
 }
Exemplo n.º 2
0
 public function testGetListWithFilterNoResult()
 {
     $expectedResult = array();
     $this->assertEquals($expectedResult, Domain::getList('name', null, null, null, null, array('name' => 'idontexist')));
 }