コード例 #1
0
ファイル: CleanupHistoryCommand.php プロジェクト: sulu/sulu
 public function __construct(SessionManagerInterface $sessionManager, SessionInterface $defaultSession, SessionInterface $liveSession)
 {
     $this->sessionManager = $sessionManager;
     $this->defaultSession = $defaultSession;
     $this->liveSession = $liveSession;
     parent::__construct();
 }
コード例 #2
0
 /**
  * @param EventRepository      $eventRepository
  * @param EventProcessor       $eventProcessor
  * @param LockHandlerInterface $lockHandler
  * @param null|string          $name
  */
 public function __construct(EventRepository $eventRepository, EventProcessor $eventProcessor, LockHandlerInterface $lockHandler, $name = null)
 {
     $this->eventRepository = $eventRepository;
     $this->eventProcessor = $eventProcessor;
     $this->lockHandler = $lockHandler;
     parent::__construct($name);
 }
コード例 #3
0
 public function __construct($name, $description = null)
 {
     parent::__construct($name);
     if ($description) {
         $this->setDescription($description);
     }
 }
コード例 #4
0
 /**
  * Provides default options for all commands. This function should be called explicitly (i.e. parent::configure())
  * if the configure function is overridden.
  *
  * {@inheritdoc}
  */
 public function __construct($name = null)
 {
     $this->runtimeConfig = new RuntimeConfig($this);
     $this->advanceExecutionPhase(RuntimeConfig::PHASE_CONSTRUCT);
     parent::__construct($name);
     $this->advanceExecutionPhase(RuntimeConfig::PHASE_POST_CONSTRUCT);
 }
コード例 #5
0
 public function __construct(ResourceWatcher $watcher, $watchPath, PhotoService $photoService)
 {
     $this->watcher = $watcher;
     $this->watchPath = $watchPath;
     $this->photoService = $photoService;
     parent::__construct();
 }
コード例 #6
0
 /**
  * @param DocumentRepository $documentRepository
  * @param ResourceGenerator  $generator
  */
 public function __construct(DocumentRepository $documentRepository, ResourceGenerator $generator)
 {
     parent::__construct(self::NAME);
     $this->setDescription('Generate DTO-like classes using the resource schema definitions in a swagger document')->setHelp('This is a development tool and will only work with require-dev dependencies included')->addArgument('file', InputArgument::REQUIRED, 'File path to the Swagger document')->addArgument('bundle', InputArgument::REQUIRED, 'Name of the bundle you want the classes in')->addOption('namespace', null, InputOption::VALUE_REQUIRED, 'Namespace of the classes to generate (relative to the bundle namespace)', 'Model\\Resources');
     $this->documentRepository = $documentRepository;
     $this->generator = $generator;
 }
コード例 #7
0
ファイル: EmsCommand.php プロジェクト: theus77/ElasticMS
 public function __construct(Logger $logger, Client $client, Session $session)
 {
     $this->logger = $logger;
     $this->client = $client;
     $this->session = $session;
     parent::__construct();
 }
 public function __construct(DatabaseHandler $db, LoggerInterface $logger = null)
 {
     parent::__construct();
     $this->db = $db;
     $this->logger = $logger;
     $this->converter = new Aggregate(array(new ToRichTextPreNormalize(new Expanding(), new EmbedLinking()), new Xslt('./vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/FieldType/RichText/Resources/stylesheets/ezxml/docbook/docbook.xsl', array(array('path' => './vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/FieldType/RichText/Resources/stylesheets/ezxml/docbook/core.xsl', 'priority' => 99)))));
     $this->validator = new Validator(array('./vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/FieldType/RichText/Resources/schemas/docbook/ezpublish.rng', './vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/FieldType/RichText/Resources/schemas/docbook/docbook.iso.sch.xsl'));
 }
コード例 #9
0
ファイル: AlignCommand.php プロジェクト: theus77/ElasticMS
 public function __construct(Registry $doctrine, Logger $logger, Client $client, DataService $data)
 {
     $this->doctrine = $doctrine;
     $this->logger = $logger;
     $this->client = $client;
     $this->data = $data;
     parent::__construct();
 }
