<?php


    class typ_kryterium
    {

        public static $sql_table = 'typ_kryterium';

        public static $own_listing = false;
        public static $own_listing_parse = false;
        public static $own_options = false;
        
        public function __construct()
        {
        }

        public static function getList()
        {
            $query = db::$i->q("
            SELECT * 
            FROM `".( self::$sql_table )."` 
            ORDER BY `id` ASC
            " , true );
            
            if( db::$i->rows )
            {
                
                $Tematy = new stdClass;
                $Tematy->Count = db::$i->rows;
                
                while( $item = db::$i->f( $query ) )
                {
                    $Tematy->Items[] = self::parse( $item );
                }
                
                    return $Tematy;
            }
            
                return;
        }
               
        public static function parse( $item )
        {
            return core::object( $item );
        }
                
        public static function options()
        {
            
        }   
        
        public static function details_parse()
        {
            
        }
        
    }
    
?>