File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55use Doctrine \ORM \EntityManager ;
66use Doctrine \ORM \EntityManagerInterface ;
77use PDO ;
8+ use Symfony \Component \Console \Output \OutputInterface ;
89use Tapestry \Entities \Collections \FlatCollection ;
910use Tapestry \Entities \Project ;
1011use Doctrine \DBAL \Connection ;
1112use Tapestry \Modules \ContentTypes \ContentTypeFactory ;
13+ use Tapestry \Tapestry ;
1214use TapestryCloud \Database \Entities \ContentType ;
1315use TapestryCloud \Database \Entities \Environment ;
1416use TapestryCloud \Database \Entities \File ;
@@ -21,18 +23,27 @@ class Exporter {
2123 * @var EntityManagerInterface|EntityManager
2224 */
2325 private $ entityManager ;
26+ /**
27+ * @var OutputInterface
28+ */
29+ private $ output ;
2430
2531 /**
2632 * Exporter constructor.
2733 * @param EntityManagerInterface $entityManager
28- * @throws \Exception
34+ * @param Tapestry $tapestry
2935 */
30- public function __construct (EntityManagerInterface $ entityManager )
36+ public function __construct (EntityManagerInterface $ entityManager, Tapestry $ tapestry )
3137 {
3238 $ this ->entityManager = $ entityManager ;
39+ $ this ->output = $ tapestry ->getContainer ()->get (OutputInterface::class);
40+
3341 }
3442
3543 public function export (Project $ project ) {
44+
45+ $ this ->output ->writeln ('[$] Syncing with database. ' );
46+
3647 /** @var FlatCollection $files */
3748 $ files = $ project ->get ('files ' );
3849
You can’t perform that action at this time.
0 commit comments