コード例 #10
0
 function __construct(EntityManager $em, $linkIterators)
 {
     $this->em = $em;
     foreach ($linkIterators as $name => $it) {
         $this->addLinkIterator($name, $it);
     }
     parent::__construct();
 }
コード例 #11
0
 public function __construct($name = null)
 {
     parent::__construct($name);
     $this->log = array();
     $this->timeStart = microtime(true);
     $now = date('Y-m-d H:i:s');
     $this->log[] = "<info>Start: {$now}</info>";
 }
コード例 #12
0
 /**
  * SitemapGeneratorCommand constructor.
  *
  * @param RouterInterface $router
  * @param ObjectManager   $objectManager
  * @param array           $config
  */
 public function __construct(RouterInterface $router, ObjectManager $objectManager, array $config)
 {
     $this->objectManager = $objectManager;
     $this->router = $router;
     $this->config = $config;
     $this->accessor = PropertyAccess::createPropertyAccessor();
     parent::__construct();
 }
コード例 #13
0
 /**
  * Constructor.
  *
  * @param    $kernel    HttpKernelInterface A HttpKernelInterface instance
  * @access    public
  * @author    Etienne de Longeaux <*****@*****.**>
  */
 public function __construct($kernel = null)
 {
     parent::__construct();
     //-----we initialize the container-----
     if (is_object($kernel) && method_exists($kernel, 'getContainer')) {
         $this->setContainer($kernel->getContainer());
     }
 }
コード例 #14
0
 public function __construct(Registry $doctrine, Logger $logger, UserService $userService, NotificationService $notificationService, $notificationPendingTimeout)
 {
     $this->doctrine = $doctrine;
     $this->logger = $logger;
     $this->userService = $userService;
     $this->notificationService = $notificationService;
     $this->notificationPendingTimeout = $notificationPendingTimeout;
     parent::__construct();
 }
コード例 #15
0
 function __construct(EntityManager $em, Client $client, array $parsers)
 {
     $this->client = $client;
     $this->em = $em;
     foreach ($parsers as $name => $parser) {
         $this->addParser($name, $parser);
     }
     parent::__construct();
 }
コード例 #16
0
 /**
  *
  * Public constructor
  * @param null|string $crawler_str
  * @param $engine_str
  * @param $directory
  * @param $number_of_lines
  * @param PopulatorInterface $populator
  */
 public function __construct($crawler_str, $engine_str, $directory, $number_of_lines, $populator)
 {
     $this->crawler = $crawler_str;
     $this->engine = $engine_str;
     $this->directory = getcwd() . '/src/CrawlerBundle/Resources/Files';
     $this->number_of_lines = $number_of_lines;
     $this->populator = $populator;
     parent::__construct();
 }
コード例 #17
0
 /**
  * If no cache manager is specified explicitly, fos_http_cache.cache_manager
  * is automatically loaded.
  *
  * Passing CacheManager as argument is deprecated and will be restricted to TagHandler in 2.0.
  *
  * @param TagHandler|CacheManager|null $tagHandler  The tag handler to talk to.
  * @param string                       $commandName Name of this command, in case you want to reuse it.
  */
 public function __construct($tagHandler = null, $commandName = 'fos:httpcache:invalidate:tag')
 {
     if (!($tagHandler instanceof TagHandler || $tagHandler instanceof CacheManager || null === $tagHandler)) {
         throw new \InvalidArgumentException(sprintf('Expected instance of TagHandler, CacheManager or null, but got %s', get_class($tagHandler)));
     }
     $this->commandName = $commandName;
     $this->tagHandler = $tagHandler;
     parent::__construct();
 }
コード例 #18
0
 public function __construct(Registry $doctrine, Logger $logger, Client $client, $mapping, $container)
 {
     $this->doctrine = $doctrine;
     $this->logger = $logger;
     $this->client = $client;
     $this->mapping = $mapping;
     $this->container = $container;
     parent::__construct();
 }
コード例 #19
0
 public function __construct(\Twig_Environment $twig, TemplateNameParser $templateNameParser, TemplateIterator $templateIterator, TemplateLocator $locator)
 {
     parent::__construct();
     $this->iterator = new MultipleIterator(MultipleIterator::MIT_NEED_ANY);
     $this->templateIterator = $templateIterator;
     $this->templateNameParser = $templateNameParser;
     $this->twig = $twig;
     $this->locator = $locator;
 }
