Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class A {
- private $_con;
- public function __construct($id) {
- $this->_con = DB_ODBC::connect($id);
- }
- public function exec($stmt) {
- return odbc_execute($this->_con, $stmt);
- }
- public function B_Obj() {
- return new B(..);
- }
- }
- class B extends {
- // ..
- }
- $a = new A(2);
- $b_1 = $a->B_Obj();
- $b_2 = new B(..);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement