function getImageHtml($focus, $name, $value, $view)
{
    if ('EditView' != $view && 'DetailView' != $view) {
        return "";
        // skip the rest of the method if another view calls this method
    }
    global $app_list_strings;
    $languageStrings = $app_list_strings["oqc"]["Services"];
    require_once 'include/Sugar_Smarty.php';
    //1.7.6 Workaround for image display without modifying htaccess file
    require_once 'include/oqc/common/Configuration.php';
    if (isset($focus->image_unique_filename)) {
        global $sugar_config;
        $conf = Configuration::getInstance();
        $oqc_uploadDir = $conf->get('fileUploadDir');
        $uploadDir = $oqc_uploadDir ? $oqc_uploadDir : $sugar_config['upload_dir'];
        if (file_exists($uploadDir . "th" . $focus->image_unique_filename)) {
            $imageurl = "oqc/GetImage.php?module=oqc_Product&id=th" . $focus->image_unique_filename;
        } else {
            $imageurl = "oqc/GetImage.php?module=oqc_Product&id=" . $focus->image_unique_filename;
        }
    } else {
        $imageurl = '';
    }
    $smarty = new Sugar_Smarty();
    $smarty->assign('image_url', $imageurl);
    $smarty->assign('languageStrings', $languageStrings);
    return $smarty->fetch('include/oqc/Products/Image.' . $view . '.html');
}
 function __construct()
 {
     $this->emailTranslation = getLanguageStringsPHP('Email');
     $conf = Configuration::getInstance();
     $this->role = $conf->get('notificationRole');
     $this->fromAddr = $conf->get('changeNotifierEmailAddress');
 }
 function __construct()
 {
     require_once 'Configuration.php';
     $conf = Configuration::getInstance();
     $this->storageDirectory = $conf->get('storageDirectory');
     $this->rootDirStringLength = strlen($this->storageDirectory);
 }
Example #4
0
 private function __construct()
 {
     $conf = Configuration::getInstance();
     $this->inbox = $conf->get('Mail', 'Inbox');
     $this->user = $conf->get('Mail', 'User');
     $this->passwd = $conf->get('Mail', 'Password');
 }
 public function __construct()
 {
     require_once 'include/oqc/common/Configuration.php';
     $conf = Configuration::getInstance();
     $this->CONVERTER = $conf->get('pathDocumentConverter');
     $this->PAGE_INSERTER = $conf->get('pathPageInserter');
 }
Example #6
0
 /**
  * 
  */
 public function getDbalManager()
 {
     $oConfig = Configuration::getInstance();
     $oConfig->read($this->sConfigPath);
     $oFactory = new DriverFactory();
     return new DbalManager($oFactory, $oConfig);
 }
Example #7
0
 public function get()
 {
     $page = Request::getQuery('page', 1);
     $per = Configuration::getInstance()->per;
     $start = ($page - 1) * $per;
     return array('personas' => Personas::all(null, array('inscripcion' => 'DESC'), array($start, $per)), 'count' => Personas::count(), 'start' => $start, 'page' => $page, 'per' => $per);
 }
Example #8
0
 public function init()
 {
     if (!Session::getInstance()->usuario) {
         return '/admin/ingresar';
     }
     $configuration = Configuration::getInstance();
     $this->config = array('nombre' => Request::getPost('nombre', $configuration->nombre), 'idioma' => Request::getPost('idioma', $configuration->idioma), 'efecto' => Request::getPost('efecto', $configuration->efecto), 'twitter' => Request::getPost('twitter', $configuration->twitter), 'per' => Request::getPost('per', $configuration->per));
     return true;
 }
Example #9
0
 /**
  * Singleton pattern
  */
 static function getConnection()
 {
     if (!self::$_conn) {
         $configDb = Configuration::getInstance()->get('config.db');
         self::$_conn = new PDO('mysql:host=' . $configDb['host'] . ';dbname=' . $configDb['db'], $configDb['username'], $configDb['pass']);
     }
     self::$_conn->exec('CHARSET UTF8');
     self::$_conn->exec('SET NAMES UTF8');
     return self::$_conn;
 }
Example #10
0
 public static function dispatchHostname()
 {
     $default = Configuration::getInstance()->idioma;
     $server = explode('.', $_SERVER['SERVER_NAME']);
     $idioma = array_shift($server);
     if (!Translate::locale($idioma)) {
         return $default;
     }
     return true;
 }