コード例 #20
0
 public function __construct($serverLoginUrl, $serverTicket, $requestOptions, $apiRecolnatBaseUri, $apiRecolnatUserPath)
 {
     $this->serverLoginUrl = $serverLoginUrl;
     $this->serverTicket = $serverTicket;
     $this->requestOptions = $requestOptions;
     $this->apiRecolnatBaseUri = $apiRecolnatBaseUri;
     $this->apiRecolnatUserPath = $apiRecolnatUserPath;
     parent::__construct();
 }
コード例 #21
0
 public function __construct($name, $connectionName, ProcessorInterface $processor, array $processorStack, array $extras, LoggerInterface $logger = null)
 {
     $this->name = $name;
     $this->connectionName = $connectionName;
     $this->processor = $processor;
     $this->processorStack = $processorStack;
     $this->extras = $extras;
     $this->logger = $logger;
     parent::__construct();
 }
コード例 #22
0
 public function __construct($name = null)
 {
     $finder = Finder::create()->in(__DIR__ . '/../Resources/wurst')->name('*.txt')->depth(0)->filter(function (SplFileInfo $file) {
         return $file->isReadable();
     });
     foreach ($finder as $file) {
         $this->wurstTypes[] = basename($file->getRelativePathName(), '.txt');
     }
     parent::__construct($name);
 }
コード例 #23
0
 /**
  * If no cache manager is specified explicitly, fos_http_cache.cache_manager
  * is automatically loaded.
  *
  * Passing CacheManager as argument is deprecated and will be restricted to TagHandler in 2.0.
  *
  * @param TagHandler|CacheManager|null $tagHandler  The tag handler to talk to
  * @param string                       $commandName Name of this command, in case you want to reuse it
  */
 public function __construct($tagHandler = null, $commandName = 'fos:httpcache:invalidate:tag')
 {
     if (!($tagHandler instanceof TagHandler || $tagHandler instanceof CacheManager || null === $tagHandler)) {
         throw new \InvalidArgumentException(sprintf('Expected instance of TagHandler, CacheManager or null, but got %s', get_class($tagHandler)));
     }
     if ($tagHandler instanceof CacheManager) {
         @trigger_error('Passing the CacheManager to ' . __CLASS__ . ' is deprecated since version 1.2 and will be removed in 2.0. Provide the TagHandler instead.', E_USER_DEPRECATED);
     }
     $this->commandName = $commandName;
     $this->tagHandler = $tagHandler;
     parent::__construct();
 }
コード例 #24
0
 /**
  * Consctruct method
  * 
  * @param string $name Name value, by default null
  */
 public function __construct($name = null)
 {
     $this->wurstTypes = $this->findFood(__DIR__ . '/../Resources/wurst');
     $this->sides = $this->findFood(__DIR__ . '/../Resources/sides');
     parent::__construct($name);
 }
コード例 #25
0
 /**
  * ListConfigsCommand constructor.
  * @param null|string $name
  */
 public function __construct($name = null)
 {
     parent::__construct($name);
     $constants = get_defined_constants(true);
     $this->_curlConstants = array_flip($constants['curl']);
 }
コード例 #26
0
 public function __construct(SystemInfoCollectorRegistry $systemInfoCollectorRegistry, OutputFormatRegistry $outputFormatRegistry)
 {
     $this->systemInfoCollectorRegistry = $systemInfoCollectorRegistry;
     $this->outputFormatRegistry = $outputFormatRegistry;
     parent::__construct();
 }
コード例 #27
0
ファイル: CopyCommand.php プロジェクト: kl3sk/chosenbundle
 public function __construct()
 {
     parent::__construct();
     // Symfony file system
     $this->fs = new Filesystem();
 }
 public function __construct($name = null)
 {
     parent::__construct($name ?: 'locator:debug');
 }
コード例 #29
0
 /**
  * {@inheritDoc}
  */
 public function __construct($name = null)
 {
     $this->pathUtility = new PathUtility();
     parent::__construct($name);
 }
コード例 #30
0
 public function __construct()
 {
     parent::__construct($name = null);
     $this->versions = array('v1', 'v2');
 }