I want to do something with the returnedValue of a controller and action in phalcon here is my code:
public function afterExecuteRoute(Dispatcher $dispatcher){
$controllerName = $dispatcher->getControllerName();
$actionName = $dispatcher-> getActionName ();
$return = $dispatcher->getReturnedValue();
}
$return have this value:
Phalcon\Http\Response Object(
[_sent:protected] =>
[_content:protected] => "{\"_meta\":{\"status\":\"SUCCESS\",\"count\":2}}"
[_headers:protected] => Phalcon\Http\Response\Headers Object
(
[_headers:protected] => Array
(
[Content-Type] => application/json; charset=UTF-8
)
)
[_cookies:protected] =>
[_file:protected] =>
[_dependencyInjector:protected] =>
[_statusCodes:protected] =>
)
How can I get the _meta->status value if it says that
Cannot access protected property Phalcon\Http\Response::$_content