Exemple #1
0
 /**
  * @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');
 }
Exemple #3
0
 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');
 }
Exemple #4
0
 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();
 }
Exemple #5
0
 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');
 }
Exemple #6
0
 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);
 }
Exemple #8
0
 /**
  * @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;
             }
         }
     }
 }
Exemple #9
0
 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);
     }
 }
Exemple #10
0
 /**
  * @param Context $context
  * @param Request $request
  */
 public function __construct(Context $context, Request $request)
 {
     parent::__construct($context);
     $this->request = $request;
 }
Exemple #11
0
 public function __construct(Context $context)
 {
     parent::__construct($context);
     $this->config = $context->getService('config');
     $this->dc = $context->getService('doctrine');
 }
Exemple #12
0
 public function __construct(\Foolz\Foolframe\Model\Context $context)
 {
     parent::__construct($context);
     $this->dc = $context->getService('doctrine');
     $this->radix_coll = $context->getService('foolfuuka.radix_collection');
 }
Exemple #13
0
 public function __construct(\Foolz\FoolFrame\Model\Context $context)
 {
     parent::__construct($context);
     $this->dc = $context->getService('doctrine');
     $this->users = $this->getContext()->getService('users');
 }
Exemple #14
0
 /**
  * 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);
     }
 }
Exemple #15
0
 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');
 }
Exemple #17
0
 /**
  * @param Context $context
  */
 public function __construct(Context $context)
 {
     parent::__construct($context);
     $this->profiler = $context->getService('profiler');
 }