Application
Table of Contents
Classes
- Authenticate
- Esta clase es un controlador que tiene los métodos para autenticar al usuario que hace el request. Es necesario adaptar el uso de esta clase, si es que fuera necesaria, para recibir la conexion desde icontador
- ContabilidadController
- Controller
- DemoController
- EmpresasController
- NotFound
- PeriodoController
- ReporteController
- SocioController
- SystemController
- TributarioController
- Authentication
- Authenticates an HTTP request
- XHRAuthentication
- Authenticates an XHR request
- Contabilidad
- Demo
- Periodo
- Socio
- ContabilidadService
- SocioService
- App
- The singleton class to extend it as it is needed
- TemplateEngine
- DBHandler
- Clase para acceder a las bases de datos "select from table where col1 = ? and col2 = ?", ["aaa", 4] Metodos publicos de utilidad ([+] -> los mas usados): [+]public function selectOne(string $query, array|null $args): array [+]public function selectMany(string $query, array|null $args): array public function selectById(string $query, int $id): array [+]public function rawQuery(string $query, string|null $queryType = 'select_one', array|null $args = []): array public function insertOne(string $query, array $args): array public function insertManyUsingQuestionMarks(string $query, array $args, array|null $formatoColumnas = []): array public function delete(string $query, array $args): array public function update(string $query, array $args): array public function &getLink(): PDO public function beginTransaction(): bool public function commit(): bool public function rollback(): bool
- LogicException
- ApiImportador
- Esta clase es un wrapper de la clase Curl\Curl que actua como Facade para las funcionalidades nativas relacionadas a cURL de PHP
- Model
- Singleton
- The singleton class to extend it as it is needed
- Request
- This class has the methods to easily access request data.
- Commands
- Esta clase construye un array con comandos que se entregarán al font end para ser ejecutados Es preferible trabajar con array en esta clase por su simplicidad de sintaxis en vez de trabajar con objetos
- Route
- Router
- CastingTool
- DomTool
- This class is a wrapper of the DOMWrap\Document tool (which is already a wrapper) by selecting a curated list of methods to manipulate the dom
- MinifyTool
- StringTool
- TextFileTool
- Use this class to manage text files, whether you want to add padded content or just dump content into a txt.
- ZipTool
Constants
- CONFIG_FILE = $_SERVER["DOCUMENT_ROOT"] . "/../config/config.php"
- DO_NOT_MINIFY = \FALSE
- GLOBAL_METHODS = $_SERVER["DOCUMENT_ROOT"] . "/../Core/globalMethods.php"
- MAIN = "main_container"
- START_TEMPLATE = \VISTAS . "/main/main.php"
- TODAY = \date("Y-m-d")
- Definicion de constantes globales.
- VISTAS = $_SERVER["DOCUMENT_ROOT"] . "/../app/views"
Functions
- app() : App
- Global funtion to access the singleton app instance
- globalThrowableHandler() : void
- This is the global scoped function that handles all throwable (Exception + Error)
- clp() : string
- Da formato de dinero con separador de miles en formato de peso chileno a un numero.
- clog() : void
- Global function to access arror_log for convenience.
- dd() : never
- Dump & die.
Constants
CONFIG_FILE
public
mixed
CONFIG_FILE
= $_SERVER["DOCUMENT_ROOT"] . "/../config/config.php"
DO_NOT_MINIFY
public
mixed
DO_NOT_MINIFY
= \FALSE
GLOBAL_METHODS
public
mixed
GLOBAL_METHODS
= $_SERVER["DOCUMENT_ROOT"] . "/../Core/globalMethods.php"
MAIN
public
mixed
MAIN
= "main_container"
START_TEMPLATE
public
mixed
START_TEMPLATE
= \VISTAS . "/main/main.php"
TODAY
Definicion de constantes globales.
public
mixed
TODAY
= \date("Y-m-d")
Agregar las constantes que sea conveniente usar.
Ejemplo:
- una ruta directa a un directorio de template, ver siguiente ejemplo:
- define("VISTAS_EMPRESA", $_SERVER["DOCUMENT_ROOT"] . "/../app/views/contabilidad/empresa");
VISTAS
public
mixed
VISTAS
= $_SERVER["DOCUMENT_ROOT"] . "/../app/views"
Functions
app()
Global funtion to access the singleton app instance
app() : App
Return values
AppglobalThrowableHandler()
This is the global scoped function that handles all throwable (Exception + Error)
globalThrowableHandler(Throwable $e) : void
Parameters
- $e : Throwable
clp()
Da formato de dinero con separador de miles en formato de peso chileno a un numero.
clp(float|string $number) : string
- Ejemplo: 1234567.89 -> 1.234.568
- Notar la aproximación automática
Parameters
- $number : float|string
Return values
stringclog()
Global function to access arror_log for convenience.
clog(mixed $args) : void
Parameters
- $args : mixed
dd()
Dump & die.
dd(mixed $arg) : never
Will echo a var_dump of the arg parameter and then stop execution.
Parameters
- $arg : mixed