src/AppserverIo/Server/Configuration/Extension/ArrayInjector.php 1 location
|
@@ 44-59 (lines=16) @@
|
41 |
|
* |
42 |
|
* @return void |
43 |
|
*/ |
44 |
|
public function init() |
45 |
|
{ |
46 |
|
// Init data as an empty array |
47 |
|
$this->data = array(); |
48 |
|
|
49 |
|
// Grab our DB resource |
50 |
|
$dbConnection = $this->getDbResource(); |
51 |
|
|
52 |
|
// Build up the query |
53 |
|
$query = 'SELECT * FROM `rewrite`'; |
54 |
|
|
55 |
|
// Get the results and fill them into our data |
56 |
|
foreach ($dbConnection->query($query, \PDO::FETCH_ASSOC) as $row) { |
57 |
|
$this->data[$row['key']] = $row['value']; |
58 |
|
} |
59 |
|
} |
60 |
|
|
61 |
|
/** |
62 |
|
* We will return a string containing all data entries delimetered by the configured delimeter |
src/AppserverIo/Server/Configuration/Extension/StringInjector.php 1 location
|
@@ 51-66 (lines=16) @@
|
48 |
|
* |
49 |
|
* @return void |
50 |
|
*/ |
51 |
|
public function init() |
52 |
|
{ |
53 |
|
// Init data as an empty array |
54 |
|
$this->data = array(); |
55 |
|
|
56 |
|
// Grab our DB resource |
57 |
|
$dbConnection = $this->getDbResource(); |
58 |
|
|
59 |
|
// Build up the query |
60 |
|
$query = 'SELECT * FROM `virtualHost`'; |
61 |
|
|
62 |
|
// Get the results and fill them into our data |
63 |
|
foreach ($dbConnection->query($query) as $row) { |
64 |
|
$this->data[] = $row[0]; |
65 |
|
} |
66 |
|
} |
67 |
|
|
68 |
|
/** |
69 |
|
* We will return a string containing all data entries delimitered by the configured delimiter |