-
Notifications
You must be signed in to change notification settings - Fork 0
/
LineConfig.php
92 lines (76 loc) · 2.13 KB
/
LineConfig.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?php
namespace dc\yukon;
require_once('config.php');
// Data structure for line fetching parameters.
interface iLineConfig
{
function get_class_name(); // Return class name instantiated on an object fetch.
function get_class_params(); // Return constructor parameter array for class instantiated on object fetch.
function get_fetchtype(); // Return fetch type.
function get_offset(); // Return row offset.
function get_row(); // Return row.
function set_class_name($value); // Set class name instantiated on an object fetch.
function set_class_params(array $value); // Set constructor parameter array for class instantiated on object fetch.
function set_fetchtype($value); // Set fetch type.
function set_row($value); // Set row.
function set_offset($value); // Set row offset.
}
class LineConfig implements iLineConfig
{
private
$fetchtype = NULL, // Line array fetch type.
$row = NULL, // Row to access in a result set that uses a scrollable cursor.
$offset = NULL, // Row to access if row is absolute or relative.
$class_name = NULL, // Class to instantiate on an object fetch.
$class_params = array(); // Parameter array to pass into class constructor.
public function __construct()
{
// Populate defaults.
$this->fetchtype = \dc\yukon\DEFAULTS::FETCHTYPE;
$this->row = \dc\yukon\DEFAULTS::ROW;
$this->offset = \dc\yukon\DEFAULTS::OFFSET;
}
// Accessors
public function get_fetchtype()
{
return $this->fetchtype;
}
public function get_row()
{
return $this->row;
}
public function get_offset()
{
return $this->offset;
}
public function get_class_name()
{
return $this->class_name;
}
public function get_class_params()
{
return $this->class_params;
}
// Mutators
public function set_class_name($value)
{
$this->class_name = $value;
}
public function set_class_params(array $value)
{
$this->class_params = $value;
}
public function set_fetchtype($value)
{
$this->fetchtype = $value;
}
public function set_row($value)
{
$this->row = $value;
}
public function set_offset($value)
{
$this->offset = $value;
}
}
?>