Introduce Repository, Factory, Collection, Model base classes
This commit is contained in:
22
src/BaseFactory.php
Normal file
22
src/BaseFactory.php
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user