Tutorial Extension  1.0.0
SellerDeck Extensions - Tutorial Extension
CCatalogWrapper.php
1 <?php
2 
3 /**
4  * CCatalogWrapper.php - Implementation file for Catalog Wrapper class.
5  *
6  * Contains useful functions
7  *
8  * @package SellerDeck Extensions
9  *
10  * @author Péter Erdődi
11  * @copyright © SellerDeck Ltd 2015. All rights reserved.
12  */
13 
14 namespace SDExtension\DB\Wrapper;
15 
17  {
18 
19  /**
20  * @var object DataBase Object
21  */
22  protected $m_oDB = null;
23 
24  /**
25  * __construct - Object constructor method
26  *
27  * @access public
28  * @param object $oDB DataBase Object
29  * @return void
30  */
31  public function __construct(\SDExtension\DB\CDataBase $oDB)
32  {
33  $this->m_oDB = $oDB;
34  }
35 
36  /**
37  * ListCountries - Lists Countries
38  *
39  * @access public
40  * @return GeneratorObject
41  */
42  public function ListCountries()
43  {
44  foreach ($this->m_oDB->Select('countries') as $row)
45  {
46  yield $row;
47  }
48  }
49 
50  }
__construct(\SDExtension\DB\CDataBase $oDB)