I have Symfony project and i would like to implement this in Symfony route. Not really easy now.
This is where i am now and it works (except of assets which can be symlinked) relative good. But all header links are pointing to /index.php?....
Workaround can be to create own class which extends "App" and use own getDefaultTemplateVariables() fuction.
<?php
namespace App\Controller;
use Clickalicious\Memcached\Client;
use Clickalicious\PhpMemAdmin\App;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class MemcacheController extends AbstractController
{
/**
* @Route(
* "/memcache",
* name = "memcache"
* );
*/
public function memcachePage(Request $request)
{
define(
'CLICKALICIOUS_PHPMEMADMIN_BASE_PATH',
'/var/www/vendor/clickalicious/phpMemAdmin/'
);
$config_path = '../vendor/clickalicious/phpMemAdmin/app/.config.dist';
$config = json_decode(file_get_contents($config_path));
$config->cluster->hosts[0]->host = 'memcached';
$config->render->auto = false;
$client = new Client();
$memcache = new App($config, $client);
return new Response($memcache->render($_SERVER['SCRIPT_NAME'], $_GET));
}
}
I have Symfony project and i would like to implement this in Symfony route. Not really easy now.
This is where i am now and it works (except of assets which can be symlinked) relative good. But all header links are pointing to /index.php?....
Workaround can be to create own class which extends "App" and use own getDefaultTemplateVariables() fuction.