- 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:
1 parent
b589ba3c2b
commit
9df7e65dcf
10 files changed
+139
-31
No files matched your search
@@ -57,18 +57,18 @@ class ObjectReflection {
|
||||
if ( $parentClass = $this->classReflection->getParentClass() ) {
|
||||
$class = static::fromClass($parentClass)->gatherClass(true);
|
||||
}
|
||||
|
||||
|
||||
$itemName = function($item) {
|
||||
return $item->getName();
|
||||
};
|
||||
}
|
||||
|
||||
return [
|
||||
'tags' => array_merge($class, $this->annotationReader->getClass($this->classReflection))
|
||||
return array_merge_recursive($class, [
|
||||
'tags' => $this->annotationReader->getClass($this->classReflection)
|
||||
] + ( ! $full ? [] : [
|
||||
'traits' => array_map($itemName, $this->classReflection->getTraits()),
|
||||
'interfaces' => array_map($itemName, $this->classReflection->getInterfaces()),
|
||||
]);
|
||||
]));
|
||||
}
|
||||
|
||||
public function gatherProperties(bool $full = true, int $filter =
|
||||
@@ -86,11 +86,9 @@ class ObjectReflection {
|
||||
}
|
||||
}
|
||||
|
||||
$properties = array_merge($properties, $this->classReflection->getProperties($filter));
|
||||
|
||||
$list = [];
|
||||
|
||||
foreach($properties as $property) {
|
||||
foreach($this->classReflection->getProperties($filter) as $property) {
|
||||
$current = [
|
||||
'name' => $property->getName()
|
||||
];
|
||||
@@ -111,10 +109,10 @@ class ObjectReflection {
|
||||
continue;
|
||||
}
|
||||
|
||||
$list[ $current['name'] ] = $current;
|
||||
$list[ $current['name'] ] = $current;
|
||||
}
|
||||
|
||||
return $list;
|
||||
return array_merge($properties, $list);
|
||||
}
|
||||
|
||||
public function gatherMethods(bool $full = true, int $filter =
|
||||
@@ -131,12 +129,10 @@ class ObjectReflection {
|
||||
$methods = static::fromClass($parentClass)->gatherMethods($full, $filter);
|
||||
}
|
||||
}
|
||||
|
||||
$methods = array_merge($methods, $this->classReflection->getMethods($filter));
|
||||
|
||||
foreach($methods as $method) {
|
||||
|
||||
foreach($this->classReflection->getMethods($filter) as $method) {
|
||||
$parameters = [];
|
||||
|
||||
|
||||
foreach($method->getParameters() as $parameter) {
|
||||
$parameters[$parameter->getName()] = [
|
||||
'null' => $parameter->allowsNull(),
|
||||
@@ -166,7 +162,7 @@ class ObjectReflection {
|
||||
$list[ $current['name'] ] = $current;
|
||||
}
|
||||
|
||||
return $list;
|
||||
return array_merge($methods, $list);
|
||||
}
|
||||
|
||||
protected function ignoreElementAnnotation($tags) : bool
|
||||
|
||||
Reference in new issue
Block a user