- Some bugfixes were made, added a new diff before saving results. Also, a new method was added for insert, update and delete respectively for other drivers to override as needed
This commit is contained in:
1 parent
58afe841e7
commit
dc5e088551
7 files changed
+111
-29
No files matched your search
@@ -125,18 +125,20 @@ class EntityResolver {
|
||||
return null;
|
||||
}
|
||||
|
||||
public function searchFieldAnnotation(string $field, Annotation $annotationType) : ? Annotation
|
||||
public function searchFieldAnnotation(string $field, Annotation $annotationType, bool $caseSensitive = true) : ? Annotation
|
||||
{
|
||||
$found = $this->searchFieldAnnotationList($field, $annotationType);
|
||||
$found = $this->searchFieldAnnotationList($field, $annotationType, $caseSensitive);
|
||||
return $found ? $found[0] : null;
|
||||
}
|
||||
|
||||
public function searchFieldAnnotationList(string $field, Annotation $annotationType) : array
|
||||
public function searchFieldAnnotationList(string $field, Annotation $annotationType, bool $caseSensitive = true) : array
|
||||
{
|
||||
$list = [];
|
||||
|
||||
if ( null !== ( $this->properties[$field] ?? null ) ) {
|
||||
foreach($this->properties[$field]['tags'] ?? [] as $tag) {
|
||||
|
||||
$search = $caseSensitive ? $this->properties : array_change_key_case($this->properties, \CASE_LOWER);
|
||||
|
||||
if ( null !== ( $search[$field] ?? null ) ) {
|
||||
foreach($search[$field]['tags'] ?? [] as $tag) {
|
||||
if ( $tag['object'] instanceof $annotationType ) {
|
||||
$list[] = $tag['object'];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user