fetchAncestor() public method

search ancestors getter
public fetchAncestor ( string $siteKey, string $name ) : array
$siteKey string site key
$name string the name
return array
 /**
  * ancestors setter
  *
  * @param ConfigEntity $config config instance
  * @return ConfigEntity
  */
 private function setAncestors(ConfigEntity $config)
 {
     $ancestors = $this->repo->fetchAncestor($config->siteKey, $config->name);
     $ancestors = $this->sort($ancestors, 'desc');
     foreach ($ancestors as $ancestor) {
         $this->bindClosure($ancestor);
         $config->setParent($ancestor);
     }
     return $config;
 }