コード例 #1
0
 /**
  * Constructor.
  * @param $args array script arguments
  */
 function __construct($args)
 {
     parent::__construct($args);
     // Set an initial process id and load translations (required
     // for email notifications).
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_ADMIN);
     // Canonicalize the base path.
     $basePath = rtrim($args[0], DIRECTORY_SEPARATOR);
     $basePathFolder = basename($basePath);
     // We assume that the parent folder of the base path
     // does already exist and can be canonicalized.
     $basePathParent = realpath(dirname($basePath));
     if ($basePathParent === false) {
         $basePath = null;
     } else {
         $basePath = $basePathParent . DIRECTORY_SEPARATOR . $basePathFolder;
     }
     $this->_basePath = $basePath;
     // Configure paths.
     if (!is_null($basePath)) {
         $this->_stagePath = $basePath . DIRECTORY_SEPARATOR . FILE_LOADER_PATH_STAGING;
         $this->_archivePath = $basePath . DIRECTORY_SEPARATOR . FILE_LOADER_PATH_ARCHIVE;
         $this->_rejectPath = $basePath . DIRECTORY_SEPARATOR . FILE_LOADER_PATH_REJECT;
         $this->_processingPath = $basePath . DIRECTORY_SEPARATOR . FILE_LOADER_PATH_PROCESSING;
     }
     // Set admin email and name.
     $siteDao = DAORegistry::getDAO('SiteDAO');
     /* @var $siteDao SiteDAO */
     $site = $siteDao->getSite();
     /* @var $site Site */
     $this->_adminEmail = $site->getLocalizedContactEmail();
     $this->_adminName = $site->getLocalizedContactName();
 }
コード例 #2
0
ファイル: MedraInfoSender.inc.php プロジェクト: pkp/ojs
 /**
  * Constructor.
  * @param $argv array task arguments
  */
 function __construct($args)
 {
     PluginRegistry::loadCategory('importexport');
     $plugin = PluginRegistry::getPlugin('importexport', 'MedraExportPlugin');
     /* @var $plugin MedraExportPlugin */
     $this->_plugin = $plugin;
     if (is_a($plugin, 'MedraExportPlugin')) {
         $plugin->addLocaleData();
     }
     parent::__construct($args);
 }
コード例 #3
0
 /**
  * Constructor.
  */
 function __construct()
 {
     parent::__construct();
 }