2007-09-21 06:48:13 +04:00
|
|
|
<?php
|
|
|
|
class Doctrine_Resource_Client extends Doctrine_Resource
|
|
|
|
{
|
2007-09-21 22:01:08 +04:00
|
|
|
public $config = array();
|
2007-09-21 06:48:13 +04:00
|
|
|
|
2007-09-21 22:01:08 +04:00
|
|
|
public function __construct($config)
|
2007-09-21 06:48:13 +04:00
|
|
|
{
|
2007-09-21 22:01:08 +04:00
|
|
|
$this->config = $config;
|
2007-09-21 06:48:13 +04:00
|
|
|
}
|
|
|
|
|
2007-09-21 22:01:08 +04:00
|
|
|
public function newQuery()
|
2007-09-21 06:48:13 +04:00
|
|
|
{
|
2007-09-21 22:01:08 +04:00
|
|
|
return new Doctrine_Resource_Query($this->config);
|
2007-09-21 06:48:13 +04:00
|
|
|
}
|
2007-09-21 22:19:19 +04:00
|
|
|
|
|
|
|
public function newRecord($model)
|
|
|
|
{
|
2007-09-21 22:43:27 +04:00
|
|
|
return new Doctrine_Resource_Record($model, $this->config);
|
2007-09-21 22:19:19 +04:00
|
|
|
}
|
2007-09-21 06:48:13 +04:00
|
|
|
}
|