@@ -18,9 +18,6 @@ |
||
18 | 18 | |
19 | 19 | /** |
20 | 20 | * @param string $command The command |
21 | - * @param boolean $throwException If true, an Exception will be thrown on a nonzero error code |
|
22 | - * @param boolean $returnOutput If true, output will be captured |
|
23 | - * @param boolean $inputContent Content for STDIN. Otherwise the parent script's STDIN is used |
|
24 | 21 | * @return A map containing 'return', 'output', and 'error' |
25 | 22 | */ |
26 | 23 | function execLocal($command, $options = array()) { |
@@ -22,6 +22,10 @@ discard block |
||
22 | 22 | function isLocal() { |
23 | 23 | return $this->server == null; |
24 | 24 | } |
25 | + |
|
26 | + /** |
|
27 | + * @return string|null |
|
28 | + */ |
|
25 | 29 | function getPath() { |
26 | 30 | return $this->path; |
27 | 31 | } |
@@ -52,7 +56,6 @@ discard block |
||
52 | 56 | |
53 | 57 | /** |
54 | 58 | * Upload a file to the given destination on the server |
55 | - * @param string $file The file to upload |
|
56 | 59 | * @param string $dest The remote filename/dir to upload to |
57 | 60 | */ |
58 | 61 | function upload($source, $dest) { |
@@ -234,6 +234,11 @@ discard block |
||
234 | 234 | return true; |
235 | 235 | } |
236 | 236 | |
237 | + /** |
|
238 | + * @param Webroot $webroot |
|
239 | + * @param SSPakFile $sspak |
|
240 | + * @param string $filename |
|
241 | + */ |
|
237 | 242 | function getassets($webroot, $assetsPath, $sspak, $filename) { |
238 | 243 | $assetsParentArg = escapeshellarg(dirname($assetsPath)); |
239 | 244 | $assetsBaseArg = escapeshellarg(basename($assetsPath)); |
@@ -242,6 +247,11 @@ discard block |
||
242 | 247 | $sspak->writeFileFromProcess($filename, $process); |
243 | 248 | } |
244 | 249 | |
250 | + /** |
|
251 | + * @param Webroot $webroot |
|
252 | + * @param SSPakFile $sspak |
|
253 | + * @param string $gitRemoteFile |
|
254 | + */ |
|
245 | 255 | function getgitremote($webroot, $sspak, $gitRemoteFile) { |
246 | 256 | // Only do anything if we're copying from a git checkout |
247 | 257 | $gitRepo = $webroot->getPath() .'/.git'; |
@@ -6,6 +6,9 @@ discard block |
||
6 | 6 | protected $pharAlias; |
7 | 7 | protected $pharPath; |
8 | 8 | |
9 | + /** |
|
10 | + * @param Executor $executor |
|
11 | + */ |
|
9 | 12 | function __construct($path, $executor, $pharAlias = 'sspak.phar') { |
10 | 13 | parent::__construct($path, $executor); |
11 | 14 | if(!$this->isLocal()) throw new LogicException("Can't manipulate remote .sspak.phar files, only remote webroots."); |
@@ -73,6 +76,7 @@ discard block |
||
73 | 76 | |
74 | 77 | /** |
75 | 78 | * Returns the content of a file from this sspak |
79 | + * @param string $file |
|
76 | 80 | */ |
77 | 81 | function content($file) { |
78 | 82 | return file_get_contents($this->phar[$file]); |
@@ -105,7 +109,7 @@ discard block |
||
105 | 109 | /** |
106 | 110 | * Return a writeable stream corresponding to the given file within the .sspak |
107 | 111 | * @param string $filename The name of the file within the .sspak |
108 | - * @return Stream context |
|
112 | + * @return resource context |
|
109 | 113 | */ |
110 | 114 | function writeStreamForFile($filename) { |
111 | 115 | return fopen('phar://' . $this->pharAlias . '/' . $filename, 'w'); |
@@ -114,7 +118,7 @@ discard block |
||
114 | 118 | /** |
115 | 119 | * Return a readable stream corresponding to the given file within the .sspak |
116 | 120 | * @param string $filename The name of the file within the .sspak |
117 | - * @return Stream context |
|
121 | + * @return resource context |
|
118 | 122 | */ |
119 | 123 | function readStreamForFile($filename) { |
120 | 124 | // Note: using pharAlias here doesn't work on Debian Wheezy (nor on Windows for that matter). |
@@ -66,9 +66,8 @@ discard block |
||
66 | 66 | |
67 | 67 | /** |
68 | 68 | * Put the database from the given sspak file into this webroot. |
69 | - * @param array $details The previously sniffed details of this webroot |
|
70 | 69 | * @param bool $dropdb Drop the DB prior to install |
71 | - * @param string $sspakFile Filename |
|
70 | + * @param SSPakFile $sspak Filename |
|
72 | 71 | */ |
73 | 72 | function putdb($sspak, $dropdb) { |
74 | 73 | $details = $this->details(); |
@@ -131,6 +130,9 @@ discard block |
||
131 | 130 | fclose($stream); |
132 | 131 | } |
133 | 132 | |
133 | + /** |
|
134 | + * @param SSPakFile $sspak |
|
135 | + */ |
|
134 | 136 | function putassets($sspak) { |
135 | 137 | $details = $this->details(); |
136 | 138 | $assetsPath = $details['assets_path']; |