mirror of
https://github.com/friendica/friendica
synced 2025-04-22 17:50:11 +00:00
Introduce Repository, Factory, Collection, Model base classes
This commit is contained in:
parent
ef6e9ef26b
commit
c748a82e8f
4 changed files with 291 additions and 26 deletions
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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue