commit
28025b8230
@ -463,7 +463,7 @@ class ClassMetadataInfo implements ClassMetadata
|
|||||||
/**
|
/**
|
||||||
* READ-ONLY: The registered lifecycle callbacks for entities of this class.
|
* READ-ONLY: The registered lifecycle callbacks for entities of this class.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array[]
|
||||||
*/
|
*/
|
||||||
public $lifecycleCallbacks = array();
|
public $lifecycleCallbacks = array();
|
||||||
|
|
||||||
|
@ -309,7 +309,9 @@ final class Query extends AbstractQuery
|
|||||||
|
|
||||||
if ($paramCount > $mappingCount) {
|
if ($paramCount > $mappingCount) {
|
||||||
throw QueryException::tooManyParameters($mappingCount, $paramCount);
|
throw QueryException::tooManyParameters($mappingCount, $paramCount);
|
||||||
} elseif ($paramCount < $mappingCount) {
|
}
|
||||||
|
|
||||||
|
if ($paramCount < $mappingCount) {
|
||||||
throw QueryException::tooFewParameters($mappingCount, $paramCount);
|
throw QueryException::tooFewParameters($mappingCount, $paramCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -501,7 +501,6 @@ class SqlWalker implements TreeWalker
|
|||||||
default:
|
default:
|
||||||
//@todo: throw exception?
|
//@todo: throw exception?
|
||||||
return '';
|
return '';
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$filterClauses = array();
|
$filterClauses = array();
|
||||||
|
@ -1259,21 +1259,19 @@ public function __construct(<params>)
|
|||||||
*/
|
*/
|
||||||
protected function generateEntityLifecycleCallbackMethods(ClassMetadataInfo $metadata)
|
protected function generateEntityLifecycleCallbackMethods(ClassMetadataInfo $metadata)
|
||||||
{
|
{
|
||||||
if (isset($metadata->lifecycleCallbacks) && $metadata->lifecycleCallbacks) {
|
if (empty($metadata->lifecycleCallbacks)) {
|
||||||
$methods = array();
|
return '';
|
||||||
|
|
||||||
foreach ($metadata->lifecycleCallbacks as $name => $callbacks) {
|
|
||||||
foreach ($callbacks as $callback) {
|
|
||||||
if ($code = $this->generateLifecycleCallbackMethod($name, $callback, $metadata)) {
|
|
||||||
$methods[] = $code;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return implode("\n\n", $methods);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
$methods = [];
|
||||||
|
|
||||||
|
foreach ($metadata->lifecycleCallbacks as $name => $callbacks) {
|
||||||
|
foreach ($callbacks as $callback) {
|
||||||
|
$methods[] = $this->generateLifecycleCallbackMethod($name, $callback, $metadata);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return implode("\n\n", array_filter($methods));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user