Skip to content

Commit b9f6c9b

Browse files
committed
PHPDoc
1 parent 4607b6f commit b9f6c9b

File tree

22 files changed

+317
-43
lines changed

22 files changed

+317
-43
lines changed

src/PHPixie/ORM.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
class ORM
66
{
7+
/**
8+
* @type ORM\Builder
9+
*/
710
protected $builder;
811

912
public function __construct($database, $configSlice, $wrappers = null)

src/PHPixie/ORM/Builder.php

Lines changed: 63 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
class Builder
66
{
7+
/**
8+
* @type \PHPixie\Database
9+
*/
710
protected $database;
811
protected $configSlice;
912
protected $wrappers;
@@ -16,76 +19,121 @@ public function __construct($database, $configSlice, $wrappers = null)
1619
$this->configSlice = $configSlice;
1720
$this->wrappers = $wrappers;
1821
}
19-
22+
23+
/**
24+
* @return Conditions
25+
*/
2026
public function conditions()
2127
{
2228
return $this->instance('conditions');
2329
}
24-
30+
31+
/**
32+
* @return Configs
33+
*/
2534
public function configs()
2635
{
2736
return $this->instance('configs');
2837
}
29-
38+
39+
/**
40+
* @return Data
41+
*/
3042
public function data()
3143
{
3244
return $this->instance('data');
3345
}
34-
46+
47+
/**
48+
* @return Database
49+
*/
3550
public function database()
3651
{
3752
return $this->instance('database');
3853
}
39-
54+
55+
/**
56+
* @return Drivers
57+
*/
4058
public function drivers()
4159
{
4260
return $this->instance('drivers');
4361
}
44-
62+
63+
/**
64+
* @return Loaders
65+
*/
4566
public function loaders()
4667
{
4768
return $this->instance('loaders');
4869
}
49-
70+
71+
/**
72+
* @return Mappers
73+
*/
5074
public function mappers()
5175
{
5276
return $this->instance('mappers');
5377
}
54-
78+
79+
/**
80+
* @return Maps
81+
*/
5582
public function maps() {
5683
return $this->instance('maps');
5784
}
58-
85+
86+
/**
87+
* @return Models
88+
*/
5989
public function models()
6090
{
6191
return $this->instance('models');
6292
}
63-
93+
94+
/**
95+
* @return Planners
96+
*/
6497
public function planners()
6598
{
6699
return $this->instance('planners');
67100
}
68-
101+
102+
/**
103+
* @return Plans
104+
*/
69105
public function plans()
70106
{
71107
return $this->instance('plans');
72108
}
73-
109+
110+
/**
111+
* @return Relationships
112+
*/
74113
public function relationships()
75114
{
76115
return $this->instance('relationships');
77116
}
78-
117+
118+
/**
119+
* @return Repositories
120+
*/
79121
public function repositories()
80122
{
81123
return $this->instance('repositories');
82124
}
83-
125+
126+
/**
127+
* @return Steps
128+
*/
84129
public function steps()
85130
{
86131
return $this->instance('steps');
87132
}
88-
133+
134+
/**
135+
* @return Values
136+
*/
89137
public function values()
90138
{
91139
return $this->instance('values');

src/PHPixie/ORM/Conditions.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
class Conditions
66
{
7+
/**
8+
* @type \PHPixie\ORM\Builder
9+
*/
710
protected $ormBuilder;
811

912
public function __construct($ormBuilder)

src/PHPixie/ORM/Data.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
namespace PHPixie\ORM;
44

55
class Data {
6-
6+
/**
7+
* @type \PHPixie\ORM\Data\Types\Document\Builder
8+
*/
79
protected $documentBuilder;
810

911
public function diff($set)

src/PHPixie/ORM/Database.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,20 @@
44

55
class Database
66
{
7+
/**
8+
* @type \PHPixie\Database
9+
*/
710
protected $database;
811

912
public function __construct($database)
1013
{
1114
$this->database = $database;
1215
}
13-
16+
17+
/**
18+
* @param $name
19+
* @return \PHPixie\Database\Driver\PDO\Connection|\PHPixie\Database\Driver\Mongo\Connection
20+
*/
1421
public function connection($name)
1522
{
1623
return $this->database->get($name);

src/PHPixie/ORM/Drivers.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
class Drivers
66
{
7+
/**
8+
* @type \PHPixie\ORM\Builder
9+
*/
710
protected $ormBuilder;
811
protected $drivers = array();
912

@@ -16,7 +19,12 @@ public function __construct($ormBuilder)
1619
{
1720
$this->ormBuilder = $ormBuilder;
1821
}
19-
22+
23+
/**
24+
* @param $name
25+
* @return \PHPixie\ORM\Drivers\Driver\PDO|\PHPixie\ORM\Drivers\Driver\Mongo
26+
*
27+
*/
2028
public function get($name)
2129
{
2230
if (!array_key_exists($name, $this->drivers))

src/PHPixie/ORM/Drivers/Driver.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,37 @@
44

55
abstract class Driver
66
{
7+
/**
8+
* @type \PHPixie\ORM\Configs
9+
*/
710
protected $configs;
11+
/**
12+
* @type \PHPixie\ORM\Conditions
13+
*/
814
protected $conditions;
15+
/**
16+
* @type \PHPixie\ORM\Data
17+
*/
918
protected $data;
19+
/**
20+
* @type \PHPixie\ORM\Database
21+
*/
1022
protected $database;
23+
/**
24+
* @type \PHPixie\ORM\Models
25+
*/
1126
protected $models;
27+
/**
28+
* @type \PHPixie\ORM\Maps
29+
*/
1230
protected $maps;
31+
/**
32+
* @type \PHPixie\ORM\Mappers
33+
*/
1334
protected $mappers;
35+
/**
36+
* @type \PHPixie\ORM\Values
37+
*/
1438
protected $values;
1539

1640
public function __construct($configs, $conditions, $data, $database, $models, $maps, $mappers, $values)

src/PHPixie/ORM/Loaders.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
class Loaders
66
{
7+
/**
8+
* @type \PHPixie\ORM\Builder
9+
*/
710
protected $ormBuilder;
811

912
public function __construct($ormBuilder)

src/PHPixie/ORM/Mappers.php

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,49 +4,76 @@
44

55
class Mappers
66
{
7+
/**
8+
* @type \PHPixie\ORM\Builder
9+
*/
710
protected $ormBuilder;
811
protected $instances = array();
912

1013
public function __construct($ormBuilder)
1114
{
1215
$this->ormBuilder = $ormBuilder;
1316
}
14-
17+
18+
/**
19+
* @return \PHPixie\ORM\Mappers\Query
20+
*/
1521
public function query()
1622
{
1723
return $this->instance('query');
1824
}
19-
25+
26+
/**
27+
* @return \PHPixie\ORM\Mappers\Conditions
28+
*/
2029
public function conditions()
2130
{
2231
return $this->instance('conditions');
2332
}
24-
33+
34+
/**
35+
* @return \PHPixie\ORM\Mappers\Conditions\Normalizer
36+
*/
2537
public function conditionsNormalizer()
2638
{
2739
return $this->instance('conditionsNormalizer');
2840
}
29-
41+
42+
/**
43+
* @return \PHPixie\ORM\Mappers\Conditions\Optimizer
44+
*/
3045
public function conditionsOptimizer()
3146
{
3247
return $this->instance('conditionsOptimizer');
3348
}
34-
49+
50+
/**
51+
* @return \PHPixie\ORM\Mappers\Preload
52+
*/
3553
public function preload()
3654
{
3755
return $this->instance('preload');
3856
}
39-
57+
58+
/**
59+
* @return \PHPixie\ORM\Mappers\Update
60+
*/
4061
public function update()
4162
{
4263
return $this->instance('update');
4364
}
44-
65+
66+
/**
67+
* @return \PHPixie\ORM\Mappers\Cascade\Mapper\Delete
68+
*/
4569
public function cascadeDelete()
4670
{
4771
return $this->instance('cascadeDelete');
4872
}
49-
73+
74+
/**
75+
* @return Mappers\Cascade\Path
76+
*/
5077
public function cascadePath()
5178
{
5279
return new \PHPixie\ORM\Mappers\Cascade\Path($this);

0 commit comments

Comments
 (0)