Elgg
Version master
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
engine
classes
Elgg
Cli
ResponseTransport.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Elgg\Cli
;
4
5
use
Symfony\Component\HttpFoundation\Response
;
6
10
class
ResponseTransport
implements
\Elgg\Http\ResponseTransport
{
11
12
private
$command;
13
19
public
function
__construct
(
Command
$command) {
20
$this->command = $command;
21
}
22
26
public
function
send
(Response
$response
) {
27
$content
= $response->getContent();
28
$json = @json_decode(
$content
);
29
$this->command->write(
elgg_echo
(
'cli:response:output'
) . PHP_EOL);
30
$this->command->dump($json ?:
$content
);
31
32
return
true
;
33
}
34
}
$response
$response
Definition:
content.php:10
Elgg\Cli\ResponseTransport\send
send(Response $response)
{}
Definition:
ResponseTransport.php:26
elgg_echo
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition:
languages.php:17
Response
Elgg\Http\ResponseTransport
HTTP response transport interface.
Definition:
ResponseTransport.php:13
Elgg\Cli\ResponseTransport
Cli ResponseTransport.
Definition:
ResponseTransport.php:10
Elgg\Cli\Command
Abstract command with some utility methods.
Definition:
Command.php:12
Elgg\Cli
Definition:
Application.php:3
$content
$content
Set robots.txt action.
Definition:
set_robots.php:6
Elgg\Cli\ResponseTransport\__construct
__construct(Command $command)
ResponseTransport constructor.
Definition:
ResponseTransport.php:19
Generated on Wed Dec 6 2023 00:01:59 for Elgg by
1.8.11