/** * @param Context $context */ public function __construct(Context $context) { parent::__construct($context); $this->config = $context->getService('config'); $this->profiler = $context->getService('profiler'); $this->dc = $context->getService('doctrine'); $this->security = $this->getContext()->getService('security'); }
public function __construct(\Foolz\Foolframe\Model\Context $context) { parent::__construct($context); $this->dc = $context->getService('doctrine'); $this->preferences = $context->getService('preferences'); $this->config = $context->getService('config'); $this->profiler = $context->getService('profiler'); }
public function __construct(\Foolz\FoolFrame\Model\Context $context, RadixCollection $collection) { parent::__construct($context); $this->collection = $collection; $this->dc = $context->getService('doctrine'); $this->preferences = $context->getService('preferences'); $this->config = $context->getService('config'); }
public function __construct(\Foolz\FoolFrame\Model\Context $context) { parent::__construct($context); $this->dc = $context->getService('doctrine'); $this->uri = $context->getService('uri'); $this->radix_coll = $context->getService('foolfuuka.radix_collection'); $this->media_factory = $context->getService('foolfuuka.media_factory'); $this->ban_factory = $context->getService('foolfuuka.ban_factory'); $this->preload(); }
public function __construct(\Foolz\Foolframe\Model\Context $context) { parent::__construct($context); $this->dc = $context->getService('doctrine'); $this->preferences = $context->getService('preferences'); $this->config = $context->getService('config'); $this->profiler = $context->getService('profiler'); $this->series_factory = $context->getService('foolslide.series_factory'); $this->release_factory = $context->getService('foolslide.release_factory'); }
public function __construct(Context $context) { parent::__construct($context); $this->config = $context->getService('config'); $config = $this->config->get('foolz/foolframe', 'swiftmailer'); switch ($config['transport']) { case 'smtp': $transport = Swift_SmtpTransport::newInstance()->setHost($config['host'])->setPort($config['port'])->setUsername($config['username'])->setPassword($config['password'])->setEncryption($config['encryption'])->setAuthMode('login'); break; default: $transport = Swift_SendmailTransport::newInstance(); } $this->mailer = Swift_Mailer::newInstance($transport); }
/** * Creates a new connection to the database * * @param Context $context * @param array|Config $db_data */ public function __construct(Context $context, $db_data = []) { parent::__construct($context); // load the defaults if the config object has been passed if ($db_data instanceof Config) { $db_data = $db_data->get('foolz/foolframe', 'db', 'default'); } $config = new Configuration(); $config->setSQLLogger(new DoctrineLogger($context)); $data = ['dbname' => $db_data['dbname'], 'user' => $db_data['user'], 'password' => $db_data['password'], 'host' => $db_data['host'], 'driver' => $db_data['driver']]; if ($db_data['driver'] == 'pdo_mysql') { $data['charset'] = $db_data['charset']; } $this->prefix = $db_data['prefix']; $this->connection = DriverManager::getConnection($data, $config); }
/** * @param Context $context */ public function __construct(Context $context) { parent::__construct($context); $this->dc = $context->getService('doctrine'); $this->preferences = $context->getService('preferences'); $this->config = $context->getService('config'); // load an empty user with no rights $this->user = new User($this->getContext(), []); $this->groups = $this->config->get('foolz/foolframe', 'foolauth', 'groups'); foreach ($this->config->get('foolz/foolframe', 'config', 'modules.installed') as $module) { foreach ($this->config->get($module['namespace'], 'foolauth', 'roles') as $key => $item) { if (!isset($this->roles[$key])) { $this->roles[$key] = $item; } else { $this->roles[$key] += $item; } } } }
public function __construct(\Foolz\FoolFrame\Model\Context $context, CommentBulk $bulk = null) { parent::__construct($context); $this->dc = $context->getService('doctrine'); $this->config = $context->getService('config'); $this->preferences = $context->getService('preferences'); $this->logger = $context->getService('logger'); $this->uri = $context->getService('uri'); $this->audit = $context->getService('foolfuuka.audit_factory'); $this->comment_factory = $context->getService('foolfuuka.comment_factory'); $this->media_factory = $context->getService('foolfuuka.media_factory'); $this->ban_factory = $context->getService('foolfuuka.ban_factory'); $this->radix_coll = $context->getService('foolfuuka.radix_collection'); $this->report_coll = $context->getService('foolfuuka.report_collection'); if ($bulk !== null) { $this->setBulk($bulk); } }
/** * @param Context $context * @param Request $request */ public function __construct(Context $context, Request $request) { parent::__construct($context); $this->request = $request; }
public function __construct(Context $context) { parent::__construct($context); $this->config = $context->getService('config'); $this->dc = $context->getService('doctrine'); }
public function __construct(\Foolz\Foolframe\Model\Context $context) { parent::__construct($context); $this->dc = $context->getService('doctrine'); $this->radix_coll = $context->getService('foolfuuka.radix_collection'); }
public function __construct(\Foolz\FoolFrame\Model\Context $context) { parent::__construct($context); $this->dc = $context->getService('doctrine'); $this->users = $this->getContext()->getService('users'); }
/** * Takes the data from a Comment to forge a Media object * * @param object|array $comment An array or object, the construct will use its keys to create a Media object * @param Radix $radix The Radix in which the Media can be found * @param boolean $op If this media is referred to an opening post */ public function __construct(\Foolz\Foolframe\Model\Context $context, CommentBulk $bulk = null) { parent::__construct($context); $this->dc = $context->getService('doctrine'); $this->preferences = $context->getService('preferences'); $this->config = $context->getService('config'); $this->uri = $context->getService('uri'); $this->radix_coll = $context->getService('foolslide.radix_collection'); $this->media_factory = $context->getService('foolslide.media_factory'); if ($bulk !== null) { $this->setBulk($bulk); } }
public function __construct(\Foolz\Foolframe\Model\Context $context) { parent::__construct($context); $this->dc = $context->getService('doctrine'); $this->profiler = $context->getService('profiler'); $this->comment_factory = $context->getService('foolslide.comment_factory'); }
public function __construct(Context $context) { parent::__construct($context); $this->preferences = $context->getService('preferences'); }
/** * @param Context $context */ public function __construct(Context $context) { parent::__construct($context); $this->profiler = $context->getService('profiler'); }