Example #11
0
 private function loadTemplate($templateName)
 {
     $configuration = Configuration::getInstance();
     $filepath = $configuration->get("modulespath") . "/layout/templates/" . $templateName . ".php";
     if (file_exists($filepath)) {
         $this->layoutpath = $filepath;
         //$this->layouttemplate=file_get_contents($filepath);
     } else {
         throw new Exception("File not found: " . $filepath, 404);
     }
 }
Example #12
0
 public function get()
 {
     $configuracion = Configuration::getInstance();
     $current = substr(Router::$current, strpos(Router::$current, '_') + 1);
     if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
         $parent = strstr($current, '_', true);
     } else {
         $parent = substr($current, 0, strpos($current, '_'));
     }
     return array('parent' => $parent, 'current' => $current, 'title' => $this->title, 'nombre' => $configuracion->nombre);
 }
Example #13
0
 /**
  * 
  * classic exeption Handler
  * 
  * @param unknown_type $e
  */
 public static function exceptionHandler($e)
 {
     Logger::write('error', $e->getMessage() . PHP_EOL . $e->getFile() . PHP_EOL . $e->getLine());
     if (Configuration::getInstance()->get('config.showErrors')) {
         echo '<h1>' . get_class($e) . '</h1>';
         echo implode(PHP_EOL, array($e->getMessage(), $e->getFile(), $e->getLine()));
         var_dump($e);
         exit;
     }
     return self::_renderErrorPage($e);
 }
Example #14
0
 /**
  * Sends receipt
  * @return bool 
  */
 public function mail()
 {
     $this->read();
     $invoice = new Invoice($this->invoice_id);
     // make e-mail template
     $template = new Template(Configuration::get('base_dir') . DS . 'templates' . DS . 'mail.php');
     $template->replaceFromPHPFile('content', Configuration::get('base_dir') . DS . 'templates' . DS . 'payment-mail.php', array('invoice' => $invoice->read(), 'payment' => $this->toClone()));
     // send e-mail
     $config = Configuration::getInstance();
     $header = "From: {$config['user']['name']} <{$config['user']['email']}>";
     return mail($invoice->client_email, "A payment was made", $template->toString(), $header);
 }
Example #15
0
 public function init($idioma)
 {
     if (!Session::getInstance()->usuario) {
         return '/admin/ingresar';
     }
     $this->idioma = $idioma;
     $this->config = Configuration::getInstance();
     $this->config->setIdioma($this->idioma);
     $this->title = $this->config->getContent('title');
     $this->keywords = $this->config->getContent('keywords');
     $this->description = $this->config->getContent('description');
     return true;
 }
Example #16
0
File: Server.php Project: hlag/svs
 public static function isLocalServer()
 {
     $localServers = Configuration::getInstance()->get('Server', 'localServer');
     $serverArray = explode(',',$localServers);
     //print_r($_SERVER);
     foreach ($serverArray as $servers)
     {
         if ($_SERVER['SERVER_ADDR']== $servers)
             return true;
         elseif(strpos($_SERVER['SERVER_NAME'], $servers) > 1)
             return true;
     }
     return false;
 }
Example #17
0
File: Logger.php Project: hlag/svs
	public function Log($value, $logSelect=2)
	{
		//echo $logSelect;
		//echo $value; exit();
        if (is_array($value))
            $value = print_r($value,true);
        if (is_object($value))
            $value = print_r($value,true);
        if(!isset($_SERVER['SERVER_ADDR']))
        {
            $prefix = "Remote";
        }
        else
        {
        if ($_SERVER['SERVER_ADDR'] == '127.0.0.1' || $_SERVER['SERVER_ADDR'] == '192.168.2.11' || $_SERVER['HTTP_HOST'] == '192.168.2.130' || $_SERVER['SERVER_ADDR'] == '192.168.91.131'  || $_SERVER['SERVER_ADDR'] == '192.168.91.128'|| $_SERVER['SERVER_NAME'] == 'localhost' || $_SERVER['HTTP_HOST'] == '192.168.2.165'|| $_SERVER['SERVER_ADDR'] == '192.168.2.110')
                $prefix = 'Local';
            else 
                $prefix = "Remote";
        }
		switch ($logSelect)
		{
			case LOG_SQL:
				if (Configuration::getInstance()->get('Logger',$prefix.'SQLLog'))
				{
					error_log($this->getTimeStamp()." ".$value."\n",3,PATH."logs/".Configuration::getInstance()->get('Logger',$prefix.'SQLFile'));
				}
				break;
			case LOG_ERROR:
				if (Configuration::getInstance()->get('Logger',$prefix.'ErrorLog'))
				{
					error_log($this->getTimeStamp()." ".$value."\n",3,PATH."logs/".Configuration::getInstance()->get('Logger',$prefix.'ErrorFile'));
				}
				break;
			case LOG_ABLAUF:
				if (Configuration::getInstance()->get('Logger',$prefix.'AblaufLog'))
				{
					error_log($this->getTimeStamp()." ".$value."\n",3,PATH."logs/".Configuration::getInstance()->get('Logger',$prefix.'AblaufFile'));
				}
				break;
                        case LOG_TEMPLATE:
				if (Configuration::getInstance()->get('Logger',$prefix.'TemplateLog'))
				{
					error_log($this->getTimeStamp()." ".$value."\n",3,PATH."logs/".Configuration::getInstance()->get('Logger',$prefix.'TemplateLogFile'));
				}
				break;
					
		}
		//echo "test";
	}
