I am using this approach on a project. Looking on the Internet found a
way using *datasources*.

var $webservice = array(
        'datasource' => 'webservice'
);

create the file interactive_source.php inside model/datasources.. and
in the app_controller.php

class AppController extends Controller {

        function beforeFilter()
        {
                // Instância o DataSource Fenix
                $this->service =& 
ConnectionManager::getDataSource('webservice');
        }
}

other approach is creating a behaviour for model tie to make the model
to acts as a webservice...

http://bakery.cakephp.org/articles/view/webservice-behavior

On Aug 22, 6:36 am, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
> On Fri, Aug 22, 2008 at 2:49 PM, clemos <[EMAIL PROTECTED]> wrote:
>
> > I guess they want no tables ($useTable), but also no database at all...
> > Because even if you don't use tables at all, you'll need a database
> > connection to make Cake work...
> > Maybe a "dummy" datasource / db driver would be possible...
>
> Yes, create app/models/datasources/dbo/dbo_my_dbo_source.php
>
> add
>
> class DboMyDboSource extends DboSource
> {
> function connect()
> {
> $this->connected = true;
> return $this->connected;
>
> }
>
> function disconnect()
> {
> $this->connected = false;
> return !$this->connected;
>
> }
> }
>
> and use it by putting in database.php  'driver' => 'my_dbo_source'
>
> Note: This is in addition putting useTable = false in your models
>
> However a more elegant idea would be to abstract more of your
> webservice into the dbosource - we did this recently for Salesforge
> API
>
> HTH
> Tarique
>
> P.S. Probably disconnect method is not needed - experiment with it
>
> --
> =============================================================
> Cheesecake-Photoblog:http://cheesecake-photoblog.org
> PHP for E-Biz:http://sanisoft.com
> =============================================================
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to