OXIESEC PANEL
- Current Dir:
/
/
usr
/
share
/
php
/
Symfony
/
Component
/
Console
/
Helper
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
π
..
-
07/20/2024 06:32:21 AM
rwxr-xr-x
π
DebugFormatterHelper.php
4.08 KB
03/05/2018 08:02:01 PM
rw-r--r--
π
DescriptorHelper.php
2.55 KB
03/05/2018 08:02:01 PM
rw-r--r--
π
FormatterHelper.php
2.89 KB
03/05/2018 08:02:01 PM
rw-r--r--
π
Helper.php
3.72 KB
03/05/2018 08:02:01 PM
rw-r--r--
π
HelperInterface.php
880 bytes
03/05/2018 08:02:01 PM
rw-r--r--
π
HelperSet.php
2.45 KB
03/05/2018 08:02:01 PM
rw-r--r--
π
InputAwareHelper.php
747 bytes
03/05/2018 08:02:01 PM
rw-r--r--
π
ProcessHelper.php
4.74 KB
03/05/2018 08:02:01 PM
rw-r--r--
π
ProgressBar.php
16.94 KB
03/05/2018 08:02:01 PM
rw-r--r--
π
ProgressIndicator.php
7.76 KB
03/05/2018 08:02:01 PM
rw-r--r--
π
QuestionHelper.php
14.27 KB
03/05/2018 08:02:01 PM
rw-r--r--
π
SymfonyQuestionHelper.php
3.94 KB
03/05/2018 08:02:01 PM
rw-r--r--
π
Table.php
19.67 KB
03/05/2018 08:02:01 PM
rw-r--r--
π
TableCell.php
1.62 KB
03/05/2018 08:02:01 PM
rw-r--r--
π
TableSeparator.php
536 bytes
03/05/2018 08:02:01 PM
rw-r--r--
π
TableStyle.php
5.13 KB
03/05/2018 08:02:01 PM
rw-r--r--
Editing: DescriptorHelper.php
Close
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Console\Helper; use Symfony\Component\Console\Descriptor\DescriptorInterface; use Symfony\Component\Console\Descriptor\JsonDescriptor; use Symfony\Component\Console\Descriptor\MarkdownDescriptor; use Symfony\Component\Console\Descriptor\TextDescriptor; use Symfony\Component\Console\Descriptor\XmlDescriptor; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Exception\InvalidArgumentException; /** * This class adds helper method to describe objects in various formats. * * @author Jean-FranΓ§ois Simon <contact@jfsimon.fr> */ class DescriptorHelper extends Helper { /** * @var DescriptorInterface[] */ private $descriptors = array(); public function __construct() { $this ->register('txt', new TextDescriptor()) ->register('xml', new XmlDescriptor()) ->register('json', new JsonDescriptor()) ->register('md', new MarkdownDescriptor()) ; } /** * Describes an object if supported. * * Available options are: * * format: string, the output format name * * raw_text: boolean, sets output type as raw * * @param OutputInterface $output * @param object $object * @param array $options * * @throws InvalidArgumentException when the given format is not supported */ public function describe(OutputInterface $output, $object, array $options = array()) { $options = array_merge(array( 'raw_text' => false, 'format' => 'txt', ), $options); if (!isset($this->descriptors[$options['format']])) { throw new InvalidArgumentException(sprintf('Unsupported format "%s".', $options['format'])); } $descriptor = $this->descriptors[$options['format']]; $descriptor->describe($output, $object, $options); } /** * Registers a descriptor. * * @param string $format * @param DescriptorInterface $descriptor * * @return $this */ public function register($format, DescriptorInterface $descriptor) { $this->descriptors[$format] = $descriptor; return $this; } /** * {@inheritdoc} */ public function getName() { return 'descriptor'; } }