Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.33 KB | None | 0 0
  1. <?php
  2. class A {
  3.     private $_con;
  4.     public function __construct($id) {
  5.         $this->_con = DB_ODBC::connect($id);
  6.     }
  7.     public function exec($stmt) {
  8.         return odbc_execute($this->_con, $stmt);
  9.     }
  10.     public function B_Obj() {
  11.         return new B(..);
  12.     }
  13. }
  14. class B extends {
  15.     // ..
  16. }
  17. $a = new A(2);
  18. $b_1 = $a->B_Obj();
  19. $b_2 = new B(..);
  20. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement