Ejemplo n.º 1
0
 public function getDataByName()
 {
     $nbVal = count($this->_actions);
     switch ($nbVal) {
         case 3:
             $oProd = new ProductsObject();
             $this->_prodId = $oProd->getIdByName($this->_actions[3]);
             //    break;
         //    break;
         case 2:
             $oSubCat = new SubCategoriesObject();
             $this->_subCatId = $oSubCat->getIdByName($this->_actions[2]);
             //                break;
         //                break;
         case 1:
             $oCat = new CatalogCategoriesObject();
             $this->_catId = $oCat->getIdByName($this->_actions[1]);
             //                break;
         //                break;
         default:
             break;
     }
 }