public function __construct($port){ //重写了继承过父类的参数 //有了保险,选继承父类的构造函数 parent::__construct(); $this->prot = $port; $this->conn = mysql_connect("localhost:$prot", 'root', '123456'); echo $this->port,'----<br/>'; }
public function __construct($id = '') { parent::__construct(); $this->class = strtolower(get_class($this)); $obj = new ReflectionClass($this->class); $this->data = $obj->getStaticPropertyValue('definitation'); if ($id != '') { $this->where = array($this->data['primary'] => $id); $this->order_by = array($this->data['primary'] => 'desc'); $this->return = 1; $this->getData = $this->select(); } }
public function __construct() { parent::__construct(); }
public function __construct($host, $user, $password, $dbName) { parent::__construct($host, $user, $password, $dbName); }
/** * Constructor * * @param array $config Array of configuration information for the Datasource. * @param bool $autoConnect Whether or not the datasource should automatically connect. * @throws MissingConnectionException when a connection cannot be made. */ public function __construct($config = null, $autoConnect = true) { parent::__construct($config, $autoConnect); $this->columns['uuid'] = array('name' => 'char', 'limit' => '36'); }