Пример #1
0
 private function _getsVisibleCourses($order, $pageNo, $pageSize)
 {
     $course = TCVM_Product_CoreFactory::Factory(self::TYPE_COURSES);
     $conditions = array();
     $conditions['visible'] = intval(true);
     return $course->gets($conditions, $order, $pageNo, $pageSize);
 }
Пример #2
0
 /**
  * @return  TCVM_Product_CoreAbstract
  */
 public static function Factory($type)
 {
     switch ($type) {
         case TCVM_Product_Imple::TYPE_COURSES:
             if (!self::$_coursesInstance) {
                 self::$_coursesInstance = new TCVM_Product_Courses_Imple();
             }
             return self::$_coursesInstance;
             break;
         default:
             throw new Exception("no such product type {$type}");
             break;
     }
 }