entity generator - ignore trait properties and methods
This commit is contained in:
parent
a4db7c8b42
commit
521276f1ed
1 changed files with 18 additions and 0 deletions
|
@ -709,6 +709,15 @@ public function __construct()
|
|||
}
|
||||
}
|
||||
|
||||
// check traits for existing property
|
||||
$reflClass = new \ReflectionClass($metadata->name);
|
||||
|
||||
foreach ($reflClass->getTraits() as $trait) {
|
||||
if ($trait->hasProperty($property)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
isset($this->staticReflection[$metadata->name]) &&
|
||||
in_array($property, $this->staticReflection[$metadata->name]['properties'])
|
||||
|
@ -732,6 +741,15 @@ public function __construct()
|
|||
}
|
||||
}
|
||||
|
||||
// check traits for existing method
|
||||
$reflClass = new \ReflectionClass($metadata->name);
|
||||
|
||||
foreach ($reflClass->getTraits() as $trait) {
|
||||
if ($trait->hasMethod($method)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
isset($this->staticReflection[$metadata->name]) &&
|
||||
in_array($method, $this->staticReflection[$metadata->name]['methods'])
|
||||
|
|
Loading…
Add table
Reference in a new issue