Garak plugin for CakePHP3

Installs: 4 061

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 2

Type:cakephp-plugin 2020-01-28 06:21 UTC

This package is auto-updated.

Last update: 2022-08-28 12:44:29 UTC


Recentry, the amount of feature phones are decreasing, though they are still existing. Sometimes, we have to handle them, but there are some obstacles. First, we can't use cookie to keep session. Furthermore, the character code is not UTF-8 but SJIS.

This plugin will deal with the problems mentioned above.


You can install this plugin into your CakePHP application using composer.

The recommended way to install composer packages is:

composer require gorogoroyasu/garak


just add few lines in AppController and bootstrap.php.

// in bootstrap.php
Plugin::load('Garak', ['bootstrap' => true]);

// in AppController.php
public function initialize()

public function beforeRedirect(Event $event, $url, Response $response)
    $url = $this->Garak->generateRedirectUrl($url);

// The line below was the wrong statement. 
// public function redirect($url, $status = null, $exit = true)
// {
//     $url = $this->Garak->generateRedirectUrl($url);
//    parent::redirect($url, $status, $exit);


I recommend you to user Themed ( to switch the view. You can identify if the type of device by using isGarak method in Garak.Garak.