XOOPS RMCommon Utilities  2.1.8.91RC
 All Classes Namespaces Files Functions Variables
RMUtilities Class Reference

Public Member Functions

 add_slash ($string)
 
 delete_directory ($path)
 
 delete_file ($filepath)
 
 format_version ($version, $name=false)
 
 formatBytesSize ($size)
 
 get ()
 
 get_count ($table, $cond='')
 
 getVersion ($includename=true, $module='', $type=0)
 
 image_manager ($name, $id='', $default='')
 
 make_url ($ruta)
 
 module_config ($modname, $option='')
 
 randomString ($size, $digit=true, $special=false, $upper=false, $alpha=true)
 

Private Member Functions

 hexToRGB ($color)
 

Detailed Description

Definition at line 11 of file utilities.php.

Member Function Documentation

RMUtilities::add_slash (   $string)

Add a slash (/) to the end of string

Definition at line 276 of file utilities.php.

RMUtilities::delete_directory (   $path)

Elimina directorios y todos los archivos contenidos

Parameters
string$pathRuta del directorio
Returns
bool

Definition at line 309 of file utilities.php.

References $dir, $file, and $path.

RMUtilities::delete_file (   $filepath)

Elimina un archivo existente del servidor

Parameters
string$filepathRuta completa al archivo
Returns
bool

Definition at line 38 of file utilities.php.

RMUtilities::format_version (   $version,
  $name = false 
)

Definition at line 120 of file utilities.php.

References $rtn.

Referenced by load_modules_page(), rmc_available_mods(), and show_modules_list().

Here is the caller graph for this function:

RMUtilities::formatBytesSize (   $size)

Format bytes to MB, GB, KB, etc

Parameters
int$sizeTamaño de bytes
Returns
string

Definition at line 286 of file utilities.php.

References __(), and elseif().

Here is the call graph for this function:

RMUtilities::get ( )

Obtiene una ?nica instancia de esta clase

Definition at line 16 of file utilities.php.

Referenced by ajax_load_updates(), ajax_update_details(), download_file(), RMFormImage\render(), and show_available_updates().

Here is the caller graph for this function:

RMUtilities::get_count (   $table,
  $cond = '' 
)

Comprueba si existe un elemento en una tabla expec?fica

Parameters
string$tableNombre de la tabla
string$condCondici?n de b?squeda
Returns
bool

Definition at line 52 of file utilities.php.

References $db, and $sql.

RMUtilities::getVersion (   $includename = true,
  $module = '',
  $type = 0 
)

Obtiene la version del mdulo actual Esta funci?n solo funciona con m?dulos de Red M?xico Soft o compatibles

Parameters
bool$includenameMostrar todo el nombre del m?dulo
string$moduleObtener Versi?n del M?dulo Espec?ficado
int$type0 = String, 1 = Array

Definition at line 67 of file utilities.php.

References $mod, $rtn, $type, $xoopsConfig, and $xoopsModule.

RMUtilities::hexToRGB (   $color)
private

Determina el color rgb a partir de una cadena HEX

Definition at line 219 of file utilities.php.

References elseif().

Here is the call graph for this function:

RMUtilities::image_manager (   $name,
  $id = '',
  $default = '' 
)

Muestra los controles para lanzar el administrador de imágenes desde cualqueir punto

Parameters
stringElement name for inputs

Definition at line 332 of file utilities.php.

References $id, $ret, $tpl, __(), RMTemplate\get(), and RMCURL.

Here is the call graph for this function:

RMUtilities::make_url (   $ruta)

Funci?n para obtener la URL apartir de una ruta absoluta en el servidor.

Parameters
string$rutaRuta fisica en el servidor
Returns
string

Definition at line 29 of file utilities.php.

References ABSPATH, and ABSURL.

RMUtilities::module_config (   $modname,
  $option = '' 
)

Permite obtener opciones de ocnfiguraci?n de un m?dulo cualquiera

Parameters
string$modnameNombre del M?dulo
string$optionNombre de la opci?n de configuraci?n
Returns
string o array

Definition at line 180 of file utilities.php.

References $xoopsModule, and $xoopsModuleConfig.

RMUtilities::randomString (   $size,
  $digit = true,
  $special = false,
  $upper = false,
  $alpha = true 
)

Genera una cadena aleatoria en base a par?metros especificados

Definition at line 240 of file utilities.php.

References $i, $rtn, and $s.


The documentation for this class was generated from the following file: