Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- /**
- * Description of Settings
- *
- * @author fabi0
- */
- namespace Models;
- class Settings {
- private $_data = array();
- public function __construct() {
- $database = \Models\DB::getInstance();
- $sql = 'SELECT * FROM `settings` WHERE id=1 LIMIT 1';
- $database->query($sql);
- //echo "<pre>" . print_r($database->getResult()[0], TRUE) . "</pre>";
- foreach ((array) $database->getResult()[0] as $key => $value) {
- $this->_data[$key] = $value;
- }
- }
- public function get($property) {
- return $this->_data[$property];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement