Skip to content

Commit 022005b

Browse files
committedDec 23, 2012
Actualizado core
1 parent 52a8fea commit 022005b

File tree

124 files changed

+12944
-10858
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+12944
-10858
lines changed
 

‎core/.htaccess

100644100755
File mode changed.

‎core/console/cache_console.php

100644100755
+31-26
Original file line numberDiff line numberDiff line change
@@ -12,69 +12,74 @@
1212
* obtain it through the world-wide-web, please send an email
1313
* to license@kumbiaphp.com so we can send you a copy immediately.
1414
*
15-
* Consola para manejar la cache
16-
*
1715
* @category Kumbia
18-
* @package consoles
19-
* @copyright Copyright (c) 2005-2009 Kumbia Team (http://www.kumbiaphp.com)
16+
* @package Console
17+
* @copyright Copyright (c) 2005-2012 Kumbia Team (http://www.kumbiaphp.com)
2018
* @license http://wiki.kumbiaphp.com/Licencia New BSD License
2119
*/
22-
2320
// carga libreria para manejo de cache
2421
Load::lib('cache');
25-
22+
23+
/**
24+
* Consola para manejar la cache
25+
*
26+
* @category Kumbia
27+
* @package Console
28+
*/
2629
class CacheConsole
27-
{
30+
{
31+
2832
/**
2933
* Comando de consola para limpiar la cache
3034
*
3135
* @param array $params parametros nombrados de la consola
3236
* @param string $group nombre de grupo
33-
* @throw KumbiaException
37+
* @throw KumbiaException
3438
*/
3539
public function clean($params, $group = FALSE)
3640
{
3741
// obtiene el driver de cache
38-
if(isset($params['driver'])) {
39-
$cache = Cache::driver($params['driver']);
42+
if (isset($params['driver'])) {
43+
$cache = Cache::driver($params['driver']);
4044
} else {
41-
$cache = Cache::driver();
42-
}
43-
45+
$cache = Cache::driver();
46+
}
47+
4448
// limpia la cache
45-
if($cache->clean($group)) {
46-
if($group) {
47-
echo "-> Se ha limpiado el grupo $group", PHP_EOL ;
49+
if ($cache->clean($group)) {
50+
if ($group) {
51+
echo "-> Se ha limpiado el grupo $group", PHP_EOL;
4852
} else {
49-
echo "-> Se ha limpiado la cache", PHP_EOL ;
53+
echo "-> Se ha limpiado la cache", PHP_EOL;
5054
}
5155
} else {
5256
throw new KumbiaException('No se ha logrado eliminar el contenido');
5357
}
5458
}
55-
59+
5660
/**
5761
* Comando de consola para eliminar un elemento cacheado
5862
*
5963
* @param array $params parametros nombrados de la consola
6064
* @param string $id id del elemento
6165
* @param string $group nombre de grupo
62-
* @throw KumbiaException
66+
* @throw KumbiaException
6367
*/
6468
public function remove($params, $id, $group = 'default')
6569
{
6670
// obtiene el driver de cache
67-
if(isset($params['driver'])) {
68-
$cache = Cache::driver($params['driver']);
71+
if (isset($params['driver'])) {
72+
$cache = Cache::driver($params['driver']);
6973
} else {
70-
$cache = Cache::driver();
71-
}
72-
74+
$cache = Cache::driver();
75+
}
76+
7377
// elimina el elemento
74-
if($cache->remove($id, $group)) {
75-
echo '-> Se ha eliminado el elemento de la cache', PHP_EOL ;
78+
if ($cache->remove($id, $group)) {
79+
echo '-> Se ha eliminado el elemento de la cache', PHP_EOL;
7680
} else {
7781
throw new KumbiaException("No se ha logrado eliminar el elemento \"$id\" del grupo \"$group\"");
7882
}
7983
}
84+
8085
}

0 commit comments

Comments
 (0)
Please sign in to comment.