public function __construct($config = array())
 {
     parent::__construct($config);
     $this->app = JFactory::getApplication();
     // Get project ID.
     $this->projectId = $this->input->getUint('pid');
     // Prepare log object.
     $this->log = new Prism\Log\Log();
     // Set database log adapter if Joomla! debug is enabled.
     if ($this->logTable !== null and $this->logTable !== '' and JDEBUG) {
         $this->log->addAdapter(new Prism\Log\Adapter\Database(\JFactory::getDbo(), $this->logTable));
     }
     // Set file log adapter.
     if ($this->logFile !== null and $this->logFile !== '') {
         $file = \JPath::clean($this->app->get('log_path') . DIRECTORY_SEPARATOR . basename($this->logFile));
         $this->log->addAdapter(new Prism\Log\Adapter\File($file));
     }
     // Prepare context
     $filter = new JFilterInput();
     $paymentService = $filter->clean(trim(strtolower($this->input->getCmd('payment_service'))), 'ALNUM');
     $this->context = Joomla\String\StringHelper::strlen($paymentService) > 0 ? 'com_crowdfunding.notify.' . $paymentService : 'com_crowdfunding.notify';
     // Prepare params
     $this->params = JComponentHelper::getParams('com_crowdfunding');
     // Prepare container and some of the most used objects.
     $this->container = Prism\Container::getContainer();
     $this->prepareCurrency($this->container, $this->params);
     $this->prepareMoneyFormatter($this->container, $this->params);
 }
 public function __construct(&$subject, $config = array())
 {
     parent::__construct($subject, $config);
     // Create log object
     $this->log = new Prism\Log\Log();
     // Set file adapter.
     $file = \JPath::clean($this->app->get('log_path') . DIRECTORY_SEPARATOR . 'plg_crowdfunding_payoutoptions.php');
     $this->log->addAdapter(new Prism\Log\Adapter\File($file));
 }
 public function init()
 {
     jimport('Prism.init');
     jimport('Crowdfunding.init');
     jimport('Emailtemplates.init');
     // Create log object
     $this->log = new Prism\Log\Log();
     $file = JPath::clean(JFactory::getApplication()->get('log_path') . DIRECTORY_SEPARATOR . 'com_crowdfunding.php');
     $this->log->addAdapter(new Prism\Log\Adapter\File($file));
     // Load language
     $this->loadLanguage();
 }