Permalink
Browse files

BackwardsCompatibilityBreak - Renamed fORM::createActiveRecordClass()…

… to fORM::defineActiveRecordClass()
  • Loading branch information...
wbond committed Oct 1, 2008
1 parent 5291446 commit c7a9f89d6ddd5d739b5783ffe4da170ac8354551
Showing with 20 additions and 20 deletions.
  1. +20 −20 classes/fORM.php
View
@@ -282,6 +282,25 @@ static public function classize($table)
}
/**
* Turns a primary key array into a hash key using md5
*
* @param array $primary_key_data The primary key data to hash
* @return string An md5 of the sorted, serialized primary key data
*/
static private function createPrimaryKeyHash($primary_key_data)
{
sort($primary_key_data);
foreach ($primary_key_data as $primary_key => $data) {
if (is_object($data) && is_callable(array($data, '__toString'))) {
$data = $data->__toString();
}
$primary_key_data[$primary_key] = $data;
}
return md5(serialize($primary_key_data));
}
/**
* Will dynamically create an {@link fActiveRecord}-based class for a database table
*
@@ -290,7 +309,7 @@ static public function classize($table)
* @param string $class The name of the class to create
* @return void
*/
static public function createActiveRecordClass($class)
static public function defineActiveRecordClass($class)
{
if (class_exists($class, FALSE)) {
return;
@@ -312,25 +331,6 @@ static public function createActiveRecordClass($class)
}
/**
* Turns a primary key array into a hash key using md5
*
* @param array $primary_key_data The primary key data to hash
* @return string An md5 of the sorted, serialized primary key data
*/
static private function createPrimaryKeyHash($primary_key_data)
{
sort($primary_key_data);
foreach ($primary_key_data as $primary_key => $data) {
if (is_object($data) && is_callable(array($data, '__toString'))) {
$data = $data->__toString();
}
$primary_key_data[$primary_key] = $data;
}
return md5(serialize($primary_key_data));
}
/**
* Sets a flag indicating a class has been configured
*

0 comments on commit c7a9f89

Please sign in to comment.