Example #18
0
 public function get()
 {
     $page = Request::getQuery('page', 1);
     $per = Configuration::getInstance()->per;
     $start = ($page - 1) * $per;
     $paginas = array();
     $count = 0;
     $pos = 0;
     if ($this->inmueble->found()) {
         $paginas = Inmuebles_Paginas::allContenido(array('inmueble_id' => $this->inmueble->id), array($start, $per));
         $count = Inmuebles_Paginas::count(array('inmueble_id' => $this->inmueble->id));
         $pos = Inmuebles_Paginas::pos($this->inmueble->id);
     }
     return array('idiomas' => Translate::all(), 'codigo' => $this->codigo, 'inmueble' => $this->inmueble, 'paginas' => $paginas, 'count' => $count, 'start' => $start, 'page' => $page, 'per' => $per, 'pos' => $pos);
 }
Example #19
0
 public function get()
 {
     $page = Request::getQuery('page', 1);
     $per = Configuration::getInstance()->per;
     $start = ($page - 1) * $per;
     $fotos = array();
     $count = 0;
     $pos = 0;
     if ($this->inmueble->found()) {
         $fotos = Inmuebles_Fotos::all(array('inmueble_id' => $this->inmueble->id), array('posicion'), array($start, $per));
         $count = Inmuebles_Fotos::count(array('inmueble_id' => $this->inmueble->id));
         $pos = Inmuebles_Fotos::pos($this->inmueble->id);
     }
     return array('codigo' => $this->codigo, 'inmueble' => $this->inmueble, 'fotos' => $fotos, 'count' => $count, 'start' => $start, 'page' => $page, 'per' => $per, 'pos' => $pos);
 }
Example #20
0
/**
 * Gets database instance from configuration information
 * @staticvar any $instance
 * @return PDO 
 */
function get_database()
{
    static $instance = null;
    if (!$instance) {
        // get configuration
        $config = Configuration::getInstance();
        // create PDO instance
        try {
            $dsn = "mysql:dbname={$config['db']['name']};host={$config['db']['host']}";
            $instance = new PDO($dsn, $config['db']['username'], $config['db']['password']);
        } catch (PDOException $e) {
            throw new Exception($e->getMessage(), 500);
        }
    }
    return $instance;
}
Example #21
0
    public function renderTeaser($teaserArray,$maxcount=0, $type)
    {
        $returnvalue=NULL;
        if (!empty($teaserArray))
        {
            $lang = Language::getInstance();

            $returnvalue.='<div class="'.Configuration::getInstance()->get($type, 'class') .'_outer">';
            $returnvalue.='<div class="'.Configuration::getInstance()->get($type, 'class') .'_inner">'; 
            if ($maxcount!=0)
                $count = $maxcount;
            else
                $count = count($teaserArray);
            if ($maxcount > count($teaserArray) )
                $count = count($teaserArray);
            for ($counter=0; $counter<$count; $counter++)
            {
                 $langArray=$lang->getLanguageArray();
                if ($teaserArray[$counter]['language_id']==$lang->getDefaultLanguage())
                    $langString="";
                else
                    $langString=$langArray[$teaserArray[$counter]['language_id']]['Name']."/";
                $tp = new templateParser(TEMPLATEPATH.Configuration::getInstance()->get("Design","theme").'/'.Configuration::getInstance()->get($type, 'template'));
                $templateArray=array();
                $templateArray['article_teaserhead']  = $teaserArray[$counter]['article_teaserhead'];
                $templateArray['article_teaser_content']  = $teaserArray[$counter]['article_teaser_content'];
                $templateArray['article_url']=($teaserArray[$counter]['article_url']=="/"?"/":$teaserArray[$counter]['article_url'].'.html"');
                $templateArray['newsdate']="";
                if ($teaserArray[$counter]['newsdate']!='' || $teaserArray[$counter]['newsdate']!='0000-00-00')
                {
                    $date=explode("-",$teaserArray[$counter]['newsdate']);
                    $templateArray['newsdate'] = $date[2].".".$date[1].".".$date[0];
                }
                $modulo= Configuration::getInstance()->get($type, 'modulo');
                if ($modulo==1)
                    $templateArray['counter']=$counter+1;
                else
                    $templateArray['counter']=$counter%Configuration::getInstance()->get($type, 'modulo');
                $tp->parseTemplate($templateArray);
                $returnvalue.= $tp->display();
            }
            $returnvalue.='</div>';
            $returnvalue.='</div>';
        }
        return $returnvalue;
    }
