2005-07-04 01:07:14 +00:00
|
|
|
<?php
|
2005-08-21 06:49:02 +00:00
|
|
|
/* SVN FILE: $Id$ */
|
2005-07-04 04:30:45 +00:00
|
|
|
|
|
|
|
/**
|
2005-09-17 02:22:07 +00:00
|
|
|
* Library of array functions for Cake.
|
2005-08-21 06:49:02 +00:00
|
|
|
*
|
2005-09-17 02:22:07 +00:00
|
|
|
* Internal use only.
|
I've merged in Olle's changes.
Larry, I've merged in _some_ of your changes, I'll merge in the scaffolding and joins code when you tell me it's ready. But I don't want to break how the Controller class works, can't we really do without the constructClasses() method call? Which reminds me, with your joins code, will we be able to use constructs like $user->post->findAll() and $user->post->save()?
Also, what are your changes to the DBO_MySQL class? I mean the mysqlResultSet(), and fetchResult() methods. I didn't see any MySQL-specific code inside them, perhaps they belong to the DBO class itself?
- I've changed the headers on user-editable files in /app and /config. I hope they will constitute a compromise between readability and legality. I've left file Id, copyright, and licence notices.
- /libs/basic.php::uses() function logs included files in global $loaded. Please, consider it a note to myself. Also, I've moved the NeatArray class out of the /libs/basics.php (into /libs/neat_array.php).
- Some cleanups in the Controller and Dispatcher classes.
- DBO::Prepare() accepts strings _and_ arrays now. It's a step towards a unified params theory.
- I think I've added some comments to DBO sub-classes, but it might have been Olle.
- A fix in Model class (findAll didn't work properly)
- Object's constructor sets $this->db to &DBO, which means all Object-descendand classes have default access to the database if it's connected. We need to clean up the code accordingly (some classes set their own $this->db references).
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@236 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-05 11:05:24 +00:00
|
|
|
*
|
2005-08-21 06:49:02 +00:00
|
|
|
* PHP versions 4 and 5
|
2005-07-04 04:30:45 +00:00
|
|
|
*
|
2005-08-21 06:49:02 +00:00
|
|
|
* CakePHP : Rapid Development Framework <http://www.cakephp.org/>
|
|
|
|
* Copyright (c) 2005, CakePHP Authors/Developers
|
|
|
|
*
|
|
|
|
* Author(s): Michal Tatarynowicz aka Pies <tatarynowicz@gmail.com>
|
|
|
|
* Larry E. Masters aka PhpNut <nut@phpnut.com>
|
|
|
|
* Kamil Dzielinski aka Brego <brego.dk@gmail.com>
|
|
|
|
*
|
|
|
|
* Licensed under The MIT License
|
|
|
|
* Redistributions of files must retain the above copyright notice.
|
2005-07-04 04:30:45 +00:00
|
|
|
*
|
2005-08-21 06:49:02 +00:00
|
|
|
* @filesource
|
|
|
|
* @author CakePHP Authors/Developers
|
|
|
|
* @copyright Copyright (c) 2005, CakePHP Authors/Developers
|
|
|
|
* @link https://trac.cakephp.org/wiki/Authors Authors/Developers
|
|
|
|
* @package cake
|
|
|
|
* @subpackage cake.libs
|
|
|
|
* @since CakePHP v 0.2.9
|
|
|
|
* @version $Revision$
|
|
|
|
* @modifiedby $LastChangedBy$
|
|
|
|
* @lastmodified $Date$
|
|
|
|
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
2005-07-04 04:30:45 +00:00
|
|
|
*/
|
I've merged in Olle's changes.
Larry, I've merged in _some_ of your changes, I'll merge in the scaffolding and joins code when you tell me it's ready. But I don't want to break how the Controller class works, can't we really do without the constructClasses() method call? Which reminds me, with your joins code, will we be able to use constructs like $user->post->findAll() and $user->post->save()?
Also, what are your changes to the DBO_MySQL class? I mean the mysqlResultSet(), and fetchResult() methods. I didn't see any MySQL-specific code inside them, perhaps they belong to the DBO class itself?
- I've changed the headers on user-editable files in /app and /config. I hope they will constitute a compromise between readability and legality. I've left file Id, copyright, and licence notices.
- /libs/basic.php::uses() function logs included files in global $loaded. Please, consider it a note to myself. Also, I've moved the NeatArray class out of the /libs/basics.php (into /libs/neat_array.php).
- Some cleanups in the Controller and Dispatcher classes.
- DBO::Prepare() accepts strings _and_ arrays now. It's a step towards a unified params theory.
- I think I've added some comments to DBO sub-classes, but it might have been Olle.
- A fix in Model class (findAll didn't work properly)
- Object's constructor sets $this->db to &DBO, which means all Object-descendand classes have default access to the database if it's connected. We need to clean up the code accordingly (some classes set their own $this->db references).
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@236 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-05 11:05:24 +00:00
|
|
|
|
2005-07-04 04:30:45 +00:00
|
|
|
/**
|
2005-09-17 02:22:07 +00:00
|
|
|
* Class used for internal manipulation of multi-dimensional arrays (arrays of arrays).
|
2005-08-21 06:49:02 +00:00
|
|
|
*
|
|
|
|
* Long description for class
|
2005-07-04 04:30:45 +00:00
|
|
|
*
|
2005-08-21 06:49:02 +00:00
|
|
|
* @package cake
|
|
|
|
* @subpackage cake.libs
|
|
|
|
* @since CakePHP v 0.2.9
|
2005-07-04 04:30:45 +00:00
|
|
|
*/
|
2005-08-21 06:49:02 +00:00
|
|
|
class NeatArray
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Value of NeatArray.
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
* @access public
|
|
|
|
*/
|
|
|
|
var $value;
|
I've merged in Olle's changes.
Larry, I've merged in _some_ of your changes, I'll merge in the scaffolding and joins code when you tell me it's ready. But I don't want to break how the Controller class works, can't we really do without the constructClasses() method call? Which reminds me, with your joins code, will we be able to use constructs like $user->post->findAll() and $user->post->save()?
Also, what are your changes to the DBO_MySQL class? I mean the mysqlResultSet(), and fetchResult() methods. I didn't see any MySQL-specific code inside them, perhaps they belong to the DBO class itself?
- I've changed the headers on user-editable files in /app and /config. I hope they will constitute a compromise between readability and legality. I've left file Id, copyright, and licence notices.
- /libs/basic.php::uses() function logs included files in global $loaded. Please, consider it a note to myself. Also, I've moved the NeatArray class out of the /libs/basics.php (into /libs/neat_array.php).
- Some cleanups in the Controller and Dispatcher classes.
- DBO::Prepare() accepts strings _and_ arrays now. It's a step towards a unified params theory.
- I think I've added some comments to DBO sub-classes, but it might have been Olle.
- A fix in Model class (findAll didn't work properly)
- Object's constructor sets $this->db to &DBO, which means all Object-descendand classes have default access to the database if it's connected. We need to clean up the code accordingly (some classes set their own $this->db references).
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@236 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-05 11:05:24 +00:00
|
|
|
|
2005-08-21 06:49:02 +00:00
|
|
|
/**
|
|
|
|
* Constructor. Defaults to an empty array.
|
|
|
|
*
|
|
|
|
* @param array $value
|
|
|
|
* @access public
|
|
|
|
* @uses NeatArray::value
|
|
|
|
*/
|
|
|
|
function NeatArray ($value=array())
|
|
|
|
{
|
|
|
|
$this->value = $value;
|
|
|
|
}
|
I've merged in Olle's changes.
Larry, I've merged in _some_ of your changes, I'll merge in the scaffolding and joins code when you tell me it's ready. But I don't want to break how the Controller class works, can't we really do without the constructClasses() method call? Which reminds me, with your joins code, will we be able to use constructs like $user->post->findAll() and $user->post->save()?
Also, what are your changes to the DBO_MySQL class? I mean the mysqlResultSet(), and fetchResult() methods. I didn't see any MySQL-specific code inside them, perhaps they belong to the DBO class itself?
- I've changed the headers on user-editable files in /app and /config. I hope they will constitute a compromise between readability and legality. I've left file Id, copyright, and licence notices.
- /libs/basic.php::uses() function logs included files in global $loaded. Please, consider it a note to myself. Also, I've moved the NeatArray class out of the /libs/basics.php (into /libs/neat_array.php).
- Some cleanups in the Controller and Dispatcher classes.
- DBO::Prepare() accepts strings _and_ arrays now. It's a step towards a unified params theory.
- I think I've added some comments to DBO sub-classes, but it might have been Olle.
- A fix in Model class (findAll didn't work properly)
- Object's constructor sets $this->db to &DBO, which means all Object-descendand classes have default access to the database if it's connected. We need to clean up the code accordingly (some classes set their own $this->db references).
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@236 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-05 11:05:24 +00:00
|
|
|
|
2005-08-21 06:49:02 +00:00
|
|
|
/**
|
2005-09-17 02:22:07 +00:00
|
|
|
* Finds and returns records with $fieldName equal to $value from this NeatArray.
|
2005-08-21 06:49:02 +00:00
|
|
|
*
|
|
|
|
* @param string $fieldName
|
|
|
|
* @param string $value
|
|
|
|
* @return mixed
|
|
|
|
* @access public
|
|
|
|
* @uses NeatArray::value
|
|
|
|
*/
|
|
|
|
function findIn ($fieldName, $value)
|
|
|
|
{
|
|
|
|
if (!is_array($this->value))
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
I've merged in Olle's changes.
Larry, I've merged in _some_ of your changes, I'll merge in the scaffolding and joins code when you tell me it's ready. But I don't want to break how the Controller class works, can't we really do without the constructClasses() method call? Which reminds me, with your joins code, will we be able to use constructs like $user->post->findAll() and $user->post->save()?
Also, what are your changes to the DBO_MySQL class? I mean the mysqlResultSet(), and fetchResult() methods. I didn't see any MySQL-specific code inside them, perhaps they belong to the DBO class itself?
- I've changed the headers on user-editable files in /app and /config. I hope they will constitute a compromise between readability and legality. I've left file Id, copyright, and licence notices.
- /libs/basic.php::uses() function logs included files in global $loaded. Please, consider it a note to myself. Also, I've moved the NeatArray class out of the /libs/basics.php (into /libs/neat_array.php).
- Some cleanups in the Controller and Dispatcher classes.
- DBO::Prepare() accepts strings _and_ arrays now. It's a step towards a unified params theory.
- I think I've added some comments to DBO sub-classes, but it might have been Olle.
- A fix in Model class (findAll didn't work properly)
- Object's constructor sets $this->db to &DBO, which means all Object-descendand classes have default access to the database if it's connected. We need to clean up the code accordingly (some classes set their own $this->db references).
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@236 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-05 11:05:24 +00:00
|
|
|
|
2005-08-21 06:49:02 +00:00
|
|
|
$out = false;
|
|
|
|
foreach ($this->value as $k=>$v)
|
|
|
|
{
|
|
|
|
if (isset($v[$fieldName]) && ($v[$fieldName] == $value))
|
|
|
|
{
|
|
|
|
$out[$k] = $v;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return $out;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2005-09-17 02:22:07 +00:00
|
|
|
* Checks if $this->value is an array, and removes all empty elements.
|
2005-08-21 06:49:02 +00:00
|
|
|
*
|
|
|
|
* @access public
|
|
|
|
* @uses NeatArray::value
|
|
|
|
*/
|
|
|
|
function cleanup ()
|
2005-07-16 06:10:56 +00:00
|
|
|
{
|
2005-08-21 06:49:02 +00:00
|
|
|
$out = is_array($this->value)? array(): null;
|
|
|
|
foreach ($this->value as $k=>$v)
|
|
|
|
{
|
2005-09-11 12:45:10 +00:00
|
|
|
if ($v == "0")
|
|
|
|
{
|
|
|
|
$out[$k] = $v;
|
|
|
|
}
|
|
|
|
elseif ($v)
|
2005-08-21 06:49:02 +00:00
|
|
|
{
|
|
|
|
$out[$k] = $v;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$this->value = $out;
|
2005-07-10 05:08:19 +00:00
|
|
|
}
|
I've merged in Olle's changes.
Larry, I've merged in _some_ of your changes, I'll merge in the scaffolding and joins code when you tell me it's ready. But I don't want to break how the Controller class works, can't we really do without the constructClasses() method call? Which reminds me, with your joins code, will we be able to use constructs like $user->post->findAll() and $user->post->save()?
Also, what are your changes to the DBO_MySQL class? I mean the mysqlResultSet(), and fetchResult() methods. I didn't see any MySQL-specific code inside them, perhaps they belong to the DBO class itself?
- I've changed the headers on user-editable files in /app and /config. I hope they will constitute a compromise between readability and legality. I've left file Id, copyright, and licence notices.
- /libs/basic.php::uses() function logs included files in global $loaded. Please, consider it a note to myself. Also, I've moved the NeatArray class out of the /libs/basics.php (into /libs/neat_array.php).
- Some cleanups in the Controller and Dispatcher classes.
- DBO::Prepare() accepts strings _and_ arrays now. It's a step towards a unified params theory.
- I think I've added some comments to DBO sub-classes, but it might have been Olle.
- A fix in Model class (findAll didn't work properly)
- Object's constructor sets $this->db to &DBO, which means all Object-descendand classes have default access to the database if it's connected. We need to clean up the code accordingly (some classes set their own $this->db references).
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@236 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-05 11:05:24 +00:00
|
|
|
|
2005-08-21 06:49:02 +00:00
|
|
|
/**
|
2005-09-17 02:22:07 +00:00
|
|
|
* Adds elements from given array to itself.
|
2005-08-21 06:49:02 +00:00
|
|
|
*
|
|
|
|
* @param string $value
|
|
|
|
* @return bool
|
|
|
|
* @access public
|
|
|
|
* @uses NeatArray::value
|
|
|
|
*/
|
|
|
|
function add ($value)
|
2005-07-16 06:10:56 +00:00
|
|
|
{
|
2005-08-21 06:49:02 +00:00
|
|
|
return ($this->value = $this->plus($value))? true: false;
|
2005-07-10 05:08:19 +00:00
|
|
|
}
|
I've merged in Olle's changes.
Larry, I've merged in _some_ of your changes, I'll merge in the scaffolding and joins code when you tell me it's ready. But I don't want to break how the Controller class works, can't we really do without the constructClasses() method call? Which reminds me, with your joins code, will we be able to use constructs like $user->post->findAll() and $user->post->save()?
Also, what are your changes to the DBO_MySQL class? I mean the mysqlResultSet(), and fetchResult() methods. I didn't see any MySQL-specific code inside them, perhaps they belong to the DBO class itself?
- I've changed the headers on user-editable files in /app and /config. I hope they will constitute a compromise between readability and legality. I've left file Id, copyright, and licence notices.
- /libs/basic.php::uses() function logs included files in global $loaded. Please, consider it a note to myself. Also, I've moved the NeatArray class out of the /libs/basics.php (into /libs/neat_array.php).
- Some cleanups in the Controller and Dispatcher classes.
- DBO::Prepare() accepts strings _and_ arrays now. It's a step towards a unified params theory.
- I think I've added some comments to DBO sub-classes, but it might have been Olle.
- A fix in Model class (findAll didn't work properly)
- Object's constructor sets $this->db to &DBO, which means all Object-descendand classes have default access to the database if it's connected. We need to clean up the code accordingly (some classes set their own $this->db references).
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@236 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-05 11:05:24 +00:00
|
|
|
|
2005-08-21 06:49:02 +00:00
|
|
|
/**
|
|
|
|
* Returns itself merged with given array.
|
|
|
|
*
|
|
|
|
* @param array $value Array to add to NeatArray.
|
|
|
|
* @return array
|
|
|
|
* @access public
|
|
|
|
* @uses NeatArray::value
|
|
|
|
*/
|
|
|
|
function plus ($value)
|
|
|
|
{
|
|
|
|
return array_merge($this->value, (is_array($value)? $value: array($value)));
|
|
|
|
}
|
I've merged in Olle's changes.
Larry, I've merged in _some_ of your changes, I'll merge in the scaffolding and joins code when you tell me it's ready. But I don't want to break how the Controller class works, can't we really do without the constructClasses() method call? Which reminds me, with your joins code, will we be able to use constructs like $user->post->findAll() and $user->post->save()?
Also, what are your changes to the DBO_MySQL class? I mean the mysqlResultSet(), and fetchResult() methods. I didn't see any MySQL-specific code inside them, perhaps they belong to the DBO class itself?
- I've changed the headers on user-editable files in /app and /config. I hope they will constitute a compromise between readability and legality. I've left file Id, copyright, and licence notices.
- /libs/basic.php::uses() function logs included files in global $loaded. Please, consider it a note to myself. Also, I've moved the NeatArray class out of the /libs/basics.php (into /libs/neat_array.php).
- Some cleanups in the Controller and Dispatcher classes.
- DBO::Prepare() accepts strings _and_ arrays now. It's a step towards a unified params theory.
- I think I've added some comments to DBO sub-classes, but it might have been Olle.
- A fix in Model class (findAll didn't work properly)
- Object's constructor sets $this->db to &DBO, which means all Object-descendand classes have default access to the database if it's connected. We need to clean up the code accordingly (some classes set their own $this->db references).
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@236 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-05 11:05:24 +00:00
|
|
|
|
2005-08-21 06:49:02 +00:00
|
|
|
/**
|
|
|
|
* Counts repeating strings and returns an array of totals.
|
|
|
|
*
|
|
|
|
* @param int $sortedBy A value of 1 sorts by values, a value of 2 sorts by keys. Defaults to null (no sorting).
|
|
|
|
* @return array
|
|
|
|
* @access public
|
|
|
|
* @uses NeatArray::value
|
|
|
|
*/
|
|
|
|
function totals ($sortedBy=1,$reverse=true)
|
|
|
|
{
|
|
|
|
$out = array();
|
|
|
|
foreach ($this->value as $val)
|
|
|
|
{
|
|
|
|
isset($out[$val])? $out[$val]++: $out[$val] = 1;
|
|
|
|
}
|
I've merged in Olle's changes.
Larry, I've merged in _some_ of your changes, I'll merge in the scaffolding and joins code when you tell me it's ready. But I don't want to break how the Controller class works, can't we really do without the constructClasses() method call? Which reminds me, with your joins code, will we be able to use constructs like $user->post->findAll() and $user->post->save()?
Also, what are your changes to the DBO_MySQL class? I mean the mysqlResultSet(), and fetchResult() methods. I didn't see any MySQL-specific code inside them, perhaps they belong to the DBO class itself?
- I've changed the headers on user-editable files in /app and /config. I hope they will constitute a compromise between readability and legality. I've left file Id, copyright, and licence notices.
- /libs/basic.php::uses() function logs included files in global $loaded. Please, consider it a note to myself. Also, I've moved the NeatArray class out of the /libs/basics.php (into /libs/neat_array.php).
- Some cleanups in the Controller and Dispatcher classes.
- DBO::Prepare() accepts strings _and_ arrays now. It's a step towards a unified params theory.
- I think I've added some comments to DBO sub-classes, but it might have been Olle.
- A fix in Model class (findAll didn't work properly)
- Object's constructor sets $this->db to &DBO, which means all Object-descendand classes have default access to the database if it's connected. We need to clean up the code accordingly (some classes set their own $this->db references).
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@236 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-05 11:05:24 +00:00
|
|
|
|
2005-08-21 06:49:02 +00:00
|
|
|
if ($sortedBy == 1)
|
|
|
|
{
|
|
|
|
$reverse? arsort($out, SORT_NUMERIC): asort($out, SORT_NUMERIC);
|
|
|
|
}
|
I've merged in Olle's changes.
Larry, I've merged in _some_ of your changes, I'll merge in the scaffolding and joins code when you tell me it's ready. But I don't want to break how the Controller class works, can't we really do without the constructClasses() method call? Which reminds me, with your joins code, will we be able to use constructs like $user->post->findAll() and $user->post->save()?
Also, what are your changes to the DBO_MySQL class? I mean the mysqlResultSet(), and fetchResult() methods. I didn't see any MySQL-specific code inside them, perhaps they belong to the DBO class itself?
- I've changed the headers on user-editable files in /app and /config. I hope they will constitute a compromise between readability and legality. I've left file Id, copyright, and licence notices.
- /libs/basic.php::uses() function logs included files in global $loaded. Please, consider it a note to myself. Also, I've moved the NeatArray class out of the /libs/basics.php (into /libs/neat_array.php).
- Some cleanups in the Controller and Dispatcher classes.
- DBO::Prepare() accepts strings _and_ arrays now. It's a step towards a unified params theory.
- I think I've added some comments to DBO sub-classes, but it might have been Olle.
- A fix in Model class (findAll didn't work properly)
- Object's constructor sets $this->db to &DBO, which means all Object-descendand classes have default access to the database if it's connected. We need to clean up the code accordingly (some classes set their own $this->db references).
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@236 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-05 11:05:24 +00:00
|
|
|
|
2005-08-21 06:49:02 +00:00
|
|
|
if ($sortedBy == 2)
|
|
|
|
{
|
|
|
|
$reverse? krsort($out, SORT_STRING): ksort($out, SORT_STRING);
|
|
|
|
}
|
I've merged in Olle's changes.
Larry, I've merged in _some_ of your changes, I'll merge in the scaffolding and joins code when you tell me it's ready. But I don't want to break how the Controller class works, can't we really do without the constructClasses() method call? Which reminds me, with your joins code, will we be able to use constructs like $user->post->findAll() and $user->post->save()?
Also, what are your changes to the DBO_MySQL class? I mean the mysqlResultSet(), and fetchResult() methods. I didn't see any MySQL-specific code inside them, perhaps they belong to the DBO class itself?
- I've changed the headers on user-editable files in /app and /config. I hope they will constitute a compromise between readability and legality. I've left file Id, copyright, and licence notices.
- /libs/basic.php::uses() function logs included files in global $loaded. Please, consider it a note to myself. Also, I've moved the NeatArray class out of the /libs/basics.php (into /libs/neat_array.php).
- Some cleanups in the Controller and Dispatcher classes.
- DBO::Prepare() accepts strings _and_ arrays now. It's a step towards a unified params theory.
- I think I've added some comments to DBO sub-classes, but it might have been Olle.
- A fix in Model class (findAll didn't work properly)
- Object's constructor sets $this->db to &DBO, which means all Object-descendand classes have default access to the database if it's connected. We need to clean up the code accordingly (some classes set their own $this->db references).
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@236 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-05 11:05:24 +00:00
|
|
|
|
2005-08-21 06:49:02 +00:00
|
|
|
return $out;
|
|
|
|
}
|
I've merged in Olle's changes.
Larry, I've merged in _some_ of your changes, I'll merge in the scaffolding and joins code when you tell me it's ready. But I don't want to break how the Controller class works, can't we really do without the constructClasses() method call? Which reminds me, with your joins code, will we be able to use constructs like $user->post->findAll() and $user->post->save()?
Also, what are your changes to the DBO_MySQL class? I mean the mysqlResultSet(), and fetchResult() methods. I didn't see any MySQL-specific code inside them, perhaps they belong to the DBO class itself?
- I've changed the headers on user-editable files in /app and /config. I hope they will constitute a compromise between readability and legality. I've left file Id, copyright, and licence notices.
- /libs/basic.php::uses() function logs included files in global $loaded. Please, consider it a note to myself. Also, I've moved the NeatArray class out of the /libs/basics.php (into /libs/neat_array.php).
- Some cleanups in the Controller and Dispatcher classes.
- DBO::Prepare() accepts strings _and_ arrays now. It's a step towards a unified params theory.
- I think I've added some comments to DBO sub-classes, but it might have been Olle.
- A fix in Model class (findAll didn't work properly)
- Object's constructor sets $this->db to &DBO, which means all Object-descendand classes have default access to the database if it's connected. We need to clean up the code accordingly (some classes set their own $this->db references).
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@236 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-05 11:05:24 +00:00
|
|
|
|
2005-08-21 06:49:02 +00:00
|
|
|
/**
|
2005-09-17 02:22:07 +00:00
|
|
|
* Performs an array_filter() on the contents of this NeatArray.
|
2005-08-21 06:49:02 +00:00
|
|
|
*
|
2005-09-17 02:22:07 +00:00
|
|
|
* @param string $with Name of callback function to perform on each element of this NeatArray.
|
|
|
|
* @return array
|
2005-08-21 06:49:02 +00:00
|
|
|
*/
|
|
|
|
function filter ($with)
|
|
|
|
{
|
|
|
|
return $this->value = array_filter($this->value, $with);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2005-09-17 02:22:07 +00:00
|
|
|
* Passes each of its values through a specified function or method. Think of PHP's {@link http://php.net/array_walk array_walk()}.
|
2005-08-21 06:49:02 +00:00
|
|
|
*
|
2005-09-17 02:22:07 +00:00
|
|
|
* @param string $with Name of callback function
|
|
|
|
* @return array Returns value of NeatArray::value
|
2005-08-21 06:49:02 +00:00
|
|
|
* @access public
|
|
|
|
* @uses NeatArray::value
|
|
|
|
*/
|
|
|
|
function walk ($with)
|
|
|
|
{
|
|
|
|
array_walk($this->value, $with);
|
|
|
|
return $this->value;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2005-09-17 02:22:07 +00:00
|
|
|
* Apply $template to all elements of this NeatArray, and return the array itself.
|
2005-08-21 06:49:02 +00:00
|
|
|
*
|
2005-09-17 02:22:07 +00:00
|
|
|
* @param string $template {@link http://php.net/sprintf sprintf()}-compatible string to be applied to all values of this NeatArray.
|
|
|
|
* @return array
|
2005-08-21 06:49:02 +00:00
|
|
|
*/
|
|
|
|
function sprintf($template)
|
|
|
|
{
|
|
|
|
for ($ii=0; $ii<count($this->value); $ii++)
|
|
|
|
{
|
|
|
|
$this->value[$ii] = sprintf($template, $this->value[$ii]);
|
|
|
|
}
|
|
|
|
|
|
|
|
return $this->value;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Extracts a value from all array items.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
* @access public
|
|
|
|
* @uses NeatArray::value
|
|
|
|
*/
|
|
|
|
function extract ($name)
|
|
|
|
{
|
|
|
|
$out = array();
|
|
|
|
foreach ($this->value as $val)
|
|
|
|
{
|
|
|
|
if (isset($val[$name]))
|
2005-07-10 05:08:19 +00:00
|
|
|
$out[] = $val[$name];
|
2005-08-21 06:49:02 +00:00
|
|
|
}
|
|
|
|
return $out;
|
|
|
|
}
|
I've merged in Olle's changes.
Larry, I've merged in _some_ of your changes, I'll merge in the scaffolding and joins code when you tell me it's ready. But I don't want to break how the Controller class works, can't we really do without the constructClasses() method call? Which reminds me, with your joins code, will we be able to use constructs like $user->post->findAll() and $user->post->save()?
Also, what are your changes to the DBO_MySQL class? I mean the mysqlResultSet(), and fetchResult() methods. I didn't see any MySQL-specific code inside them, perhaps they belong to the DBO class itself?
- I've changed the headers on user-editable files in /app and /config. I hope they will constitute a compromise between readability and legality. I've left file Id, copyright, and licence notices.
- /libs/basic.php::uses() function logs included files in global $loaded. Please, consider it a note to myself. Also, I've moved the NeatArray class out of the /libs/basics.php (into /libs/neat_array.php).
- Some cleanups in the Controller and Dispatcher classes.
- DBO::Prepare() accepts strings _and_ arrays now. It's a step towards a unified params theory.
- I think I've added some comments to DBO sub-classes, but it might have been Olle.
- A fix in Model class (findAll didn't work properly)
- Object's constructor sets $this->db to &DBO, which means all Object-descendand classes have default access to the database if it's connected. We need to clean up the code accordingly (some classes set their own $this->db references).
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@236 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-05 11:05:24 +00:00
|
|
|
|
2005-08-21 06:49:02 +00:00
|
|
|
/**
|
|
|
|
* Returns a list of unique elements.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
function unique ()
|
|
|
|
{
|
|
|
|
return array_unique($this->value);
|
|
|
|
}
|
I've merged in Olle's changes.
Larry, I've merged in _some_ of your changes, I'll merge in the scaffolding and joins code when you tell me it's ready. But I don't want to break how the Controller class works, can't we really do without the constructClasses() method call? Which reminds me, with your joins code, will we be able to use constructs like $user->post->findAll() and $user->post->save()?
Also, what are your changes to the DBO_MySQL class? I mean the mysqlResultSet(), and fetchResult() methods. I didn't see any MySQL-specific code inside them, perhaps they belong to the DBO class itself?
- I've changed the headers on user-editable files in /app and /config. I hope they will constitute a compromise between readability and legality. I've left file Id, copyright, and licence notices.
- /libs/basic.php::uses() function logs included files in global $loaded. Please, consider it a note to myself. Also, I've moved the NeatArray class out of the /libs/basics.php (into /libs/neat_array.php).
- Some cleanups in the Controller and Dispatcher classes.
- DBO::Prepare() accepts strings _and_ arrays now. It's a step towards a unified params theory.
- I think I've added some comments to DBO sub-classes, but it might have been Olle.
- A fix in Model class (findAll didn't work properly)
- Object's constructor sets $this->db to &DBO, which means all Object-descendand classes have default access to the database if it's connected. We need to clean up the code accordingly (some classes set their own $this->db references).
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@236 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-05 11:05:24 +00:00
|
|
|
|
2005-08-21 06:49:02 +00:00
|
|
|
/**
|
|
|
|
* Removes duplicate elements from the value and returns it.
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
function makeUnique ()
|
|
|
|
{
|
|
|
|
return $this->value = array_unique($this->value);
|
|
|
|
}
|
I've merged in Olle's changes.
Larry, I've merged in _some_ of your changes, I'll merge in the scaffolding and joins code when you tell me it's ready. But I don't want to break how the Controller class works, can't we really do without the constructClasses() method call? Which reminds me, with your joins code, will we be able to use constructs like $user->post->findAll() and $user->post->save()?
Also, what are your changes to the DBO_MySQL class? I mean the mysqlResultSet(), and fetchResult() methods. I didn't see any MySQL-specific code inside them, perhaps they belong to the DBO class itself?
- I've changed the headers on user-editable files in /app and /config. I hope they will constitute a compromise between readability and legality. I've left file Id, copyright, and licence notices.
- /libs/basic.php::uses() function logs included files in global $loaded. Please, consider it a note to myself. Also, I've moved the NeatArray class out of the /libs/basics.php (into /libs/neat_array.php).
- Some cleanups in the Controller and Dispatcher classes.
- DBO::Prepare() accepts strings _and_ arrays now. It's a step towards a unified params theory.
- I think I've added some comments to DBO sub-classes, but it might have been Olle.
- A fix in Model class (findAll didn't work properly)
- Object's constructor sets $this->db to &DBO, which means all Object-descendand classes have default access to the database if it's connected. We need to clean up the code accordingly (some classes set their own $this->db references).
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@236 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-05 11:05:24 +00:00
|
|
|
|
2005-08-21 06:49:02 +00:00
|
|
|
/**
|
|
|
|
* Joins an array with myself using a key (like a join between database tables).
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
*
|
|
|
|
* $alice = array('id'=>'1', 'name'=>'Alice');
|
|
|
|
* $bob = array('id'=>'2', 'name'=>'Bob');
|
|
|
|
*
|
|
|
|
* $users = new NeatArray(array($alice, $bob));
|
|
|
|
*
|
|
|
|
* $born = array
|
|
|
|
* (
|
|
|
|
* array('user_id'=>'1', 'born'=>'1980'),
|
|
|
|
* array('user_id'=>'2', 'born'=>'1976')
|
|
|
|
* );
|
|
|
|
*
|
|
|
|
* $users->joinWith($born, 'id', 'user_id');
|
|
|
|
*
|
|
|
|
* Result:
|
|
|
|
*
|
|
|
|
* $users->value == array
|
|
|
|
* (
|
|
|
|
* array('id'=>'1', 'name'=>'Alice', 'born'=>'1980'),
|
|
|
|
* array('id'=>'2', 'name'=>'Bob', 'born'=>'1976')
|
|
|
|
* );
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param array $his The array to join with myself.
|
|
|
|
* @param string $onMine Key to use on myself.
|
|
|
|
* @param string $onHis Key to use on him.
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
function joinWith ($his, $onMine, $onHis=null)
|
|
|
|
{
|
|
|
|
if (empty($onHis))
|
|
|
|
{
|
|
|
|
$onHis = $onMine;
|
|
|
|
}
|
I've merged in Olle's changes.
Larry, I've merged in _some_ of your changes, I'll merge in the scaffolding and joins code when you tell me it's ready. But I don't want to break how the Controller class works, can't we really do without the constructClasses() method call? Which reminds me, with your joins code, will we be able to use constructs like $user->post->findAll() and $user->post->save()?
Also, what are your changes to the DBO_MySQL class? I mean the mysqlResultSet(), and fetchResult() methods. I didn't see any MySQL-specific code inside them, perhaps they belong to the DBO class itself?
- I've changed the headers on user-editable files in /app and /config. I hope they will constitute a compromise between readability and legality. I've left file Id, copyright, and licence notices.
- /libs/basic.php::uses() function logs included files in global $loaded. Please, consider it a note to myself. Also, I've moved the NeatArray class out of the /libs/basics.php (into /libs/neat_array.php).
- Some cleanups in the Controller and Dispatcher classes.
- DBO::Prepare() accepts strings _and_ arrays now. It's a step towards a unified params theory.
- I think I've added some comments to DBO sub-classes, but it might have been Olle.
- A fix in Model class (findAll didn't work properly)
- Object's constructor sets $this->db to &DBO, which means all Object-descendand classes have default access to the database if it's connected. We need to clean up the code accordingly (some classes set their own $this->db references).
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@236 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-05 11:05:24 +00:00
|
|
|
|
2005-08-21 06:49:02 +00:00
|
|
|
$his = new NeatArray($his);
|
I've merged in Olle's changes.
Larry, I've merged in _some_ of your changes, I'll merge in the scaffolding and joins code when you tell me it's ready. But I don't want to break how the Controller class works, can't we really do without the constructClasses() method call? Which reminds me, with your joins code, will we be able to use constructs like $user->post->findAll() and $user->post->save()?
Also, what are your changes to the DBO_MySQL class? I mean the mysqlResultSet(), and fetchResult() methods. I didn't see any MySQL-specific code inside them, perhaps they belong to the DBO class itself?
- I've changed the headers on user-editable files in /app and /config. I hope they will constitute a compromise between readability and legality. I've left file Id, copyright, and licence notices.
- /libs/basic.php::uses() function logs included files in global $loaded. Please, consider it a note to myself. Also, I've moved the NeatArray class out of the /libs/basics.php (into /libs/neat_array.php).
- Some cleanups in the Controller and Dispatcher classes.
- DBO::Prepare() accepts strings _and_ arrays now. It's a step towards a unified params theory.
- I think I've added some comments to DBO sub-classes, but it might have been Olle.
- A fix in Model class (findAll didn't work properly)
- Object's constructor sets $this->db to &DBO, which means all Object-descendand classes have default access to the database if it's connected. We need to clean up the code accordingly (some classes set their own $this->db references).
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@236 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-05 11:05:24 +00:00
|
|
|
|
2005-08-21 06:49:02 +00:00
|
|
|
$out = array();
|
|
|
|
foreach ($this->value as $key=>$val)
|
|
|
|
{
|
|
|
|
if ($fromHis = $his->findIn($onHis, $val[$onMine]))
|
|
|
|
{
|
|
|
|
list($fromHis) = array_values($fromHis);
|
|
|
|
$out[$key] = array_merge($val, $fromHis);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$out[$key] = $val;
|
|
|
|
}
|
|
|
|
}
|
I've merged in Olle's changes.
Larry, I've merged in _some_ of your changes, I'll merge in the scaffolding and joins code when you tell me it's ready. But I don't want to break how the Controller class works, can't we really do without the constructClasses() method call? Which reminds me, with your joins code, will we be able to use constructs like $user->post->findAll() and $user->post->save()?
Also, what are your changes to the DBO_MySQL class? I mean the mysqlResultSet(), and fetchResult() methods. I didn't see any MySQL-specific code inside them, perhaps they belong to the DBO class itself?
- I've changed the headers on user-editable files in /app and /config. I hope they will constitute a compromise between readability and legality. I've left file Id, copyright, and licence notices.
- /libs/basic.php::uses() function logs included files in global $loaded. Please, consider it a note to myself. Also, I've moved the NeatArray class out of the /libs/basics.php (into /libs/neat_array.php).
- Some cleanups in the Controller and Dispatcher classes.
- DBO::Prepare() accepts strings _and_ arrays now. It's a step towards a unified params theory.
- I think I've added some comments to DBO sub-classes, but it might have been Olle.
- A fix in Model class (findAll didn't work properly)
- Object's constructor sets $this->db to &DBO, which means all Object-descendand classes have default access to the database if it's connected. We need to clean up the code accordingly (some classes set their own $this->db references).
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@236 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-05 11:05:24 +00:00
|
|
|
|
2005-08-21 06:49:02 +00:00
|
|
|
return $this->value = $out;
|
|
|
|
}
|
I've merged in Olle's changes.
Larry, I've merged in _some_ of your changes, I'll merge in the scaffolding and joins code when you tell me it's ready. But I don't want to break how the Controller class works, can't we really do without the constructClasses() method call? Which reminds me, with your joins code, will we be able to use constructs like $user->post->findAll() and $user->post->save()?
Also, what are your changes to the DBO_MySQL class? I mean the mysqlResultSet(), and fetchResult() methods. I didn't see any MySQL-specific code inside them, perhaps they belong to the DBO class itself?
- I've changed the headers on user-editable files in /app and /config. I hope they will constitute a compromise between readability and legality. I've left file Id, copyright, and licence notices.
- /libs/basic.php::uses() function logs included files in global $loaded. Please, consider it a note to myself. Also, I've moved the NeatArray class out of the /libs/basics.php (into /libs/neat_array.php).
- Some cleanups in the Controller and Dispatcher classes.
- DBO::Prepare() accepts strings _and_ arrays now. It's a step towards a unified params theory.
- I think I've added some comments to DBO sub-classes, but it might have been Olle.
- A fix in Model class (findAll didn't work properly)
- Object's constructor sets $this->db to &DBO, which means all Object-descendand classes have default access to the database if it's connected. We need to clean up the code accordingly (some classes set their own $this->db references).
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@236 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-05 11:05:24 +00:00
|
|
|
|
2005-08-21 06:49:02 +00:00
|
|
|
/**
|
|
|
|
* Enter description here...
|
2005-09-17 02:22:07 +00:00
|
|
|
* @todo Explain this function. almost looks like it creates a tree
|
2005-08-21 06:49:02 +00:00
|
|
|
*
|
2005-09-17 02:22:07 +00:00
|
|
|
* @param string $root
|
|
|
|
* @param string $idKey
|
|
|
|
* @param string $parentIdKey
|
|
|
|
* @param string $childrenKey
|
|
|
|
* @return array
|
2005-08-21 06:49:02 +00:00
|
|
|
*/
|
|
|
|
function threaded ($root=null, $idKey='id', $parentIdKey='parent_id', $childrenKey='children')
|
|
|
|
{
|
|
|
|
$out = array();
|
I've merged in Olle's changes.
Larry, I've merged in _some_ of your changes, I'll merge in the scaffolding and joins code when you tell me it's ready. But I don't want to break how the Controller class works, can't we really do without the constructClasses() method call? Which reminds me, with your joins code, will we be able to use constructs like $user->post->findAll() and $user->post->save()?
Also, what are your changes to the DBO_MySQL class? I mean the mysqlResultSet(), and fetchResult() methods. I didn't see any MySQL-specific code inside them, perhaps they belong to the DBO class itself?
- I've changed the headers on user-editable files in /app and /config. I hope they will constitute a compromise between readability and legality. I've left file Id, copyright, and licence notices.
- /libs/basic.php::uses() function logs included files in global $loaded. Please, consider it a note to myself. Also, I've moved the NeatArray class out of the /libs/basics.php (into /libs/neat_array.php).
- Some cleanups in the Controller and Dispatcher classes.
- DBO::Prepare() accepts strings _and_ arrays now. It's a step towards a unified params theory.
- I think I've added some comments to DBO sub-classes, but it might have been Olle.
- A fix in Model class (findAll didn't work properly)
- Object's constructor sets $this->db to &DBO, which means all Object-descendand classes have default access to the database if it's connected. We need to clean up the code accordingly (some classes set their own $this->db references).
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@236 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-05 11:05:24 +00:00
|
|
|
|
2005-08-21 06:49:02 +00:00
|
|
|
for ($ii=0; $ii<sizeof($this->value); $ii++)
|
|
|
|
{
|
|
|
|
if ($this->value[$ii][$parentIdKey] == $root)
|
|
|
|
{
|
|
|
|
$tmp = $this->value[$ii];
|
|
|
|
$tmp[$childrenKey] = isset($this->value[$ii][$idKey])?
|
|
|
|
$this->threaded($this->value[$ii][$idKey], $idKey, $parentIdKey, $childrenKey):
|
|
|
|
null;
|
|
|
|
$out[] = $tmp;
|
|
|
|
}
|
|
|
|
}
|
I've merged in Olle's changes.
Larry, I've merged in _some_ of your changes, I'll merge in the scaffolding and joins code when you tell me it's ready. But I don't want to break how the Controller class works, can't we really do without the constructClasses() method call? Which reminds me, with your joins code, will we be able to use constructs like $user->post->findAll() and $user->post->save()?
Also, what are your changes to the DBO_MySQL class? I mean the mysqlResultSet(), and fetchResult() methods. I didn't see any MySQL-specific code inside them, perhaps they belong to the DBO class itself?
- I've changed the headers on user-editable files in /app and /config. I hope they will constitute a compromise between readability and legality. I've left file Id, copyright, and licence notices.
- /libs/basic.php::uses() function logs included files in global $loaded. Please, consider it a note to myself. Also, I've moved the NeatArray class out of the /libs/basics.php (into /libs/neat_array.php).
- Some cleanups in the Controller and Dispatcher classes.
- DBO::Prepare() accepts strings _and_ arrays now. It's a step towards a unified params theory.
- I think I've added some comments to DBO sub-classes, but it might have been Olle.
- A fix in Model class (findAll didn't work properly)
- Object's constructor sets $this->db to &DBO, which means all Object-descendand classes have default access to the database if it's connected. We need to clean up the code accordingly (some classes set their own $this->db references).
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@236 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-05 11:05:24 +00:00
|
|
|
|
2005-08-21 06:49:02 +00:00
|
|
|
return $out;
|
|
|
|
}
|
I've merged in Olle's changes.
Larry, I've merged in _some_ of your changes, I'll merge in the scaffolding and joins code when you tell me it's ready. But I don't want to break how the Controller class works, can't we really do without the constructClasses() method call? Which reminds me, with your joins code, will we be able to use constructs like $user->post->findAll() and $user->post->save()?
Also, what are your changes to the DBO_MySQL class? I mean the mysqlResultSet(), and fetchResult() methods. I didn't see any MySQL-specific code inside them, perhaps they belong to the DBO class itself?
- I've changed the headers on user-editable files in /app and /config. I hope they will constitute a compromise between readability and legality. I've left file Id, copyright, and licence notices.
- /libs/basic.php::uses() function logs included files in global $loaded. Please, consider it a note to myself. Also, I've moved the NeatArray class out of the /libs/basics.php (into /libs/neat_array.php).
- Some cleanups in the Controller and Dispatcher classes.
- DBO::Prepare() accepts strings _and_ arrays now. It's a step towards a unified params theory.
- I think I've added some comments to DBO sub-classes, but it might have been Olle.
- A fix in Model class (findAll didn't work properly)
- Object's constructor sets $this->db to &DBO, which means all Object-descendand classes have default access to the database if it's connected. We need to clean up the code accordingly (some classes set their own $this->db references).
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@236 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-05 11:05:24 +00:00
|
|
|
}
|
|
|
|
|
2005-07-04 01:49:09 +00:00
|
|
|
|
2005-06-20 23:08:59 +00:00
|
|
|
|
I've merged in Olle's changes.
Larry, I've merged in _some_ of your changes, I'll merge in the scaffolding and joins code when you tell me it's ready. But I don't want to break how the Controller class works, can't we really do without the constructClasses() method call? Which reminds me, with your joins code, will we be able to use constructs like $user->post->findAll() and $user->post->save()?
Also, what are your changes to the DBO_MySQL class? I mean the mysqlResultSet(), and fetchResult() methods. I didn't see any MySQL-specific code inside them, perhaps they belong to the DBO class itself?
- I've changed the headers on user-editable files in /app and /config. I hope they will constitute a compromise between readability and legality. I've left file Id, copyright, and licence notices.
- /libs/basic.php::uses() function logs included files in global $loaded. Please, consider it a note to myself. Also, I've moved the NeatArray class out of the /libs/basics.php (into /libs/neat_array.php).
- Some cleanups in the Controller and Dispatcher classes.
- DBO::Prepare() accepts strings _and_ arrays now. It's a step towards a unified params theory.
- I think I've added some comments to DBO sub-classes, but it might have been Olle.
- A fix in Model class (findAll didn't work properly)
- Object's constructor sets $this->db to &DBO, which means all Object-descendand classes have default access to the database if it's connected. We need to clean up the code accordingly (some classes set their own $this->db references).
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@236 3807eeeb-6ff5-0310-8944-8be069107fe0
2005-06-05 11:05:24 +00:00
|
|
|
?>
|