class CacheAdminController extends BaseAdminController

The UsersAdminController class is the controller that handles all actions of the symfony cache management interface.

These actions are:

  • Display cache management interface
  • cleaning the production environment cache
  • cleaning the admin environment cache
  • cleaning the development environment cache
  • cleaning the test environment cache

Properties

ControllersHelper $helper from BaseAdminController
string $databasesDir from BaseAdminController
string $simulatorsDir from BaseAdminController
string $publicDir from BaseAdminController
string $viewsDir from BaseAdminController
private array $log

Methods

Response
errorResponse(array $form, string $error)

Returns a JSON response formed with the data of a form and an error message.

zip(array $contents)

Zip file creation function.

int
unix2DosTime(int $unixtime)

Converts unix time to MS DOS time

Response
clearAction(Request $request, string $env = 'prod')

Entry point for the route paths begining by /admin/cache/clear

Response
runClear(Request $request, string $env)

Processes the clear action

void
rrmdir(string $dir, int $level)

Recursively removes a directory and its subdirectories

void
cc(string $cache_dir, string $name)

Realizes the cleaning of the cache

Details

in BaseAdminController at line 93
protected Response errorResponse(array $form, string $error)

Returns a JSON response formed with the data of a form and an error message.

Parameters

array $form The form fields
string $error The error message

Return Value

Response

in BaseAdminController at line 113
protected zip(array $contents)

Zip file creation function.

Makes zip files. Derivated from PhpMyAdmin package The $contents parameter is an array of associative array where keys are : - name: name of the zip - modtime: modification time - data: data to compress

Parameters

array $contents The array of contents to be compressed

See also

Official ZIP file format: https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT

in BaseAdminController at line 188
protected int unix2DosTime(int $unixtime)

Converts unix time to MS DOS time

Parameters

int $unixtime (default: 0) The unix time

Return Value

int The MS DOS time

at line 79
Response clearAction(Request $request, string $env = 'prod')

Entry point for the route paths begining by /admin/cache/clear

These route paths are :

  • /admin/cache/clear
  • /admin/cache/clear/{env}

Parameters

Request $request The request
string $env (default: 'prod') The environment to clear (prod, test, dev, admin)

Return Value

Response The response object

at line 94
protected Response runClear(Request $request, string $env)

Processes the clear action

Parameters

Request $request The request
string $env (default: 'prod') The environment to clear (prod, test, dev, admin)

Return Value

Response The response object

at line 146
private void rrmdir(string $dir, int $level)

Recursively removes a directory and its subdirectories

Parameters

string $dir Directory to remove
int $level Level of this directory

Return Value

void

at line 176
private void cc(string $cache_dir, string $name)

Realizes the cleaning of the cache

Parameters

string $cache_dir The Symfony cache directory
string $name name of the environment (prod, admin, test or dev)

Return Value

void