-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
correcion login, tableName en dataAccess y agregado de guardar cedula…
… en sessionDataAccess
- Loading branch information
1 parent
fc2e02d
commit 7b55c53
Showing
7 changed files
with
171 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<?php | ||
$dataAccessPath=dirname(__FILE__,2)."/src/Model/Base/DataAccess.php"; | ||
$dataAccessMPath=dirname(__FILE__,2)."/src/Model/Base/DataAccessManager.php"; | ||
$gtkColumnVirtualPath=dirname(__FILE__,2)."/src/Model/Base/GTKColumnVirtual.php"; | ||
$gtkColumnMappingPath=dirname(__FILE__,2)."/src/Model/Base/GTKColumnMapping.php"; | ||
$gtkColumnBasePath=dirname(__FILE__,2)."/src/Model/Base/GTKColumnBase.php"; | ||
$gtkDataSetPath=dirname(__FILE__,2)."/src/Model/Base/GTKDataSetMapping.php"; | ||
$personaDataAccessPath=dirname(__FILE__,2)."/src/Model/User/PersonaDataAccess.php"; | ||
$dataAccessActionPath=dirname(__FILE__,2)."/src/Model/Base/DataAccessAction.php"; | ||
$glangPath=dirname(__FILE__,2)."/src/Translations/Glang.php"; | ||
$langPath=dirname(__FILE__,2)."/configure/lang.php"; | ||
$arrayHelpersPath=dirname(__FILE__,2)."/vendor/gtk/gtk-helpers/src/lib/ArrayHelpers.php"; | ||
$ifRespondsPath=dirname(__FILE__,2)."/vendor/gtk/gtk-helpers/src/lib/ifResponds.php"; | ||
error_log($dataAccessPath); | ||
require_once($arrayHelpersPath); | ||
require_once($ifRespondsPath); | ||
require_once($dataAccessPath); | ||
require_once($dataAccessMPath); | ||
require_once($personaDataAccessPath); | ||
require_once($dataAccessActionPath); | ||
require_once($gtkColumnBasePath); | ||
require_once($gtkColumnMappingPath); | ||
require_once($gtkColumnVirtualPath); | ||
require_once($gtkDataSetPath); | ||
require_once($glangPath); | ||
require_once($langPath); | ||
|
||
// $autoloadPath = dirname(__FILE__,2)."/vendor/autoload.php"; | ||
// require_once($autoloadPath); | ||
|
||
$db_path = "sqlite:C:\proyectos\stonewood-app\Data\AppStonewood-Production.db"; | ||
$agencyAdminPermissions = [ | ||
"delete" => [ | ||
"DEV", | ||
"AGENCY", | ||
"SOFTWARE_ADMIN", | ||
], | ||
"update" => [ | ||
"DEV", | ||
"AGENCY", | ||
"SOFTWARE_ADMIN", | ||
], | ||
"read" => [ | ||
"SOFTWARE_ADMIN", | ||
], | ||
"none" => [ | ||
"ACCOUNTANTS", | ||
"DISPATCHERS", | ||
], | ||
]; | ||
$config =[ | ||
"class" => "StonewoodPersona", | ||
"db" => "appDB", | ||
"permissions" => $agencyAdminPermissions, | ||
"tableName" => "personas", | ||
]; | ||
$sqlitePdo = new PDO($db_path); | ||
$sqlitePdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); | ||
// SETUP | ||
|
||
$dataAccess = new DataAccess($sqlitePdo, $config); | ||
|
||
DataAccessManager::get('persona') | ||
|
||
|
||
$tableName = $dataAccess->tableName; | ||
//NOTE USE PDO DIRECTLY | ||
|
||
// ($resultado, $esperado, $mensaje) | ||
// testIsNull($resultado, "el resultado es: ".$resultado) | ||
IF ($tableName != "personas") | ||
{ | ||
die("no se asigno correctamente el valor de tablename se obtuvo: ". $tableName ); | ||
}else | ||
{ | ||
error_log("tableName: ".$tableName); | ||
} | ||
//TEAR DOWN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
require_once(dirname(__FILE__, 2)."/vendor/autoload.php"); | ||
|
||
$envpath = dirname(__FILE__,2)."/.secret/env.php"; | ||
echo $envpath."\n"; | ||
$_GLOBALS["SECRET_ENV_PATH"] = $envpath; | ||
|
||
class StonewoodPersona { | ||
|
||
|
||
|
||
|
||
|
||
} | ||
|
||
|
||
DataAccessManager::get("persona"); |