protected static function buildPointers(MetaClass $class) { $out = null; if (!$class->getPattern() instanceof AbstractClassPattern) { if ($source = $class->getSourceLink()) { $out .= <<<EOT \tprotected \$linkName = '{$source}'; \t EOT; } if ($class->getIdentifier()->getColumnName() !== 'id') { $out .= <<<EOT public function getIdName() { \treturn '{$class->getIdentifier()->getColumnName()}'; } EOT; } $fullClassName = MetaClassNameBuilder::getClassOfMetaClass($class, true); $out .= <<<EOT public function getTable() { \treturn '{$class->getTableName()}'; } public function getObjectName() { \treturn '{$fullClassName}'; } EOT; if ($class->isSequenceless()) { $out .= <<<EOT public function getSequence() { \tthrow new \\Hesper\\Core\\Exception\\UnimplementedFeatureException(); } EOT; } else { $out .= <<<EOT public function getSequence() { \treturn '{$class->getTableName()}_id'; } EOT; } } elseif ($class->getWithInternalProperties()) { $out .= <<<EOT // no get{Table,ObjectName,Sequence} for abstract class EOT; } if ($liaisons = $class->getReferencingClasses()) { $uncachers = []; foreach ($liaisons as $className) { $uncachers[] = $className . '::dao()->uncacheLists();'; } $uncachers = implode("\n", $uncachers); $out .= <<<EOT public function uncacheLists() { {$uncachers} return parent::uncacheLists(); } EOT; } return $out; }