Hello! Do not tell me how to contact other controllers in Kohana 3.3. I do this:
class Controller_Main extends Controller_Template { public $template = 'static'; public function action_index() { $countries = Request::factory('place/country')->execute(); //print_r($response); } } class Controller_Place extends Controller { public function action_country() { $location = new Model_Location(); return $location->get_countries(); } } class Model_Location extends Model { public function get_countries() { return DB::select('name','country_id') ->from('countries') ->order_by('country_id') ->execute()->as_array(); } public function get_country_regions($country_id) { } } But when printing out the following information:
Response Object ( [_status:protected] => 200 [_header:protected] => HTTP_Header Object ( [_accept_content:protected] => [_accept_charset:protected] => [_accept_encoding:protected] => [_accept_language:protected] => [storage:ArrayObject:private] => Array ( ) ) [_body:protected] => [_cookies:protected] => Array ( ) [_protocol:protected] => HTTP/1.1 )
TopNewsControllerextendsNewsController. All other connections should occur at the model level. - romeovar_dump(Request::factory('place/country')->execute()->__toString());printsvar_dump(Request::factory('place/country')->execute()->__toString());? Must display the Response object's body. - romeo