Skip to content

Instantly share code, notes, and snippets.

@skurfuerst
Created November 3, 2011 07:52
Show Gist options
  • Save skurfuerst/1335999 to your computer and use it in GitHub Desktop.
Save skurfuerst/1335999 to your computer and use it in GitHub Desktop.
class Repository implements \TYPO3\FLOW3\Persistence\RepositoryInterface {
/**
* @var \TYPO3\FLOW3\Persistence\PersistenceManagerInterface
*/
protected $persistenceManager;
/**
* Warning: if you think you want to set this,
* look at RepositoryInterface::ENTITY_CLASSNAME first!
*
* @var string
*/
protected $entityClassName;
/**
* @var array
*/
protected $defaultOrderings = array();
/**
* Initializes a new Repository.
*/
public function __construct() {
if (static::ENTITY_CLASSNAME === NULL) {
$this->entityClassName = str_replace(array('\\Repository\\', 'Repository'), array('\\Model\\', ''), get_class($this));
} else {
$this->entityClassName = static::ENTITY_CLASSNAME;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment