26 if (isset ( $_POST [
"cacheTypes"] ))
27 $caches = $_POST [
"cacheTypes"];
31 foreach ( $caches as $cache ) {
32 if ($cache ==
'models' || $cache ==
'controllers') {
40 echo $this->jquery->compile ( $this->view );
44 if (isset ( $_POST [
"toDelete"] )) {
45 $toDelete = $_POST [
"toDelete"];
46 $type = \strtolower ( $_POST [
"type"] );
47 if ($type ==
'models' || $type ==
'controllers') {
50 if (\file_exists ( $toDelete ))
51 \unlink ( $toDelete );
58 if (isset ( $_POST [
"type"] )) {
60 $toDelete = \strtolower ( $_POST [
"type"] );
61 if ($toDelete ==
'models' || $toDelete ==
'controllers') {
72 $type = \strtolower ( $_POST [
"type"] );
73 $filename = $_POST [
"filename"];
74 $key = $_POST [
"key"];
75 if ($type ==
'models' || $type ==
'controllers') {
78 if (\file_exists ( $filename )) {
79 $content = \file_get_contents ( $filename );
82 $modal = $this->jquery->semantic ()->htmlModal (
"file", $type .
" : " . \basename ( $filename ) );
83 $frm =
new HtmlForm (
"frmShowFileContent" );
84 $frm->addTextarea (
"file-content", null, $content,
"", 10 );
85 $modal->setContent ( $frm );
86 $modal->addAction (
"Close" );
87 $this->jquery->exec (
"$('#file').modal('show');",
true );
89 echo $this->jquery->compile ( $this->view );
94 if (isset ( $_POST [
"type"] )) {
95 $type = $_POST [
"type"];
static isPost()
Returns true if the request is sent by the POST method.
static getCacheDirectory()
static initFromFiles($folder, $type, $keyFunction=null)
static initCache(&$config, $type="all", $silent=false)