i have a class like:
class List_PendingVerify extends Rs_List {
public function __construct( $id ) {
}
protected function loadData( ) {
}
}
Now i how co开发者_JAVA百科uld i get value of $id in loadData function ?
so that i can be able to echo $id.
Thanks.
class List_PendingVerify extends Rs_List {
public function __construct($id) {
$this->id = $id;
}
protected function loadData() {
echo $this->id;
}
}
I recommend reading the Classes and Objects documentation. (In particular, the Properties section is relevant here.)
精彩评论