private function getRestClassHelper(EntityClass $entitlyClass) { $class = $entitlyClass->getEntity(); $a = explode('\\', get_class($class)); return $a[sizeof($a) - 1]; }
private function getColumns(EntityClass $entityWrapper) { $columns = array(); foreach ($entityWrapper->getClassMetadata()->getColumnNames() as $column) { $columnModel = new ColumnModel(); $getMethod = 'get' . str_replace(' ', '', ucwords(str_replace('_', ' ', $column))); if (method_exists($entityWrapper->getEntity(), $getMethod)) { $columnModel->setSingularName($column); $columnModel->setGetMethod($getMethod); } $columns[] = $columnModel; } return $columns; }