Example #1
0
 /** @return Elite_Vaf_Model_Level_Finder */
 function getFinder()
 {
     if (!$this->finder instanceof Elite_Vaf_Model_Level_Finder) {
         $this->finder = new Elite_Vaf_Model_Level_Finder();
     }
     $this->finder->setConfig($this->getConfig());
     return $this->finder;
 }
 function getLevel($level)
 {
     if ($this->hasLoadedLevel($level)) {
         return $this->levels[$level];
     }
     if ($this->levelIsOutsideFlexibleSelection($level)) {
         return new Elite_Vaf_Model_Level($level);
     }
     $id = $this->getValue($level);
     $levelFinder = new Elite_Vaf_Model_Level_Finder();
     $object = $levelFinder->find($level, $id);
     if (false == $object) {
         $object = new Elite_Vaf_Model_Level($level, $id);
         if (false == $id) {
             $title = isset($this->titles[$level]) ? $this->titles[$level] : '';
             $object->setTitle($title);
         }
     }
     $this->levels[$level] = $object;
     return $object;
 }