Example #22
0
 /**
  * Creates a new connection with the database or returns the active
  * one if there is one, so no double connections for anyone. Returns
  * null if no credentials have been configured, or PDO has been
  * disabled.
  *
  * @return Database|null
  */
 public static function getInstance()
 {
     if (self::$m_sInstance == null || self::$m_nRestartTime < time()) {
         if (self::$m_sInstance != null) {
             self::$m_sInstance = null;
         }
         self::$m_sInstance = null;
         $aConfiguration = Configuration::getInstance()->get('MySQL');
         if (empty($aConfiguration) || isset($aConfiguration['enabled']) && $aConfiguration['enabled'] === false) {
             /** No configuration found or PDO is not wanted, bail out. **/
             return null;
         }
         self::$m_sInstance = new self(true);
         self::$m_nRestartTime = $aConfiguration['restart'] + time();
     }
     return self::$m_sInstance;
 }
Example #23
0
 public static function generateWebmasterTools()
 {
     $google=array();
     
     $google['webmasterTools']=Configuration::getInstance()->get('Google', 'webmasterTools');
     $theme = Configuration::getInstance()->get('Design', 'theme');
     $tp = new templateParser(PATH."FrontEnd/".$theme."/snippets/google_webmaster_tools.htm");
     if (Server::isLocalServer())
         return "";
     if (empty($google['webmasterTools']))
         return '';
     else
     {
         $tp->parseTemplate($google);
         return $tp->display();
     }
 }
Example #24
0
File: Mailer.php Project: hlag/svs
    public function __construct()
    {
        $this->stoppuhr = time() + microtime();

        $this->setCharset('ISO-8859-1');
        $conf = Configuration::getInstance();
        $this->host = $conf->get('Mail', 'Host');
        $this->username = $conf->get('Mail', 'User');
        $this->password = $conf->get('Mail', 'Password');
        $this->from = $conf->get('Mail', 'From');
        $this->auth = true; //$conf->get('Mail','SMTPAuth');
        $this->port = 25;
        $this->attachement = null;
        if (!isset(self::$mailer))
        {
            //Logger::getInstance()->Log('Mailer initialisiert',LOG_ABLAUF);
            self::$mailer = Mail::factory('smtp', array('host' => $this->host, 'port' => $this->port, 'auth' => $this->auth, 'username' => $this->username, 'password' => $this->password, 'persist' => true, 'pipelining' => true));
        }

    }
Example #25
0
 protected function __construct()
 {
     $zConf = Configuration::getInstance();
     switch ($zConf->getCache()) {
         case 'apc':
             self::$cache = new \Doctrine\Common\Cache\ApcuCache();
             break;
         case 'couchbase':
             self::$cache = new \Doctrine\Common\Cache\CouchbaseCache();
             break;
         case 'file':
             self::$cache = new \Doctrine\Common\Cache\FilesystemCache(self::DIR);
             break;
         case 'mem':
             self::$cache = new \Doctrine\Common\Cache\MemcacheCache();
             break;
         case 'mongodb':
             throw new \Exception('MongoDB not implemented yet.');
         case 'phpfile':
             self::$cache = new \Doctrine\Common\Cache\PhpFileCache(self::DIR);
             break;
         case 'redis':
             self::$cache = new \Doctrine\Common\Cache\RedisCache();
             break;
         case 'riak':
             throw new \Exception('Riak not implmenented yet.');
         case 'wincache':
             self::$cache = new \Doctrine\Common\Cache\WinCacheCache();
             break;
         case 'xcache':
             self::$cache = new \Doctrine\Common\Cache\XcacheCache();
             break;
         case 'zend':
             self::$cache = new \Doctrine\Common\Cache\ZendDataCache();
             break;
         case 'none':
         default:
             self::$cache = new Cache\Dummy();
             break;
     }
 }
