~eventum-developers/eventum/trunk

« back to all changes in this revision

Viewing changes to lib/eventum/crm/class.support_level.php

  • Committer: Bryan Alsdorf
  • Date: 2013-08-23 03:50:34 UTC
  • mto: (4033.1.168 eventum-skysql)
  • mto: This revision was merged to the branch mainline in revision 4660.
  • Revision ID: bryan@montyprogram.com-20130823035034-7f5r3pt1xg0xnnhk
Initial commit of CRM migration

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
/**
 
4
 * Represents a support level
 
5
 */
 
6
abstract class Support_Level
 
7
{
 
8
    /**
 
9
     * Holds the parent CRM object.
 
10
     *
 
11
     * @var CRM
 
12
     */
 
13
    protected $crm;
 
14
 
 
15
    /**
 
16
     * Holds the database connection this object should use.
 
17
     *
 
18
     * @var resource
 
19
     */
 
20
    protected $connection;
 
21
 
 
22
    protected $level_id;
 
23
 
 
24
    protected $name;
 
25
 
 
26
    protected $description;
 
27
 
 
28
    protected $maximum_response_time;
 
29
 
 
30
    public function __construct(CRM &$crm, $level_id)
 
31
    {
 
32
        $this->crm =& $crm;
 
33
        $this->connection =& $crm->getConnection();
 
34
        $this->level_id = $level_id;
 
35
 
 
36
        $this->load();
 
37
    }
 
38
 
 
39
 
 
40
    abstract protected function load();
 
41
 
 
42
    public function getName()
 
43
    {
 
44
        return $this->name;
 
45
    }
 
46
 
 
47
    public function getLevelID()
 
48
    {
 
49
        return $this->level_id;
 
50
    }
 
51
 
 
52
    public function getDescription()
 
53
    {
 
54
        return $this->description;
 
55
    }
 
56
 
 
57
    public function getMaximumResponseTime()
 
58
    {
 
59
        return $this->maximum_response_time;
 
60
    }
 
61
 
 
62
 
 
63
}
 
64
 
 
65
 
 
66
class SupportLevelNotFoundException extends CRMException
 
67
{
 
68
    public function __construct($level_id, Exception $previous=null) {
 
69
        parent::__construct("Support Level '" . $level_id. "' not found", 0, $previous);
 
70
    }
 
71
}
 
 
b'\\ No newline at end of file'