$ This-& amp; gt; set_current_page ($ page) What does set_current_page mean? This is not an attribute. It is a method. It is not defined before. {code...} $ this-> set_current_page ($ page). What does set_current_page mean?
This is not an attribute. It is a method. It is not defined before.
class Java_Pagination{ protected $_total = 0; protected $_total_page = 0; protected $_page = 1; protected $_page_size = 10; protected $_link = ''; protected $_grep = 3; protected $_admin = false; protected $_css_next = 'next-page'; protected $_css_prev = 'prev-page'; protected $_css_curr = 'curr-page'; protected $_css_page = 'page-nav inline-block'; public function __construct ( $page, $page_size, $total, $admin = false ) { $this->set_current_page( $page ); $this->set_page_size( $page_size ); $this->set_total( $total ); if ( $admin ) { $this->_admin = $admin; } //$this->_link = $_SERVER['REQUEST_URI']; $this->set_link( $_SERVER['REQUEST_URI'] ); } }
Reply content:
$ This-> set_current_page ($ page) What does set_current_page mean?
This is not an attribute. It is a method. It is not defined before.
class Java_Pagination{ protected $_total = 0; protected $_total_page = 0; protected $_page = 1; protected $_page_size = 10; protected $_link = ''; protected $_grep = 3; protected $_admin = false; protected $_css_next = 'next-page'; protected $_css_prev = 'prev-page'; protected $_css_curr = 'curr-page'; protected $_css_page = 'page-nav inline-block'; public function __construct ( $page, $page_size, $total, $admin = false ) { $this->set_current_page( $page ); $this->set_page_size( $page_size ); $this->set_total( $total ); if ( $admin ) { $this->_admin = $admin; } //$this->_link = $_SERVER['REQUEST_URI']; $this->set_link( $_SERVER['REQUEST_URI'] ); } }
There are two possibilities:
1. You didn't fully understand the code. The class method is available below;
2. Does this class inherit other classes, namely:
class Java_Pagination extends SomeClass{ //your code...}
Is this class not inherited?
Set_current_page
This seems to be a database operation in ThinkPHP.
One possibility is that subclass implementation is required.
Your code should not be fully-viewed, there are inherited classes, or there are implementation methods below. In this case, php will report its own errors.
Your code should not be fully-viewed, there are inherited classes, or there are implementation methods below. In this case, php will report its own errors.