/**
  * @param string $fn
  * @param null $ref
  * @param bool $nested
  * @param string $type
  * @return null|Service|ServiceStore
  */
 public function find($fn, $ref = null, $nested = true, $type = '')
 {
     $f = null;
     if ($type == 'tmp') {
         $a =& $this->tmpserv;
         foreach ($a as $o) {
             if ($o->name() == $fn) {
                 $o->addReference($ref);
                 return $o;
             }
         }
     }
     if (isset($this->fast[$fn])) {
         if ($ref !== null) {
             $this->fast[$fn]->addReference($ref);
         }
         return $this->fast[$fn];
     }
     if ($nested && isset($this->panoramaShared)) {
         $f = $this->panoramaShared->find($fn, $ref, false, $type);
         if (!is_null($f)) {
             return $f;
         }
     } else {
         if ($nested && isset($this->panoramaDG)) {
             $f = $this->panoramaDG->find($fn, $ref, false, $type);
             if (!is_null($f)) {
                 return $f;
             }
         }
     }
     if ($nested && $this->parentCentralStore !== null) {
         $f = $this->parentCentralStore->find($fn, $ref, $nested);
     }
     return $f;
 }