public function __construct(KConfig $config) { parent::__construct($config); if (isset($config->adapters)) { $this->_adapters = $config->adapters; } }
public function __construct($config = array()) { parent::__construct($config); if (!empty($config->auto_load)) { $this->load(); } }
public function __construct($config = array()) { parent::__construct($config); if (!empty($config->comma_separated)) { $this->_comma_separated = $config->comma_separated; } }
public function __construct(KConfig $config = null) { parent::__construct($config); $this->_message = Swift_Message::newInstance(); switch ($config->method) { case 'sendmail': // WIP required -bs or -t switch $transport = Swift_SendmailTransport::newInstance($config->sendmail); break; case 'smtp': if ($config->smtpauth == 1) { if ($config->smtpsecure != "none") { $transport = Swift_SmtpTransport::newInstance($config->smtphost, $config->smtpport, $config->smtpsecure)->setUsername($config->smtpuser)->setPassword($config->smtppass); } else { $transport = Swift_SmtpTransport::newInstance($config->smtphost, $config->smtpport)->setUsername($config->smtpuser)->setPassword($config->smtppass); } } else { if ($config->smtpsecure != "none") { $transport = Swift_SmtpTransport::newInstance($config->smtphost, $config->smtpport, $config->smtpsecure); } else { $transport = Swift_SmtpTransport::newInstance($config->smtphost, $config->smtpport); } } break; case 'spool': // TODO: Make spool options configurable. $transport = Swift_SpoolTransport::newInstance(new Swift_FileSpool('/var/spool/swift')); break; case 'mail': default: $transport = Swift_MailTransport::newInstance(); break; } $this->_mailer = Swift_Mailer::newInstance($transport); }
/** * Constructor * * @param object An optional KConfig object with configuration options. */ public function __construct(KConfig $config = null) { parent::__construct($config); $this->_name = $config->name; $this->_path = $config->path; }
/** * Object constructor * * @param object An optional KConfig object with configuration options. */ public function __construct(KConfig $config = null) { parent::__construct($config); // Set the table indentifier if (isset($config->table)) { $this->setTable($config->table); } }
/** * Object constructor * * @param object An optional KConfig object with configuration options. */ public function __construct(KConfig $config = null) { parent::__construct($config); $this->_table = $config->table; // Reset the row $this->reset(); // Reset the row data if (isset($config->data)) { $this->setData($config->data->toArray(), $this->_new); } }
/** * Object constructor * * @param object An optional KConfig object with configuration options. */ public function __construct(KConfig $config = null) { parent::__construct($config); $this->_document = $config->document; // Reset the row $this->reset(); // Reset the row data if (isset($config->data)) { $this->setData(KConfig::unbox($config->data), $this->_new); } }
public function __construct(KConfig $config) { parent::__construct($config); $this->mixin(new KMixinCommandchain($config->append(array('mixer' => $this)))); if ($config->validator !== false) { if ($config->validator === true) { $config->validator = 'com://admin/files.command.validator.' . $this->getIdentifier()->name; } $this->getCommandChain()->enqueue($this->getService($config->validator)); } }
public function __construct(KConfig $config) { parent::__construct($config); $this->mixin(new KMixinCommandchain($config->append(array('mixer' => $this)))); if ($config->validator !== false) { if ($config->validator === true) { $config->validator = 'com://admin/files.command.validator.' . $this->getIdentifier()->name; } $this->getCommandChain()->enqueue($this->getService($config->validator)); } $this->registerCallback(array('after.save', 'after.delete'), array($this, 'setPath')); $this->registerCallback(array('after.save'), array($this, 'saveThumbnail')); $this->registerCallback(array('after.delete'), array($this, 'deleteThumbnail')); }