Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class myRepository
- {
- private $conn;
- public function __construct(Connection $conn){
- $this->conn = $conn;
- }
- public function getStuff(){
- $sql = "SELECT * FROM stuff";
- return $this->conn->fetchAll($sql);
- }
- }
- services:
- my_repo:
- class: MyBundleRepositoryMyRepository
- arguments: ["@doctrine.dbal.default_connection"]
- doctrine:
- dbal:
- default_connection: default
- connections:
- default:
- driver: pdo_mysql
- host: "%database_host%"
- port: "%database_port%"
- dbname: "%database_name%"
- user: "%database_user%"
- password: "%database_password%"
- charset: UTF8
- "doctrine/orm": "^2.5",
- "doctrine/doctrine-bundle": "^1.6",
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement