Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace Joy\Classes\MVCClasses;
- class Model {
- private $_connection;
- public function setConnection($connection) {
- $this->_connection = $connection;
- }
- public function getConnection() {
- return $this->_connection;
- }
- }
- //Setze so Connection:
- $model = new \Joy\Classes\MVCClasses\Model;
- $model->setConnection($mysqlClass->DBConnect());
- //Rufe $getConnection() auf
- $this->getConnection()->query('SELECT * FROM test'); //= NULL, wieso auch immer...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement