HosipLan

Untitled

May 25th, 2011
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. class ModelFactory extends Nette\Object
  2. {
  3.  
  4.     public static function createServiceArticles(Nette\DI\Container $container)
  5.     {
  6.         $em = $container->doctrine->entityManager;
  7.         return new Articles($em->getRepository('Article'), $container->fileStorage);
  8.     }
  9.  
  10. }
  11.  
  12.  
  13. class Articles extends Nette\Object
  14. {
  15.  
  16.     public function __construct(Doctrine\ORM\EntityRepository $repository, Nette\Caching\Storages\IStorage $fileStorage)
  17.     {
  18.  
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment