Ignore:
Timestamp:
10/24/11 14:21:53 (14 years ago)
Author:
jkraaijeveld
Message:

Deleted previous database classes
Submitted (partial) new database connection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk/classes/Application.php

    r89 r131  
    66 * @author fpvanagthoven
    77 */
    8 class Application {
     8class Application extends ResearchToolObject{
    99   
    10     public $id;
    1110    public $title;
    1211    public $description;
    1312    public $style;
    1413
    15     public function __construct($id = null, $title = null, $description = null, $style = null)
     14    public function __construct($uid = null, $title = null, $description = null, $style = null)
    1615    {
    17         $this->id = $id;
     16        if(!isset ($uid))
     17        {
     18            $uid = md5(uniqid(rand(), true));
     19        }
     20        $this->uid = $uid;
    1821        $this->title = $title;
    1922        $this->description = $description;
    2023        $this->style = $style;
    2124    }
    22    
    23     public static function getApplication($info)
    24     {
    25         return new Application(
    26                 $info['applicationID'],
    27                 $info['applicationTitle'],
    28                 $info['applicationDescription'],
    29                 $info['applicationStyle']);
    30     }
    3125
    3226}
Note: See TracChangeset for help on using the changeset viewer.