Introduce Repository, Factory, Collection, Model base classes

This commit is contained in:
Hypolite Petovan 2020-01-05 17:26:51 -05:00
parent ef6e9ef26b
commit c748a82e8f
4 changed files with 291 additions and 26 deletions

22
src/BaseFactory.php Normal file
View file

@ -0,0 +1,22 @@
<?php
namespace Friendica;
use Psr\Log\LoggerInterface;
/**
* Factories act as an intermediary to avoid direct Entitiy instanciation.
*
* @see BaseModel
* @see BaseCollection
*/
abstract class BaseFactory
{
/** @var LoggerInterface */
protected $logger;
public function __construct(LoggerInterface $logger)
{
$this->logger = $logger;
}
}