本文整理汇总了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();
}
示例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);
}
示例3: __construct
public function __construct($name, $description = null)
{
parent::__construct($name);
if ($description) {
$this->setDescription($description);
}
}
示例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);
}
示例5: __construct
public function __construct(ResourceWatcher $watcher, $watchPath, PhotoService $photoService)
{
$this->watcher = $watcher;
$this->watchPath = $watchPath;
$this->photoService = $photoService;
parent::__construct();
}
示例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;
}
示例7: __construct
public function __construct(Logger $logger, Client $client, Session $session)
{
$this->logger = $logger;
$this->client = $client;
$this->session = $session;
parent::__construct();
}
示例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'));
}
示例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();
}
示例10: foreach
function __construct(EntityManager $em, $linkIterators)
{
$this->em = $em;
foreach ($linkIterators as $name => $it) {
$this->addLinkIterator($name, $it);
}
parent::__construct();
}
示例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>";
}
示例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();
}
示例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());
}
}
示例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();
}
示例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();
}