api/symfony/Component/Console/Helper/TableCellStyle.yaml
2024-09-26 02:03:21 -07:00

39 lines
1.9 KiB
YAML

name: TableCellStyle
class_comment: '# * @author Yewhen Khoptynskyi <khoptynskyi@gmail.com>'
dependencies:
- name: InvalidArgumentException
type: class
source: Symfony\Component\Console\Exception\InvalidArgumentException
properties: []
methods:
- name: getTagOptions
visibility: public
parameters: []
comment: "# * @author Yewhen Khoptynskyi <khoptynskyi@gmail.com>\n# */\n# class\
\ TableCellStyle\n# {\n# public const DEFAULT_ALIGN = 'left';\n# \n# private const\
\ TAG_OPTIONS = [\n# 'fg',\n# 'bg',\n# 'options',\n# ];\n# \n# private const ALIGN_MAP\
\ = [\n# 'left' => \\STR_PAD_RIGHT,\n# 'center' => \\STR_PAD_BOTH,\n# 'right'\
\ => \\STR_PAD_LEFT,\n# ];\n# \n# private array $options = [\n# 'fg' => 'default',\n\
# 'bg' => 'default',\n# 'options' => null,\n# 'align' => self::DEFAULT_ALIGN,\n\
# 'cellFormat' => null,\n# ];\n# \n# public function __construct(array $options\
\ = [])\n# {\n# if ($diff = array_diff(array_keys($options), array_keys($this->options)))\
\ {\n# throw new InvalidArgumentException(\\sprintf('The TableCellStyle does not\
\ support the following options: \\'%s\\'.', implode('\\', \\'', $diff)));\n#\
\ }\n# \n# if (isset($options['align']) && !\\array_key_exists($options['align'],\
\ self::ALIGN_MAP)) {\n# throw new InvalidArgumentException(\\sprintf('Wrong align\
\ value. Value must be following: \\'%s\\'.', implode('\\', \\'', array_keys(self::ALIGN_MAP))));\n\
# }\n# \n# $this->options = array_merge($this->options, $options);\n# }\n# \n\
# public function getOptions(): array\n# {\n# return $this->options;\n# }\n# \n\
# /**\n# * Gets options we need for tag for example fg, bg.\n# *\n# * @return\
\ string[]"
- name: getPadByAlign
visibility: public
parameters: []
comment: null
- name: getCellFormat
visibility: public
parameters: []
comment: null
traits:
- Symfony\Component\Console\Exception\InvalidArgumentException
interfaces: []