11<?php
2-
3- namespace Blackbird \TeacherStudents \Model \ResourceModel ;
2+ /**
3+ * Blackbird Data Model Sample Module
4+ *
5+ * NOTICE OF LICENSE
6+ * If you did not receive a copy of the license and are unable to
7+ * obtain it through the world-wide-web, please send an email
8+ * to contact@bird.eu so we can send you a copy immediately.
9+ *
10+ * @category Blackbird
11+ * @package Blackbird_DataModelSample
12+ * @copyright Copyright (c) 2018 Blackbird (https://black.bird.eu)
13+ * @author Blackbird Team
14+ * @license MIT
15+ * @support help@bird.eu
16+ */
17+ namespace Blackbird \DataModelSample \Model \ResourceModel ;
418
519use Magento \Framework \EntityManager \EntityManager ;
620use Magento \Framework \EntityManager \MetadataPool ;
721use Magento \Framework \Model \AbstractModel ;
822use Magento \Framework \Model \ResourceModel \Db \AbstractDb ;
923use Magento \Framework \Model \ResourceModel \Db \Context ;
10- use Blackbird \TeacherStudents \Api \Data \StudentInterface ;
24+ use Blackbird \DataModelSample \Api \Data \StudentInterface ;
1125
1226/**
1327 * Class Student
14- * @package Blackbird\TeacherStudents \Model\ResourceModel
28+ * @package Blackbird\DataModelSample \Model\ResourceModel
1529 */
1630class Student extends AbstractDb
1731{
1832 /**
19- * @var MetadataPool
33+ * @var \Magento\Framework\EntityManager\ MetadataPool
2034 */
21- protected $ metadataPool ;
35+ private $ metadataPool ;
2236
2337 /**
24- * @var EntityManager
38+ * @var \Magento\Framework\EntityManager\ EntityManager
2539 */
26- protected $ entityManager ;
40+ private $ entityManager ;
2741
2842 /**
29- * Student constructor.
30- * @param Context $context
31- * @param MetadataPool $metadataPool
32- * @param null $connectionName
43+ * @param \Magento\Framework\Model\ResourceModel\Db\Context $context
44+ * @param \Magento\Framework\EntityManager\MetadataPool $metadataPool
45+ * @param \Magento\Framework\EntityManager\EntityManager $entityManager
46+ * @param string| null $connectionName
3347 */
3448 public function __construct (
3549 Context $ context ,
@@ -43,7 +57,7 @@ public function __construct(
4357 }
4458
4559 /**
46- * Set the table and the primary key
60+ * {@inheritdoc}
4761 */
4862 protected function _construct ()
4963 {
@@ -99,4 +113,4 @@ public function delete(\Magento\Framework\Model\AbstractModel $object)
99113 {
100114 $ this ->entityManager ->delete ($ object );
101115 }
102- }
116+ }
0 commit comments