Hi, everyone
how can i access codeigniter instance from console/cli because i'm using an app called
https://tinkerwell.app/ it allows you to do repl but it has complete editor so its really good and cheap price, it has support for custom drivers, i made one for codeigniter 3
Driver:
PHP Code:
<?php
use Tinkerwell\ContextMenu\Label;
use Tinkerwell\ContextMenu\OpenURL;
use Tinkerwell\ContextMenu\Separator;
class Codeigniter3TinkerwellDriver extends TinkerwellDriver {
/**
* Determine if the driver can be used with the selected project path.
* You most likely want to check the existence of project / framework specific files.
*
* @param string $projectPath
* @return bool
*/
public function canBootstrap($projectPath) {
return file_exists($projectPath . '/index.php');
}
/**
* Bootstrap the application so that any executed can access the application in your desired state.
*
* @param string $projectPath
*/
public function bootstrap($projectPath) {
require $projectPath . '/index.php';
}
// public function getAvailableVariables() {
// return [
// 'CI' => $this->CI,
// ];
// }
public function contextMenu() {
return array_merge(parent::contextMenu(), [
Separator::create(),
Label::create('Detected Codeigniter v' . CI_VERSION),
OpenURL::create('Codeigniter Documentation', 'https://codeigniter.com'),
]);
}
}
i have gave it ci3 index.php (as it bootstrap ci3) but tinkerwell gives me this:
Code:
ERROR: Not Found
The controller/method pair you requested was not found.
what is a correct way to get ci3 instance for console/cli like tinkerwell
please help me out
Thanks,
Anees Khan