PHP 8.3.31
Preview: TableCell.php Size: 1.69 KB
/home/getspomw/royalsquad.us/vendor/symfony/console/Helper/TableCell.php

<?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\Exception\InvalidArgumentException;

/**
 * @author Abdellatif Ait boudad <a.aitboudad@gmail.com>
 */
class TableCell
{
    private array $options = [
        'rowspan' => 1,
        'colspan' => 1,
        'style' => null,
    ];

    public function __construct(
        private string $value = '',
        array $options = [],
    ) {
        // check option names
        if ($diff = array_diff(array_keys($options), array_keys($this->options))) {
            throw new InvalidArgumentException(\sprintf('The TableCell does not support the following options: \'%s\'.', implode('\', \'', $diff)));
        }

        if (isset($options['style']) && !$options['style'] instanceof TableCellStyle) {
            throw new InvalidArgumentException('The style option must be an instance of "TableCellStyle".');
        }

        $this->options = array_merge($this->options, $options);
    }

    /**
     * Returns the cell value.
     */
    public function __toString(): string
    {
        return $this->value;
    }

    /**
     * Gets number of colspan.
     */
    public function getColspan(): int
    {
        return (int) $this->options['colspan'];
    }

    /**
     * Gets number of rowspan.
     */
    public function getRowspan(): int
    {
        return (int) $this->options['rowspan'];
    }

    public function getStyle(): ?TableCellStyle
    {
        return $this->options['style'];
    }
}

Directory Contents

Dirs: 0 × Files: 20

Name Size Perms Modified Actions
3.25 KB lrw-rw-rw- 2025-09-17 06:53:23
Edit Download
2.56 KB lrw-rw-rw- 2025-09-17 06:53:23
Edit Download
1.63 KB lrw-rw-rw- 2025-09-17 06:53:23
Edit Download
2.19 KB lrw-rw-rw- 2025-09-17 06:53:23
Edit Download
4.35 KB lrw-rw-rw- 2025-09-17 06:53:23
Edit Download
799 B lrw-rw-rw- 2025-09-17 06:53:23
Edit Download
1.79 KB lrw-rw-rw- 2025-09-17 06:53:23
Edit Download
731 B lrw-rw-rw- 2025-09-17 06:53:23
Edit Download
2.94 KB lrw-rw-rw- 2025-09-17 06:53:23
Edit Download
4.72 KB lrw-rw-rw- 2025-09-17 06:53:23
Edit Download
19.95 KB lrw-rw-rw- 2025-09-17 06:53:23
Edit Download
7.48 KB lrw-rw-rw- 2025-09-17 06:53:23
Edit Download
18.82 KB lrw-rw-rw- 2025-09-17 06:53:23
Edit Download
3.15 KB lrw-rw-rw- 2025-09-17 06:53:23
Edit Download
31.39 KB lrw-rw-rw- 2025-09-17 06:53:23
Edit Download
1.69 KB lrw-rw-rw- 2025-09-17 06:53:23
Edit Download
2.17 KB lrw-rw-rw- 2025-09-17 06:53:23
Edit Download
536 B lrw-rw-rw- 2025-09-17 06:53:23
Edit Download
531 B lrw-rw-rw- 2025-09-17 06:53:23
Edit Download
12.46 KB lrw-rw-rw- 2025-09-17 06:53:23
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).