Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

Commit

Permalink
Update Reflection.php
Browse files Browse the repository at this point in the history
  • Loading branch information
rez1dent3 committed Apr 12, 2017
1 parent e8556dd commit 58928d0
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/ORM/Reflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,14 @@ public function getTableName($class)
return $class;
}

$refProperty = $this->getProperty($class, 'tableName');
$reflectionClass = new \ReflectionClass($class);
// $refProperty = $this->getProperty($class, 'tableName');

$this->tableList[$class] = $refProperty->getValue(new $class(null));
$ref = $reflectionClass
->getProperty('tableName');
$ref->setAccessible(true);

$this->tableList[$class] = $ref->getValue(new $class(null));

if (!$this->tableList[$class])
{
Expand Down Expand Up @@ -143,4 +148,4 @@ public function setState(Entity $object, $state)
$refObject->setValue($object, $state);
}

}
}

0 comments on commit 58928d0

Please sign in to comment.