<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>CakePHP: model.php Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.5 -->
<script type="text/javascript">
<!--
function changeDisplayState (e){
var num=this.id.replace(/[^[0-9]/g,'');
var button=this.firstChild;
var sectionDiv=document.getElementById('dynsection'+num);
if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
sectionDiv.style.display='block';
button.src='open.gif';
}else{
sectionDiv.style.display='none';
button.src='closed.gif';
}
}
function initDynSections(){
var divs=document.getElementsByTagName('div');
var sectionCounter=1;
for(var i=0;i<divs.length-1;i++){
if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
var header=divs[i];
var section=divs[i+1];
var button=header.firstChild;
if (button!='IMG'){
divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
button=document.createElement('img');
divs[i].insertBefore(button,divs[i].firstChild);
}
header.style.cursor='pointer';
header.onclick=changeDisplayState;
header.id='dynheader'+sectionCounter;
button.src='closed.gif';
section.id='dynsection'+sectionCounter;
section.style.display='none';
section.style.marginLeft='14px';
sectionCounter++;
}
}
}
window.onload = initDynSections;
-->
</script>
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<h1>model.php</h1><a href="libs_2model_2model_8php.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <?php
<a name="l00002"></a>00002 <span class="comment">/* SVN FILE: $Id: model.php 7296 2008-06-27 09:09:03Z gwoo $ */</span>
<a name="l00032"></a>00032 <a class="code" href="class_app.html#2a84eb340fe947c7fdc753c3bf8cd053">App::import</a>(<span class="stringliteral">'Core'</span>, array(<span class="stringliteral">'ClassRegistry'</span>, <span class="stringliteral">'Overloadable'</span>, <span class="stringliteral">'Validation'</span>, <span class="stringliteral">'Behavior'</span>, <span class="stringliteral">'ConnectionManager'</span>, <span class="stringliteral">'Set'</span>));
<a name="l00045"></a><a class="code" href="class_model.html">00045</a> <span class="keyword">class </span><a class="code" href="class_model.html">Model</a> <span class="keyword">extends</span> <a class="code" href="class_overloadable.html">Overloadable</a> {
<a name="l00052"></a><a class="code" href="class_model.html#4ef85bd6a2f60da8d56875b10ae4051f">00052</a> var <a class="code" href="class_model.html#4ef85bd6a2f60da8d56875b10ae4051f">$useDbConfig</a> = <span class="stringliteral">'default'</span>;
<a name="l00059"></a><a class="code" href="class_model.html#25ade72b4e0b48c0946f4ec266f7f437">00059</a> var <a class="code" href="class_model.html#25ade72b4e0b48c0946f4ec266f7f437">$useTable</a> = null;
<a name="l00066"></a><a class="code" href="class_model.html#dcaa6aa5f1748941d51c76383ba54986">00066</a> var <a class="code" href="class_model.html#dcaa6aa5f1748941d51c76383ba54986">$displayField</a> = null;
<a name="l00073"></a><a class="code" href="class_model.html#bf5013a1c90f86f4c476bf5775f48570">00073</a> var <a class="code" href="class_model.html#bf5013a1c90f86f4c476bf5775f48570">$id</a> = <span class="keyword">false</span>;
<a name="l00080"></a><a class="code" href="class_model.html#e04c729239482d90601ba5c9d6a4fc66">00080</a> var <a class="code" href="class_model.html#e04c729239482d90601ba5c9d6a4fc66">$data</a> = array();
<a name="l00087"></a><a class="code" href="class_model.html#4fb4dfe4b3f9cc152727e59c3d666d19">00087</a> var <a class="code" href="class_model.html#4fb4dfe4b3f9cc152727e59c3d666d19">$table</a> = <span class="keyword">false</span>;
<a name="l00094"></a><a class="code" href="class_model.html#19ba09de3c283f574a175db48a6acab4">00094</a> var <a class="code" href="class_model.html#19ba09de3c283f574a175db48a6acab4">$primaryKey</a> = null;
<a name="l00101"></a><a class="code" href="class_model.html#4687d7e0573608a311e8ca4361c8b356">00101</a> var <a class="code" href="class_model.html#4687d7e0573608a311e8ca4361c8b356">$_schema</a> = null;
<a name="l00109"></a><a class="code" href="class_model.html#1018641b0d7d77c5aa75fb16dd3f9d4b">00109</a> var <a class="code" href="class_model.html#1018641b0d7d77c5aa75fb16dd3f9d4b">$validate</a> = array();
<a name="l00116"></a><a class="code" href="class_model.html#bbfe83c45d236dcebb63168eca107f54">00116</a> var <a class="code" href="class_model.html#bbfe83c45d236dcebb63168eca107f54">$validationErrors</a> = array();
<a name="l00123"></a><a class="code" href="class_model.html#9744e486533341dac0f96eddb4d91d95">00123</a> var <a class="code" href="class_model.html#9744e486533341dac0f96eddb4d91d95">$tablePrefix</a> = null;
<a name="l00130"></a><a class="code" href="class_model.html#6deb37085e0c77e405a38338d565bd76">00130</a> var <a class="code" href="class_model.html#6deb37085e0c77e405a38338d565bd76">$name</a> = null;
<a name="l00137"></a><a class="code" href="class_model.html#1073625f79c53e8f53bc0eed163a7c96">00137</a> var <a class="code" href="class_model.html#1073625f79c53e8f53bc0eed163a7c96">$alias</a> = null;
<a name="l00144"></a><a class="code" href="class_model.html#88a534c211009b93954aa8c70ace6310">00144</a> var <a class="code" href="class_model.html#88a534c211009b93954aa8c70ace6310">$tableToModel</a> = array();
<a name="l00151"></a><a class="code" href="class_model.html#bdbe0c14602c43a1028999e1a9111185">00151</a> var <a class="code" href="class_model.html#bdbe0c14602c43a1028999e1a9111185">$logTransactions</a> = <span class="keyword">false</span>;
<a name="l00158"></a><a class="code" href="class_model.html#2230d2aefe1b37c79932e57c100b4c62">00158</a> var <a class="code" href="class_model.html#2230d2aefe1b37c79932e57c100b4c62">$transactional</a> = <span class="keyword">false</span>;
<a name="l00166"></a><a class="code" href="class_model.html#75f9b4a0f5c2080e6c31b1121d0b5ff3">00166</a> var <a class="code" href="class_model.html#75f9b4a0f5c2080e6c31b1121d0b5ff3">$cacheQueries</a> = <span class="keyword">false</span>;
<a name="l00173"></a><a class="code" href="class_model.html#fa7691c7389141a1fb95227332d0b214">00173</a> var <a class="code" href="class_model.html#fa7691c7389141a1fb95227332d0b214">$belongsTo</a> = array();
<a name="l00180"></a><a class="code" href="class_model.html#cdf6557fa61191f27c7401f4287cfb40">00180</a> var <a class="code" href="class_model.html#cdf6557fa61191f27c7401f4287cfb40">$hasOne</a> = array();
<a name="l00187"></a><a class="code" href="class_model.html#6c957f0c9e27bb694c996bdc16845c58">00187</a> var <a class="code" href="class_model.html#6c957f0c9e27bb694c996bdc16845c58">$hasMany</a> = array();
<a name="l00194"></a><a class="code" href="class_model.html#467c05d1b73e2c0b739d0a4c8780d29f">00194</a> var <a class="code" href="class_model.html#467c05d1b73e2c0b739d0a4c8780d29f">$hasAndBelongsToMany</a> = array();
<a name="l00204"></a><a class="code" href="class_model.html#449692ace319c5aa9353a3b4ade18d98">00204</a> var <a class="code" href="class_model.html#449692ace319c5aa9353a3b4ade18d98">$actsAs</a> = null;
<a name="l00211"></a><a class="code" href="class_model.html#94212444b91da17442088e2a5c4ffdbe">00211</a>