Skip to content

Commit

Permalink
Merge pull request #5 from alexplusde/type_hinting
Browse files Browse the repository at this point in the history
type hinting & rexstan
  • Loading branch information
alxndr-w committed Nov 24, 2023
2 parents 2716a3c + 6396a80 commit 3e07c77
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 25 deletions.
4 changes: 3 additions & 1 deletion install.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php

$addon = rex_addon::get('mailer_profile');

if (rex_addon::get('yform')->isAvailable() && !rex::isSafeMode()) {
rex_yform_manager_table_api::importTablesets(rex_file::get(rex_path::addon($this->name, 'install/rex_mailer_profile.tableset.json')));
rex_yform_manager_table_api::importTablesets(rex_file::get(rex_path::addon($addon->getName(), 'install/rex_mailer_profile.tableset.json')));
rex_yform_manager_table::deleteCache();
}
3 changes: 0 additions & 3 deletions lang/de_de.lang
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,3 @@ mailer_profile_title = Profile
mailer_profile_table_name_label = Profilname

# Alle weiteren Übersetzungen kommen vom PHPMailer-Addon

mailer_profile_info_donate = Anders als die meisten Addons aus der REDAXO-Community ist die Entstehung und Weiterentwicklung dieses Addons nicht durch eigene Projekte gedeckt. mit einer einer Beauftragung sicherst du zusätzliche Features, die Stabilität, Funktionsumfang und Weiterentwicklung weiter verbessern können, sowie eine bessere Anleitung.
mailer_profile_donate = Weiterentwicklung unterstützen
34 changes: 17 additions & 17 deletions lib/mailer_profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class mailer_profile extends \rex_yform_manager_dataset
{
public static function setProfile($ep)
public static function setProfile(rex_extension_point $ep): void
{
$mailer = $ep->getSubject();
$profile = rex_addon::get('mailer_profile')->getConfig('current');
Expand Down Expand Up @@ -48,82 +48,82 @@ public function getArchive(): string
return $this->getValue('archive');
}

public function getFrom()
public function getFrom(): string
{
return $this->getValue('from');
}

public function getFromName()
public function getFromName(): string
{
return $this->getValue('fromname');
}

public function getConfirmReadingTo()
public function getConfirmReadingTo(): string
{
return $this->getValue('confirmto');
}

public function getMailer()
public function getMailer(): string
{
return $this->getValue('mailer');
}

public function getHost()
public function getHost(): string
{
return $this->getValue('host');
}

public function getPort()
public function getPort(): int
{
return $this->getValue('port');
}

public function getCharSet()
public function getCharSet(): string
{
return $this->getValue('charset');
}

public function getWordWrap()
public function getWordWrap(): int
{
return $this->getValue('wordwrap');
}

public function getEncoding()
public function getEncoding(): string
{
return $this->getValue('encoding');
}

public function getSMTPDebug()
public function getSMTPDebug(): bool
{
return $this->getValue('smtp_debug');
}

public function getSMTPSecure()
public function getSMTPSecure(): string
{
return $this->getValue('smtpsecure');
}

public function getSMTPAuth()
public function getSMTPAuth(): bool
{
return $this->getValue('smtpauth');
}

public function getSMTPAutoTLS()
public function getSMTPAutoTLS(): bool
{
return $this->getValue('security_mode');
}

public function getUsername()
public function getUsername(): string
{
return $this->getValue('username');
}

public function getPassword()
public function getPassword(): string
{
return $this->getValue('password');
}

public function getPriority()
public function getPriority(): ?int
{
if (0 == $this->getValue('priority')) {
return null;
Expand Down
4 changes: 3 additions & 1 deletion pages/phpmailer.profile.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php

$yform = $this->getProperty('yform', []);
$addon = rex_addon::get('mailer_profile');

$yform = $addon->getProperty('yform', []);
$yform = $yform[\rex_be_controller::getCurrentPage()] ?? [];

$table_name = 'rex_mailer_profile';
Expand Down
3 changes: 0 additions & 3 deletions uninstall.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
<?php

rex_config::removeNamespace('mailer_profile');
if (rex_addon::get('yform')->isAvailable() && !rex::isSafeMode()) {
rex_yform_manager_table_api::removeTable('rex_mailer_profile');
}

0 comments on commit 3e07c77

Please sign in to comment.