Cleanup unused methods and code formatting

This commit is contained in:
Gilles Crettenand
2015-05-21 16:04:36 +02:00
parent 0d6841d106
commit 6afa8b55f7
5 changed files with 32 additions and 134 deletions

View File

@@ -59,8 +59,7 @@ abstract class DbMapping
/**
* Get a user attribute or the linked whishes
*
* If the name start with sql_, escape the string before to return it to avoid SQL injection.
* @param string $name
* @return mixed
*/
@@ -98,11 +97,6 @@ abstract class DbMapping
$this->attributes[$name] = $value;
}
public function reload()
{
$this->setAttributes(DbMapping::find($this->id)->toArray());
}
/**
* Function to retrieve data from an id.
* @param int $id
@@ -125,14 +119,10 @@ abstract class DbMapping
}
return $result;
}
}
/**
* Exception raised when an invalid attribute name is accessed
*/
class InvalidAttributeException extends Exception
{
}
class InvalidAttributeException extends Exception { }