- Work done on Repository and QueryBuilder -- fixed some minor bugs and added some delete() functions

- Added a generic SQL query function to PDOObject
This commit is contained in:
Dave Mc Nicoll committed 2019-12-19 09:54:33 -05:00
1 parent b589ba3c2b
commit 9df7e65dcf
10 files changed
+139 -31

No files matched your search

+7 -6
View File
@@ -9,6 +9,7 @@ use Ulmus\Annotation\Annotation,
class EntityResolver {
const KEY_ENTITY_NAME = 01;
const KEY_COLUMN_NAME = 02;
public string $entityClass;
@@ -51,7 +52,7 @@ class EntityResolver {
public function fieldList($fieldKey = self::KEY_ENTITY_NAME) : array
{
$fieldList = [];
foreach($this->properties as $item) {
foreach($item['tags'] ?? [] as $tag) {
if ( $tag['object'] instanceof Field ) {
@@ -73,7 +74,7 @@ class EntityResolver {
}
}
}
return $fieldList;
}
@@ -100,15 +101,15 @@ class EntityResolver {
*/
public function getAnnotationFromClassname(string $className) : ? object
{
if ( $name = $this->uses[$className] ?? false) {
if ( $name = $this->uses[$className] ?? false ) {
foreach($this->class['tags'] as $item) {
foreach(array_reverse($this->class['tags']) as $item) {
if ( $item['tag'] === $name ) {
return $this->instanciateAnnotationObject($item);
}
foreach($this->properties as $item) {
foreach($item['tags'] as $item) {
foreach(array_reverse($item['tags']) as $item) {
if ( $item['tag'] === $name ) {
return $this->instanciateAnnotationObject($item);
}
@@ -116,7 +117,7 @@ class EntityResolver {
}
foreach($this->methods as $item) {
foreach($item['tags'] as $item) {
foreach(array_reverse($item['tags']) as $item) {
if ( $item['tag'] === $name ) {
return $this->instanciateAnnotationObject($item);
}