ContentNegotiator::className(), 'formats' => [ 'application/xml' => Response::FORMAT_JSON, ] ]; $behaviors['access'] = [ 'class' => AccessControl::className(), 'rules' => [ [ 'ips' => [ '127.0.0.1' ], 'allow' => true, ], ], ]; return $behaviors; } public function hotels() { $opera_hotel=new OperaHotel(); } }