Ich habe die Klassendatei ex: Stats.php, wenn ich ein Array mit Informationen von einer anderen Methode in einer anderen Anwendung und Klassendatei ex: Information.php geben möchte.Aufruf einer Methode aus einer anderen Klasse in einer anderen Anwendung mit FOSTRestBundle in Symfony
Datei stats.php
public function getStats()
{
$myInformations = // here i want to get information from Information.php
.
.
.
return $myInformations;
}
In anderer Anwendung. Datei Informations.php
/**
* Get all locales
* @FOS\View()
* @FOS\Get("/locales")
* @param ParamFetcherInterface $paramFetcher
* @return mixed
*/
public function getLocales(ParamFetcherInterface $paramFetcher)
{
.
.
.
return $locales;
}
Wie ich Funktion getLocales von URL-Aufruf: http://myhost.com/api/locales in Funktion getStatus()?
Entschlossen mit GuzzleBundle. –