Skip to content

Commit 206bb70

Browse files
authored
Merge pull request #1 from sobolevna/master
Немного блоков документации для среды разработки
2 parents 64213cc + 106b81f commit 206bb70

File tree

4 files changed

+73
-1
lines changed

4 files changed

+73
-1
lines changed

src/PHPixie/CLI.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ public function __construct($contextContainer = null)
1414
$this->builder = $this->buildBuilder($contextContainer);
1515
}
1616

17+
/**
18+
*
19+
* @return \PHPixie\CLI\Context\SAPI
20+
*/
1721
public function context()
1822
{
1923
return $this->builder->context();
@@ -24,6 +28,11 @@ public function buildSapiContext()
2428
return $this->builder->buildSapiContext();
2529
}
2630

31+
/**
32+
*
33+
* @param type $contextContainer
34+
* @return \PHPixie\CLI\Builder
35+
*/
2736
protected function buildBuilder($contextContainer)
2837
{
2938
return new CLI\Builder($contextContainer);

src/PHPixie/CLI/Builder.php

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,50 @@
44

55
class Builder
66
{
7+
/**
8+
*
9+
* @var \PHPixie\CLI\Context\Container\Implementation
10+
*/
711
protected $contextContainer;
812

913
public function __construct($contextContainer = null)
1014
{
1115
$this->contextContainer = $contextContainer;
1216
}
1317

18+
/**
19+
*
20+
* @param string $resource
21+
* @return \PHPixie\CLI\Stream\Input
22+
*/
1423
public function inputStream($resource)
1524
{
1625
return new Stream\Input($resource);
1726
}
1827

28+
/**
29+
*
30+
* @param string $resource
31+
* @return \PHPixie\CLI\Stream\Output
32+
*/
1933
public function outputStream($resource)
2034
{
2135
return new Stream\Output($resource);
2236
}
2337

38+
/**
39+
*
40+
* @return \PHPixie\CLI\Context\SAPI
41+
*/
2442
public function context()
2543
{
2644
return $this->contextContainer()->cliContext();
2745
}
2846

47+
/**
48+
*
49+
* @return \PHPixie\CLI\Context\Container\Implementation
50+
*/
2951
public function contextContainer()
3052
{
3153
if($this->contextContainer === null) {
@@ -36,11 +58,20 @@ public function contextContainer()
3658
return $this->contextContainer;
3759
}
3860

61+
/**
62+
*
63+
* @param \PHPixie\CLI\Context\SAPI $context
64+
* @return \PHPixie\CLI\Context\Container\Implementation
65+
*/
3966
public function buildContextContainer($context)
4067
{
4168
return new \PHPixie\CLI\Context\Container\Implementation($context);
4269
}
4370

71+
/**
72+
*
73+
* @return \PHPixie\CLI\Context\SAPI
74+
*/
4475
public function buildSapiContext()
4576
{
4677
return new Context\SAPI($this);

src/PHPixie/CLI/Context/Container/Implementation.php

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

55
class Implementation implements \PHPixie\CLI\Context\Container
66
{
7+
/**
8+
*
9+
* @var \PHPixie\CLI\Context\SAPI
10+
*/
711
protected $cliContext;
8-
12+
13+
/**
14+
*
15+
* @param \PHPixie\CLI\Context\SAPI $cliContext
16+
*/
917
public function __construct($cliContext)
1018
{
1119
$this->cliContext = $cliContext;
1220
}
1321

22+
/**
23+
*
24+
* @return \PHPixie\CLI\Context\SAPI
25+
*/
1426
public function cliContext()
1527
{
1628
return $this->cliContext;

src/PHPixie/CLI/Context/SAPI.php

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

55
class SAPI implements \PHPixie\CLI\Context
66
{
7+
/**
8+
*
9+
* @var \PHPixie\CLI\Builder
10+
*/
711
protected $builder;
812

913
protected $inputStream;
@@ -17,11 +21,19 @@ class SAPI implements \PHPixie\CLI\Context
1721

1822
protected $exitCode;
1923

24+
/**
25+
*
26+
* @param \PHPixie\CLI\Builder $builder
27+
*/
2028
public function __construct($builder)
2129
{
2230
$this->builder = $builder;
2331
}
2432

33+
/**
34+
*
35+
* @return \PHPixie\CLI\Stream\Input
36+
*/
2537
public function inputStream()
2638
{
2739
if($this->inputStream === null) {
@@ -31,6 +43,10 @@ public function inputStream()
3143
return $this->inputStream;
3244
}
3345

46+
/**
47+
*
48+
* @return \PHPixie\CLI\Stream\Output
49+
*/
3450
public function outputStream()
3551
{
3652
if($this->outputStream === null) {
@@ -40,6 +56,10 @@ public function outputStream()
4056
return $this->outputStream;
4157
}
4258

59+
/**
60+
*
61+
* @return \PHPixie\CLI\Stream\Output
62+
*/
4363
public function errorStream()
4464
{
4565
if($this->errorStream === null) {

0 commit comments

Comments
 (0)