Add namespace Processmaker\Core

This commit is contained in:
Marco A. Nina Mena
2017-08-14 16:13:46 -04:00
parent 06641a39c2
commit ee5a124bba
87 changed files with 623 additions and 477 deletions

View File

@@ -408,7 +408,7 @@ class ActionsByEmail
$arrayConfigAux = $row;
$arrayConfigAux["SMTPSecure"] = $row["SMTPSECURE"];
}
$aSetup = (!empty($arrayConfigAux))? $arrayConfigAux : \PmSystem::getEmailConfiguration();
$aSetup = (!empty($arrayConfigAux))? $arrayConfigAux : \ProcessMaker\Core\System::getEmailConfiguration();
$spool = new SpoolRun();
$spool->setConfig($aSetup);

View File

@@ -184,7 +184,7 @@ class Cases
{
try {
$solrEnabled = false;
$solrConf = \PmSystem::solrEnv();
$solrConf = \ProcessMaker\Core\System::solrEnv();
if ($solrConf !== false) {
$ApplicationSolrIndex = new \AppSolr(
@@ -376,7 +376,7 @@ class Cases
{
try {
$solrEnabled = 0;
if (($solrEnv = \PmSystem::solrEnv()) !== false) {
if (($solrEnv = \ProcessMaker\Core\System::solrEnv()) !== false) {
$appSolr = new \AppSolr(
$solrEnv["solr_enabled"],
$solrEnv["solr_host"],

View File

@@ -182,7 +182,7 @@ class EmailServer
$sBodyPre->prepare();
$sBodyPre->assign("server", $_SERVER["SERVER_NAME"]);
$sBodyPre->assign("date", date("H:i:s"));
$sBodyPre->assign("ver", \PmSystem::getVersion());
$sBodyPre->assign("ver", \ProcessMaker\Core\System::getVersion());
$sBodyPre->assign("engine", $engine);
$sBodyPre->assign("msg", $msg);
$sBody = $sBodyPre->getOutputContent();

View File

@@ -1260,7 +1260,7 @@ class Light
$offset = timezone_offset_get( new \DateTimeZone( $tz ), new \DateTime() );
$response['timeZone'] = sprintf( "GMT%s%02d:%02d", ( $offset >= 0 ) ? '+' : '-', abs( $offset / 3600 ), abs( ($offset % 3600) / 60 ) );
$response['multiTimeZone'] = $multiTimeZone;
$fields = \PmSystem::getSysInfo();
$fields = \ProcessMaker\Core\System::getSysInfo();
$response['version'] = $fields['PM_VERSION'];
$buildType = 'Community';

View File

@@ -11,7 +11,7 @@ class NotificationDevice
public function checkMobileNotifications()
{
$conf = \PmSystem::getSystemConfiguration('', '', SYS_SYS);
$conf = \ProcessMaker\Core\System::getSystemConfiguration('', '', SYS_SYS);
$activeNotifications = true;
if (isset($conf['mobileNotifications'])) {
$activeNotifications = $conf['mobileNotifications'] == 1 ? true : false;

View File

@@ -54,7 +54,7 @@ class PushMessageAndroid
*/
public function setSettingNotification()
{
$conf = \PmSystem::getSystemConfiguration(PATH_CONFIG . 'mobile.ini');
$conf = \ProcessMaker\Core\System::getSystemConfiguration(PATH_CONFIG . 'mobile.ini');
$this->setUrl($conf['android']['url']);
$this->setKey($conf['android']['serverApiKey']);
}

View File

@@ -67,7 +67,7 @@ class PushMessageIOS
*/
public function setSettingNotification()
{
$conf = \PmSystem::getSystemConfiguration(PATH_CONFIG . 'mobile.ini');
$conf = \ProcessMaker\Core\System::getSystemConfiguration(PATH_CONFIG . 'mobile.ini');
$this->setUrl($conf['apple']['url']);
$this->setKey($conf['apple']['passphrase']);
$this->setPemFile($conf['apple']['pemFile']);

View File

@@ -134,7 +134,7 @@ class GranularExporter
$data["version"] = "3.1";
$data["container"] = "ProcessMaker-Project";
$data["metadata"] = array(
"vendor_version" => \PmSystem::getVersion(),
"vendor_version" => \ProcessMaker\Core\System::getVersion(),
"vendor_version_code" => "Michelangelo",
"export_timestamp" => date("U"),
"export_datetime" => date("Y-m-d\TH:i:sP"),

View File

@@ -30,7 +30,7 @@ class Pmgmail {
//getting the skin
require_once (PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "class.system.php");
$sysConf = new \PmSystem();
$sysConf = new \ProcessMaker\Core\System();
$responseSysConfig = $sysConf->getSystemConfiguration( PATH_CONFIG . 'env.ini' );
$response['enviroment'] = $responseSysConfig['default_skin'];

View File

@@ -1,7 +1,7 @@
<?php
namespace ProcessMaker\BusinessModel;
use PmSystem;
use ProcessMaker\Core\System;
use Exception;
use G;
@@ -18,7 +18,7 @@ class Skins
*/
public function getSkins()
{
$list = PmSystem::getSkingList();
$list = System::getSkingList();
return $list['skins'];
}

View File

@@ -453,7 +453,7 @@ class WebEntry
$template->assign("dynaform", empty($arrayDynaFormData) ? '' : $arrayDynaFormData["DYN_TITLE"]);
$template->assign("timestamp", date("l jS \of F Y h:i:s A"));
$template->assign("ws", $this->sysSys);
$template->assign("version", \PmSystem::getVersion());
$template->assign("version", \ProcessMaker\Core\System::getVersion());
$fileName = $pathDataPublicProcess . PATH_SEP . $weTitle . "Post.php";

File diff suppressed because it is too large Load Diff

View File

@@ -39,7 +39,7 @@ abstract class Exporter
$this->projectData = $this->bpmnProject->getProject();
$this->metadata = array(
"vendor_version" => \PmSystem::getVersion(),
"vendor_version" => \ProcessMaker\Core\System::getVersion(),
"vendor_version_code" => "Michelangelo",
"export_timestamp" => date("U"),
"export_datetime" => date("Y-m-d\TH:i:sP"),

View File

@@ -10,7 +10,7 @@ use InputFilter;
use Language;
use PEAR;
use PluginsRegistry;
use PmSystem;
use ProcessMaker\Core\System;
use ProcessMaker\Plugins\Adapters\PluginAdapter;
use ProcessMaker\Plugins\Interfaces\CaseSchedulerPlugin;
use ProcessMaker\Plugins\Interfaces\CronFile;
@@ -33,7 +33,6 @@ use ProcessMaker\Plugins\Traits\Attributes;
use ProcessMaker\Plugins\Traits\PluginStructure;
use Publisher;
use stdClass;
use System;
/**
* Class PluginRegistry
@@ -428,7 +427,7 @@ class PluginRegistry
*/
public function uninstallPluginWorkspaces($arrayPlugin)
{
$workspace = PmSystem::listWorkspaces();
$workspace = System::listWorkspaces();
foreach ($workspace as $indexWS => $ws) {
$pluginRegistry = PluginRegistry::loadSingleton();
@@ -1392,7 +1391,7 @@ class PluginRegistry
) {
$arrayWorkspace = array();
foreach (PmSystem::listWorkspaces() as $value) {
foreach (System::listWorkspaces() as $value) {
$workspaceTools = $value;
$arrayWorkspace[] = $workspaceTools->name;

View File

@@ -110,21 +110,21 @@ abstract class Handler
*/
public static function logstr($str)
{
if (\PmSystem::isDebugMode()) {
if (\ProcessMaker\Core\System::isDebugMode()) {
Logger::getInstance()->setLog($str);
}
}
public static function logInline()
{
if (\PmSystem::isDebugMode()) {
if (\ProcessMaker\Core\System::isDebugMode()) {
call_user_func_array(array(Logger::getInstance(), 'setLogInline'), func_get_args());
}
}
public static function log()
{
if (\PmSystem::isDebugMode()) {
if (\ProcessMaker\Core\System::isDebugMode()) {
$logger = Logger::getInstance();
call_user_func_array(array($logger, 'setLogLine'), func_get_args());
}

View File

@@ -371,7 +371,7 @@ class Server implements iAuthenticate
$userTimeZone = $user->getUsrTimeZone();
if (trim($userTimeZone) == '') {
$arraySystemConfiguration = \PmSystem::getSystemConfiguration('', '', SYS_SYS);
$arraySystemConfiguration = \ProcessMaker\Core\System::getSystemConfiguration('', '', SYS_SYS);
$userTimeZone = $arraySystemConfiguration['time_zone'];
}

View File

@@ -26,7 +26,7 @@ class System
public static function getTimeZone()
{
try {
$arraySystemConfiguration = \PmSystem::getSystemConfiguration('', '', SYS_SYS);
$arraySystemConfiguration = \ProcessMaker\Core\System::getSystemConfiguration('', '', SYS_SYS);
//Return
return $arraySystemConfiguration['time_zone'];