25 if (isset ( $_POST [
"cacheTypes"] ))
26 $caches = $_POST [
"cacheTypes"];
30 foreach ( $caches as $cache ) {
31 if ($cache ==
'models' || $cache ==
'controllers') {
39 echo $this->jquery->compile ( $this->view );
43 if (isset ( $_POST [
"toDelete"] )) {
44 $toDelete = $_POST [
"toDelete"];
45 $type = \strtolower ( $_POST [
"type"] );
46 if ($type ==
'models' || $type ==
'controllers') {
49 if (\file_exists ( $toDelete ))
50 \unlink ( $toDelete );
57 if (isset ( $_POST [
"type"] )) {
59 $toDelete = \strtolower ( $_POST [
"type"] );
60 if ($toDelete ==
'models' || $toDelete ==
'controllers') {
71 $type = \strtolower ( $_POST [
"type"] );
72 $filename = $_POST [
"filename"];
73 $key = $_POST [
"key"];
74 if ($type ==
'models' || $type ==
'controllers') {
77 if (\file_exists ( $filename )) {
78 $content = \file_get_contents ( $filename );
81 $modal = $this->jquery->semantic ()->htmlModal (
"file", $type .
" : " . \basename ( $filename ) );
82 $frm =
new HtmlForm (
"frmShowFileContent" );
83 $frm->addTextarea (
"file-content", null, $content,
"", 10 );
84 $modal->setContent ( $frm );
85 $modal->addAction (
"Close" );
86 $this->jquery->exec (
"$('#file').modal('show');",
true );
88 echo $this->jquery->compile ( $this->view );
93 if (isset ( $_POST [
"type"] )) {
94 $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)