• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CI and soapclient class

#1
[eluser]lucid[/eluser]
Hi everyone Smile

I've written a class, which is extension of SoapClient, and it is soo good, that i want to start putting received information (from my methods Wink ) to database, and I want use codeigniter... But I have problem - I have no idae where to "put in a project " my MySoapClientClass"..

I wanted to make it as a 'model', but.. it cannot extends CI_Model, it has to extends SoapClient.. So my idea for workaround..
Can it be like that?:


aplication/libaries/mysoapclass.php
Code:
class MySoapClass extends SoapClient  {
....
}

aplication/models/my_model.php

Code:
class My_Model extends CI_Model {
....
}

aplication/controllers/my_contr.php

Code:
class My_Contr extends CI_Controller {
     public function __construct() {
  parent::__construct();
  $this->load->model('my_model');
  $this->load->library('mysoapclass');
}
      .....
        public class save_data() {
            $data=$this->mysoapclass->receive_some_data();  
            $save=$this->my_model->add_to_db($data);
            ...
        }

}

something like that?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.