本文整理汇总了PHP中Symfony\Component\Console\Command\Command::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Command::__construct方法的具体用法?PHP Command::__construct怎么用?PHP Command::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symfony\Component\Console\Command\Command
的用法示例。
在下文中一共展示了Command::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* @param TransferFunds $useCase
* @param EwalletExtension $formatter
*/
public function __construct(TransferFunds $useCase, MemberFormatter $formatter)
{
parent::__construct();
$this->formatter = $formatter;
$this->useCase = $useCase;
$this->useCase->attach($this);
}
示例2: __construct
/**
* @param UserRepository $userRepository
* @param ReviewRepository $reviewRepository
* @param ScoreManager $scoreManager
*/
public function __construct(UserRepository $userRepository, ReviewRepository $reviewRepository, ScoreManager $scoreManager)
{
parent::__construct();
$this->userRepository = $userRepository;
$this->reviewRepository = $reviewRepository;
$this->scoreManager = $scoreManager;
}
示例3:
/**
* @param IUserManager $userManager
* @param IDBConnection $dbConnection
*/
function __construct(IUserManager $userManager, IGroupManager $groupManager, IDBConnection $dbConnection)
{
parent::__construct();
$this->userManager = $userManager;
$this->groupManager = $groupManager;
$this->dbConnection = $dbConnection;
}
示例4: __construct
public function __construct(SlackService $slack)
{
parent::__construct();
$this->emitter = $slack->getEmitter();
$this->loop = $slack->getLoop();
$this->slack = $slack;
}
示例5: __construct
/**
* Constructor, used for Command
*
* @param string $name
*/
public function __construct($name = null)
{
parent::__construct($name);
$this->_mustache = new \Mustache_Engine();
$this->_rootDir = dirname(__FILE__);
$this->_swaggerSource = json_decode(file_get_contents(App::ENDPOINT . App::VERSION . self::SOURCE_URI), true);
}
示例6: __construct
public function __construct(Service\System\Import $importService, Connection $connection, LoggerInterface $logger)
{
parent::__construct();
$this->importService = $importService;
$this->connection = $connection;
$this->logger = $logger;
}
示例7: __construct
public function __construct(DrupalApi $drupalApi, Client $httpClient, $appRoot)
{
$this->drupalApi = $drupalApi;
$this->httpClient = $httpClient;
$this->appRoot = $appRoot;
parent::__construct();
}
示例8: __construct
/**
* class constructor. get $Silex argument and set it to property. this must be set in Commands.php file to make it work.
*
* @param string | null $name The name of the command; passing null means it must be set in configure()
* @param \Silex\Application $SilexApp The Silex application class which is contain database class in there.
*/
public function __construct($name = null, \Silex\Application $SilexApp = null)
{
parent::__construct($name);
$this->Silexapp = $SilexApp;
$this->Db = $this->Silexapp['Db'];
unset($SilexApp);
}
示例9: __construct
public function __construct(Router $router, RoutingContextInterface $context, RequestScopeManager $scope)
{
parent::__construct();
$this->router = $router;
$this->context = $context;
$this->requestScope = $scope;
}
示例10: __construct
public function __construct(IUserManager $userManager, IManager $shareManager, IMountManager $mountManager)
{
$this->userManager = $userManager;
$this->shareManager = $shareManager;
$this->mountManager = $mountManager;
parent::__construct();
}
示例11: __construct
/**
* TravisCiCommand constructor.
* @param TravisCiQuestionHelper $questionHelper
* @param ConfigBuilder|null $configBuilder
* @param ConfigWriter $configWriter
* @throws \Symfony\Component\Console\Exception\LogicException
*/
public function __construct(TravisCiQuestionHelper $questionHelper, ConfigBuilder $configBuilder, ConfigWriter $configWriter)
{
parent::__construct('ci:travis-ci');
$this->configBuilder = $configBuilder;
$this->configWriter = $configWriter;
$this->questionHelper = $questionHelper;
}
示例12: __construct
/**
* @param GrumPHP $config
* @param Filesystem $filesystem
* @param Repository $repository
*/
public function __construct(GrumPHP $config, Filesystem $filesystem, Repository $repository)
{
parent::__construct();
$this->config = $config;
$this->filesystem = $filesystem;
$this->repository = $repository;
}
示例13: __construct
/**
* Construct an instance of a CleanCommand.
*/
public function __construct()
{
parent::__construct('style:clean');
$this->setDescription('Runs all fix and format operations.');
$this->addOption('dry-run', null, InputOption::VALUE_NONE, 'Pretend to run and show operation that would be performed.');
$this->addOption('diff', null, InputOption::VALUE_NONE, 'Show diff of changes.');
}
示例14: __construct
public function __construct(\OCA\User_Files_Restore\Db\RequestMapper $requestMapper)
{
$this->requestMapper = $requestMapper;
$this->searchedStatus = null;
$this->csv = FALSE;
parent::__construct();
}
示例15: __construct
/**
* @param string $name
* @param ContainerInterface $dic
*
* @throws \Symfony\Component\Console\Exception\InvalidArgumentException
* @throws \Symfony\Component\Console\Exception\LogicException
*/
public function __construct(string $name, ContainerInterface $dic)
{
$this->setDescription('Used to setup Yapeal-ng after Composer require or to interactively do so any time');
$this->setName($name);
$this->setDic($dic);
parent::__construct($name);
}