Ejemplo n.º 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');
 }
Ejemplo n.º 2
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');
 }
Ejemplo n.º 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');
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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');
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 7
0
 /**
  * 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);
 }
Ejemplo n.º 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;
             }
         }
     }
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 10
0
 /**
  * @param Context $context
  * @param Request $request
  */
 public function __construct(Context $context, Request $request)
 {
     parent::__construct($context);
     $this->request = $request;
 }
Ejemplo n.º 11
0
 public function __construct(Context $context)
 {
     parent::__construct($context);
     $this->config = $context->getService('config');
     $this->dc = $context->getService('doctrine');
 }
Ejemplo n.º 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');
 }
Ejemplo n.º 13
0
 public function __construct(\Foolz\FoolFrame\Model\Context $context)
 {
     parent::__construct($context);
     $this->dc = $context->getService('doctrine');
     $this->users = $this->getContext()->getService('users');
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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');
 }
Ejemplo n.º 16
0
 public function __construct(Context $context)
 {
     parent::__construct($context);
     $this->preferences = $context->getService('preferences');
 }
Ejemplo n.º 17
0
 /**
  * @param Context $context
  */
 public function __construct(Context $context)
 {
     parent::__construct($context);
     $this->profiler = $context->getService('profiler');
 }