当前位置: 首页>>代码示例>>PHP>>正文


PHP ContainerAwareCommand::__construct方法代码示例

本文整理汇总了PHP中Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP ContainerAwareCommand::__construct方法的具体用法?PHP ContainerAwareCommand::__construct怎么用?PHP ContainerAwareCommand::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand的用法示例。


在下文中一共展示了ContainerAwareCommand::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct(SessionManagerInterface $sessionManager, SessionInterface $defaultSession, SessionInterface $liveSession)
 {
     $this->sessionManager = $sessionManager;
     $this->defaultSession = $defaultSession;
     $this->liveSession = $liveSession;
     parent::__construct();
 }
开发者ID:sulu,项目名称:sulu,代码行数:7,代码来源:CleanupHistoryCommand.php

示例2: __construct

 /**
  * @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);
 }
开发者ID:pdenis,项目名称:delay-event-bundle,代码行数:13,代码来源:ProcessEventCommand.php

示例3: __construct

 public function __construct($name, $description = null)
 {
     parent::__construct($name);
     if ($description) {
         $this->setDescription($description);
     }
 }
开发者ID:mhlavac,项目名称:GeonamesBundle,代码行数:7,代码来源:AbstractImportCommand.php

示例4: __construct

 /**
  * 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);
 }
开发者ID:afrihost,项目名称:BaseCommandBundle,代码行数:13,代码来源:BaseCommand.php

示例5: __construct

 public function __construct(ResourceWatcher $watcher, $watchPath, PhotoService $photoService)
 {
     $this->watcher = $watcher;
     $this->watchPath = $watchPath;
     $this->photoService = $photoService;
     parent::__construct();
 }
开发者ID:grahamutton,项目名称:photog,代码行数:7,代码来源:PhotogWatchFolderCommand.php

示例6: __construct

 /**
  * @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;
 }
开发者ID:krizon,项目名称:swagger-bundle,代码行数:11,代码来源:GenerateResourceClassesCommand.php

示例7: __construct

 public function __construct(Logger $logger, Client $client, Session $session)
 {
     $this->logger = $logger;
     $this->client = $client;
     $this->session = $session;
     parent::__construct();
 }
开发者ID:theus77,项目名称:ElasticMS,代码行数:7,代码来源:EmsCommand.php

示例8: __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'));
 }
开发者ID:ezsystems,项目名称:ezplatform-xmltext-fieldtype,代码行数:8,代码来源:ConvertXmlTextToRichTextCommand.php

示例9: __construct

 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();
 }
开发者ID:theus77,项目名称:ElasticMS,代码行数:8,代码来源:AlignCommand.php

示例10: foreach

 function __construct(EntityManager $em, $linkIterators)
 {
     $this->em = $em;
     foreach ($linkIterators as $name => $it) {
         $this->addLinkIterator($name, $it);
     }
     parent::__construct();
 }
开发者ID:honzatrtik,项目名称:muzar-scraper,代码行数:8,代码来源:LinksCommand.php

示例11: __construct

 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>";
 }
开发者ID:pmdevelopment,项目名称:monitoring-bundle,代码行数:8,代码来源:SnmpCommand.php

示例12: __construct

 /**
  * 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();
 }
开发者ID:skuola,项目名称:SitemapBundle,代码行数:15,代码来源:SitemapGeneratorCommand.php

示例13: __construct

 /**
  * Constructor.
  *
  * @param    $kernel    HttpKernelInterface A HttpKernelInterface instance
  * @access    public
  * @author    Etienne de Longeaux <etienne.delongeaux@gmail.com>
  */
 public function __construct($kernel = null)
 {
     parent::__construct();
     //-----we initialize the container-----
     if (is_object($kernel) && method_exists($kernel, 'getContainer')) {
         $this->setContainer($kernel->getContainer());
     }
 }
开发者ID:pigroupe,项目名称:SfynxToolBundle,代码行数:15,代码来源:RoutesCommand.php

示例14: __construct

 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();
 }
开发者ID:theus77,项目名称:ElasticMS,代码行数:9,代码来源:SendNotificationsCommand.php

示例15: foreach

 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();
 }
开发者ID:honzatrtik,项目名称:muzar-scraper,代码行数:9,代码来源:ParseCommand.php


注:本文中的Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。