Example #26
0
	private function __construct()
	{
		/*$this->numberOfLanguages = Configuration::getInstance()->get('Language','numberOfLanguages');
        $langData = Configuration::getInstance()->getArray('language'); 
             $settings = unserialize(SETTINGS);   */
        $langData =  Configuration::getInstance()->getArray('language');
        
        // isolate default language
        $default = empty($langData['default']) ? '1' : $langData['default'];
        if(isset($langData['default']))
            unset($langData['default']);
        
        // build langArray
        $langArray = array();
        $items = array('short','Long','Name');
        foreach($langData as $index => $set)
            $langArray[$index] = array_combine($items,explode(',',$set));
        
        // set class vars
        $this->languageArray = $langArray;
        $this->numberOfLanguages = count($langArray);
        $this->defaultlanguage = $default;
	}
Example #27
0
 public function get()
 {
     $configuracion = Configuration::getInstance();
     $idioma = Translate::locale();
     $inmuebles = Inmuebles::allContenido(array('inmuebles.activo' => 1), null, null, $idioma);
     foreach ($inmuebles as $i => $inmueble) {
         if (!isset($inmueble->contenidos[$idioma])) {
             unset($inmuebles[$i]);
             continue;
         }
         $inmueble->fotos = Inmuebles_Fotos::all(array('inmueble_id' => $inmueble->id), array('posicion'));
     }
     $twitter = null;
     if (!empty($configuracion->twitter)) {
         $twitter = $this->twitter($configuracion->twitter);
     }
     $title = $configuracion->getContent('title', $idioma);
     # __('Principal');
     if (null === $title) {
         $title = __('Principal');
     }
     return array('title' => $title, 'nombre' => $configuracion->nombre, 'efecto' => $configuracion->efecto, 'twitter' => $twitter, 'idioma' => $idioma, 'inmuebles' => $inmuebles);
 }
