class Message{ private $content;//constructor public Message($get_from){ }public leave_message(){ $this->get_content(); $this->write_in_db(); }private function get_content(){ // do Sth. }; private function write_in_db(){ //write the data into database }//end }
public Message($get_from){ }请问这里怎么写,请介绍一下,下面的我基本上会写,在这里非常感谢大家的帮助。
this is the constructor of class Message, you can choose to do some jobs.just likepublic Message($get_from){ $this->content=$get_from; }
private $content;//constructor
public Message($get_from){
}public leave_message(){
$this->get_content();
$this->write_in_db();
}private function get_content(){
// do Sth.
};
private function write_in_db(){
//write the data into database
}//end
}
}请问这里怎么写,请介绍一下,下面的我基本上会写,在这里非常感谢大家的帮助。
$this->content=$get_from;
}