This repository has been archived on 2026-07-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
espocrm-base/application/Espo/Core/Base/RecordService.php
T
2013-11-15 17:36:28 +02:00

68 lines
944 B
PHP

<?php
namespace Espo\Core\Base;
abstract class RecordService
{
public static $dependencies = array(
'config',
'entityManager',
'datetime',
);
private $config;
private $entityManager;
private $datetime;
public function setConfig($config)
{
$this->config = $config;
}
protected function getConfig()
{
return $this->config;
}
public function setEntityManager($entityManager)
{
$this->entityManager = $entityManager;
}
protected function getEntityManager()
{
return $this->entityManager;
}
public function setDatetime($datetime)
{
$this->datetime = $datetime;
}
protected function getDatetime()
{
return $this->datetime;
}
protected function fetch($id)
{
return $this->getEntityManager()->findById($id);
}
protected function save($entity)
{
$this->getEntityManager()->save($entity);
}
protected function findAssociated($entity, $link)
{
return array();
}
}