Example #28
0
    public function __construct()
    {
        /*
        $this->host='db523.1und1.de';
        $this->user='******';
        $this->passwd='NHEhYC9g';
        $this->dbname='db155195156';
        */
        $conf = Configuration::getInstance();
        if (Server::isLocalServer()) {
            $this->host = $conf->get('Database', 'LocalHost');
            $this->user = $conf->get('Database', 'LocalUser');
            $this->passwd = $conf->get('Database', 'LocalPasswd');
            $this->dbname = $conf->get('Database', 'LocalDB');
            $this->DBMS = $conf->get('Database', 'LocalDBMS');
            $this->locktable = $conf->get('Database', 'LocalLockTable');
        } else {
            $this->host = $conf->get('Database', 'RemoteHost');
            $this->user = $conf->get('Database', 'RemoteUser');
            $this->passwd = $conf->get('Database', 'RemotePasswd');
            $this->dbname = $conf->get('Database', 'RemoteDB');
            $this->DBMS = $conf->get('Database', 'RemoteDBMS');
            $this->locktable = $conf->get('Database', 'RemoteLockTable');
        }

        //$this->dbname='avaris_19_9_06';

        //Data for the Article-Tables
        $config = Configuration::getInstance(); //10.04.2007 MG
        $this->prefix = $config->get('Database', 'DBPrefix'); //10.04.2007 MG
        $this->articleTable = $this->prefix . 'articles'; //10.04.2007 MG
        $this->descriptionTable = $this->prefix . 'article_descriptions'; //10.04.2007 MG
        $this->parentIDTable = $this->prefix . 'article_to_parent_ids'; //10.04.2007 MG
        $this->archiveTable = $this->prefix . 'article_archive';

    }
 private function saveImageWithResize()
 {
     if (isset($_REQUEST['image_deleted'])) {
         if ("1" == $_REQUEST['image_deleted']) {
             // setting all image fields empty to indicate the product has no image anymore
             // the previous version of the product will still reference the image
             $this->bean->image_mime_type = $this->bean->image_filename = $this->bean->image_unique_filename = '';
             // setting to empty string instead of setting to null. because setting to null does not set the db entry to null.
         }
     }
     // this assumes that edit view form has enctype="multipart/form-data" set
     $file = $_FILES['select_image_filename'];
     if (empty($file['name']) && empty($file['type']) && empty($file['tmp_name'])) {
         // don't do anything. we assume the old product image is still valid and keep everything as is.
         $GLOBALS['log']->warn("oqc_ProductController::saveImage() name, type, tmp_name of image are empty. Will not upload any file.");
         return;
     } else {
         if ($file['error'] != 0) {
             // TODO handle different error codes
             // TODO what do they mean??
             $GLOBALS['log']->warn("oqc_ProductController::saveImage() Could not upload any files because error {$file['error']} is reported.");
             return;
         } else {
             // note: perhaps there was previous image for this product and the user uploaded a new one.
             // we must not delete the old picture because a new version of the product will automatically created.
             // the older version of the product still displays the previous image.
             // 2.1 Use standard config.php settings for upload dir and max file size. It fileUploadDir key exist in document.properties, then use values from openqc configuration file. By default openqc values are disabled.
             global $sugar_config;
             require_once 'include/oqc/common/Configuration.php';
             $conf = Configuration::getInstance();
             $oqc_uploadDir = $conf->get('fileUploadDir');
             $oqc_maxFileSize = $conf->get('maximumUploadFileSize');
             $uploadDir = $oqc_uploadDir ? $oqc_uploadDir : $sugar_config['upload_dir'];
             $maxFileSize = $oqc_maxFileSize ? $oqc_maxFileSize : $sugar_config['upload_maxsize'];
             if ($file['size'] > $maxFileSize) {
                 $GLOBALS['log']->warn("oqc_ProductController::saveImage() Image size (" . $file['size'] . ") exceeds maximumUploadFileSize (" . $maxFileSize . "). Please check configuration.");
             } else {
                 // TODO how browser/server (?) finds out mime type (can we trust it?)
                 if (!$this->bean->isMimeTypeAllowed($file['type'])) {
                     $GLOBALS['log']->warn("oqc_ProductController::saveImage() Image has a invalid mime type " . $file['type']);
                 } else {
                     $this->bean->image_mime_type = $file['type'];
                     $this->bean->image_filename = basename($file['name']);
                     $id = str_replace('.', '', uniqid('i', true));
                     // we have to remove the dots from the generated id because latex can only determine the filetype properly if the only dot in the filename is in front of the file extension.
                     $fileExtension = substr($this->bean->image_filename, strrpos($this->bean->image_filename, '.') + 1);
                     $this->bean->image_unique_filename = $id . "." . $fileExtension;
                     // we have to add the original file extension to make sure latex can later determine the filetype when generating the pdf.
                     $from = $file['tmp_name'];
                     $to = $uploadDir . $this->bean->image_unique_filename;
                     $thumbname = $uploadDir . 'th' . $this->bean->image_unique_filename;
                     if (!move_uploaded_file($from, $to)) {
                         $GLOBALS['log']->warn("oqc_ProductController::saveImage() could not move file from {$from} to {$to}. Please check configuration file and permissions");
                         return;
                     } else {
                         if (!resizeImage($to, $thumbname, 700)) {
                             $GLOBALS['log']->debug("oqc_ProductController::saveImage() image could not be resized");
                         }
                     }
                 }
             }
         }
     }
 }
Example #30
0
 /**
  * Get public key
  *
  * Gets the public key for the issuer. If our own identity provider is the issuer, we
  * can load our own public key avoiding network traffic.
  *
  * @access public
  * @static
  * @param string $issuer The issuers domain
  * @return AbstractPublicKey
  */
 public static function getPublicKey($issuer)
 {
     // allow other retrievers for testing
     if ($issuer === Configuration::getInstance()->get("hostname")) {
         return Secrets::loadPublicKey();
     }
     /*else if (config.get('disable_primary_support')) {
         throw new \Exception("this verifier doesn't respect certs issued from domains other than: " . Configuration::getInstance()->get("hostname"));
       }*/
     // let's go fetch the public key for this host
     return Primary::getPublicKey($issuer);
 }