Created
December 6, 2010 17:19
-
-
Save jrbasso/730596 to your computer and use it in GitHub Desktop.
Usando SOAP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// app/config/databases.php | |
class DATABASE_CONFIG { | |
var $default = array(...); | |
var $soap = array('datasource' => 'Datasources.Soap', ...); | |
var $test = array(...); | |
} | |
// app/models/servico.php | |
class Servico extends AppModel { | |
var $useDbConfig = 'soap'; | |
var $useTable = false; | |
} | |
// app/controllers/usuarios.php | |
class UsuariosController extends AppController { | |
var $uses = array('Servico'); | |
function index() { | |
$this->set('usuarios', $this->Servico->get_usuarios()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment