# tablepress/3.4/libraries/vendor/PhpSpreadsheet/Reader/Xlsx/BaseParserClass.php

TablePress – Tables in WordPress made easy, version 3.4. 25 lines.

- Page: https://pluginprobe.com/plugins/tablepress/3.4/code/libraries/vendor/PhpSpreadsheet/Reader/Xlsx/BaseParserClass.php
- Raw: https://pluginprobe.com/plugins/tablepress/3.4/raw/libraries/vendor/PhpSpreadsheet/Reader/Xlsx/BaseParserClass.php
- Modified: 2025-05-22T05:08:54+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/tablepress/3.4/code/libraries/vendor/PhpSpreadsheet/Reader/Xlsx/BaseParserClass.php#L10-L20`.

```php
<?php

namespace TablePress\PhpOffice\PhpSpreadsheet\Reader\Xlsx;

use Stringable;

class BaseParserClass
{
	/**
				 * @param mixed $value
				 */
				protected static function boolean($value): bool
	{
		if (is_object($value)) {
			$value = (method_exists($value, '__toString')) ? ((string) $value) : 'true';
		}

		if (is_numeric($value)) {
			return (bool) $value;
		}

		return $value === 'true' || $value === 'TRUE';
	}
}

```
