1 |
<?php
|
2 |
/*
|
3 |
* $Id$
|
4 |
*
|
5 |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
6 |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
7 |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
8 |
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
9 |
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
10 |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
11 |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
12 |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
13 |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
14 |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
15 |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
16 |
*
|
17 |
* This software consists of voluntary contributions made by many individuals
|
18 |
* and is licensed under the LGPL. For more information, see
|
19 |
* <http://www.phpdoctrine.com>.
|
20 |
*/
|
21 |
Doctrine::autoload('Doctrine_Record_Abstract');
|
22 |
/**
|
23 |
* Doctrine_Template
|
24 |
*
|
25 |
* @package Doctrine
|
26 |
* @subpackage Template
|
27 |
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
28 |
* @link www.phpdoctrine.com
|
29 |
* @since 1.0
|
30 |
* @version $Revision$
|
31 |
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
|
32 |
*/
|
33 |
class Doctrine_Template extends Doctrine_Record_Abstract
|
34 |
{
|
35 |
/**
|
36 |
* @param Doctrine_Record $_invoker the record that invoked the last delegated call
|
37 |
*/
|
38 |
protected $_invoker;
|
39 |
|
40 |
|
41 |
protected $_plugin;
|
42 |
/**
|
43 |
* setTable
|
44 |
*
|
45 |
* @param Doctrine_Table $_table the table object this Template belongs to
|
46 |
*/
|
47 |
public function setTable(Doctrine_Table $table)
|
48 |
{
|
49 |
$this->_table = $table;
|
50 |
}
|
51 |
/**
|
52 |
* getTable
|
53 |
* returns the associated table object
|
54 |
*
|
55 |
* @return Doctrine_Table the associated table object
|
56 |
*/
|
57 |
public function getTable()
|
58 |
{
|
59 |
return $this->_table;
|
60 |
}
|
61 |
/**
|
62 |
* setInvoker
|
63 |
*
|
64 |
* sets the last used invoker
|
65 |
*
|
66 |
* @param Doctrine_Record $invoker the record that invoked the last delegated call
|
67 |
* @return Doctrine_Template this object
|
68 |
*/
|
69 |
public function setInvoker(Doctrine_Record $invoker)
|
70 |
{
|
71 |
$this->_invoker = $invoker;
|
72 |
}
|
73 |
/**
|
74 |
* setInvoker
|
75 |
* returns the last used invoker
|
76 |
*
|
77 |
* @return Doctrine_Record the record that invoked the last delegated call
|
78 |
*/
|
79 |
public function getInvoker()
|
80 |
{
|
81 |
return $this->_invoker;
|
82 |
}
|
83 |
|
84 |
public function getPlugin()
|
85 |
{
|
86 |
return $this->_plugin;
|
87 |
}
|
88 |
|
89 |
public function get($name)
|
90 |
{
|
91 |
throw new Doctrine_Exception("Templates doesn't support accessors.");
|
92 |
}
|
93 |
public function set($name, $value)
|
94 |
{
|
95 |
throw new Doctrine_Exception("Templates doesn't support accessors.");
|
96 |
}
|
97 |
public function setUp()
|
98 |
{
|
99 |
|
100 |
}
|
101 |
|
102 |
public function setTableDefinition()
|
103 |
{
|
104 |
|
105 |
}
|
106 |
}
|