public static function getByName($db, $r, $name) { $set = new Dase_DBO_Itemset($db); $set->name = $name; $set->findOne(); return $set->asArray($r); }
private function _findUniqueName($name, $iter = 0) { if ($iter) { $checkname = $name . '_' . $iter; } else { $checkname = $name; } $set = new Dase_DBO_Itemset($this->db); $set->name = $checkname; if (!$set->findOne()) { return $checkname; } else { $iter++; return $this->_findUniqueName($name, $iter); } }