Welcome Guest, Not a member yet? Register   Sign In
PHP5 SoapServer and Controllers Practice
#1

[eluser]fitchwh[/eluser]
I've googled this forum and other sites but can't come up with a descent answer.

Integrating or implementing CI controllers as SoapServer classes seems to be overhead. I'm hoping this is just my lack of knowledge of CI. For example, in a standard PHP script, one might create a service like this:
Code:
<?php
class Services {
   public function someFunction() {
      // Do something here.
   }
}

$soap = new SoapServer('some.wsdl');
$soap->setClass('Services');
$soap->handle();

?>

At worst, I was hoping to add the class above to my Controller (2 separate classes), and just set the handler in the "index" method.

Code:
<?php
class Services {
   public function someFunction() {
      // Do something here.
   }
}

class MyController extends Controller {
   public function index() {
      $soap = new SoapServer('some.wsdl');
      $soap->setClass('Services');
      $soap->handle();
   }
}

?>


While this probably works, I was hoping someone out there has a more elegant way of achieving this.


Messages In This Thread
PHP5 SoapServer and Controllers Practice - by El Forum - 03-18-2008, 12:57 PM
PHP5 SoapServer and Controllers Practice - by El Forum - 10-06-2008, 07:48 AM
PHP5 SoapServer and Controllers Practice - by El Forum - 10-06-2008, 08:02 AM
PHP5 SoapServer and Controllers Practice - by El Forum - 10-06-2008, 02:05 PM
PHP5 SoapServer and Controllers Practice - by El Forum - 10-06-2008, 03:03 PM
PHP5 SoapServer and Controllers Practice - by El Forum - 10-06-2008, 03:15 PM



Theme © iAndrew 2016 - Forum software by © MyBB