sources_list = new Sources_Table(); } public function display() { $action = ( isset( $_GET[ 'action' ] ) ) ? $_GET[ 'action' ] : ''; switch( $action ) { case 'new': $this->new(); break; case 'edit': $this->edit(); break; case 'cats': $this->cats(); break; case 'delete': $this->delete(); break; default: $this->list(); break; } } private function list() { if ( isset( $_POST[ 'action' ] ) ) { $this->handle_action(); } ?>