<?php

    class Therapist{
        
        public static $sql_table = 'user';
        
        public static function getList()
        {
            $query = db::$i->q("
                SELECT * 
                FROM `".( self::$sql_table )."` 
                WHERE `mode`='therapist' 
                ORDER BY 
                    `firstname` ASC, 
                    `lastname` ASC
            " , true );

            if( db::$i->rows )
            {
                $TherapistList = new stdClass;
                $TherapistList->Count = db::$i->rows;
                
                while( $Therapist = db::$i->f( $query ) )
                {
                    $TherapistList->Items[] = self::parse( $Therapist );
                }
                
                    return $TherapistList;
            }
            
                return;
        }   
        
        public static function parse( $item )
        {
            return user::parse( $item , true );
        }   
        
    }
    
?>