Bouncy Melons 0.2
declarative style orm
AutoList.php
Go to the documentation of this file.
1 <?php
2 
3 namespace bm;
4 
5 class AutoList extends DataList implements IList {
6 
7 // protected $vmodel;
8 //
9 // public function __construct(IVModel $vmodel) {
10 // $this->vmodel = $vmodel;
11 // }
12 
13  public function createSingle() {
14  if(method_exists($this->vmodel, 'createSingle')) {
15  return $this->vmodel->createSingle();
16  }
17  return new AutoSingle($this);
18  }
19 
20  public function declareFields() {
21  return $this->vmodel->declareFields();
22  }
23 
24  public function declareView() {
25  if(method_exists($this->vmodel, 'declareView')) {
26  return $this->vmodel->declareView();
27  }
28  return parent::declareView();
29  }
30 
31 
32 // public function getBm() {
33 // return $this->vmodel->getBm();
34 // }
35 
36  public function getTableName() {
37  return $this->vmodel->getTableName();
38  }
39 
40  public function getSlug() {
41  return $this->vmodel->getSlug();
42  }
43 
44  public function parentCreateFieldsToSelect($prefix='') {
45  return parent::createFieldsToSelect($prefix);
46  }
47 
48 
49  public function createFieldsToSelect($prefix = '') {
50  if(method_exists($this->vmodel, 'createFieldsToSelect')) {
51  return $this->vmodel->createFieldsToSelect($prefix);
52  }
53  return $this->parentCreateFieldsToSelect($prefix);
54  }
55 
56 }
parentCreateFieldsToSelect($prefix='')
Definition: AutoList.php:44
createFieldsToSelect($prefix= '')
Definition: AutoList.php:49
getTableName()
Definition: AutoList.php:36
declareFields()
Definition: AutoList.php:20
createSingle()
Definition: AutoList.php:13