Skip to content

Instantly share code, notes, and snippets.

@adatta02
Last active December 11, 2015 01:58
Show Gist options
  • Save adatta02/4526986 to your computer and use it in GitHub Desktop.
Save adatta02/4526986 to your computer and use it in GitHub Desktop.
<?php
class <className> extends EntityRepository
{
}';
public function generateEntityRepositoryClass($fullClassName)
{
$namespace = $fullClassName->substr($fullClassName->pos('\\'));
$className = $fullClassName->substr($fullClassName->pos('\\') + 1, $fullClassName->length());
$variables = array(
'<namespace>' => $namespace,
'<className>' => $className
);
return self::$_template->replace($variables->keys(), $variables->values());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment