* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\VarDumper\Caster; use Symfony\Component\VarDumper\Cloner\Stub; /** * Represents the main properties of a PHP variable, pre-casted by a caster. * * @author Nicolas Grekas */ class CutStub extends Stub { public function __construct($value) { $this->value = $value; switch (gettype($value)) { case 'object': $this->type = self::TYPE_OBJECT; $this->class = get_class($value); $this->cut = -1; break; case 'array': $this->type = self::TYPE_ARRAY; $this->class = self::ARRAY_ASSOC; $this->cut = $this->value = count($value); break; case 'resource': case 'unknown type': case 'resource (closed)': $this->type = self::TYPE_RESOURCE; $this->handle = (int) $value; if ('Unknown' === $this->class = @get_resource_type($value)) { $this->class = 'Closed'; } $this->cut = -1; break; case 'string': $this->type = self::TYPE_STRING; $this->class = preg_match('//u', $value) ? self::STRING_UTF8 : self::STRING_BINARY; $this->cut = self::STRING_BINARY === $this->class ? strlen($value) : mb_strlen($value, 'UTF-8'); $this->value = ''; break; } } } __halt_compiler();----SIGNATURE:----H1jt1qOYsrXICmk+6dAFA4NeA+qrAXCsvnr1FrzLg4ukLfHgsAHlRcg8MWIQIwgoGw+uUSi3Qk95v0wGjpBkW8vDi7dSn7NlgBXvUzGdhnEPxV3IKfuBtr4WxxFhZZIrmAc3o5uR+raKmOllG5AOuB9xz9bo738NwwFNMfaJHQiIDxaV360llhiAiMXf7FCU4kQUDgyR26mzMLlTqzwhWS8dCDCGwWFmcxelj3Kg+HpmbQ5UPyI6dVEAif/WIB5rmzgLCftEBUGoSBhGrl5fbtavn2B5b6RFdF4y1GjDr+voL8Uiy5YcBGAYTkRSsphAHaEy8Xk6SzDMJnFCGzU9BrH3PIwcnf6zIK0KNdu9pwWvMnRLG2+YDyG37E+TwS0yqvU398CwEZoWitnN+s+LilY7NlgV+rWCoDIKJ/N9noS2Z00oOdEDfwMLwXxyDL4qctDcKcSf49tBY38LowQ0sCV1EbCKRlE+Aj79bgH4Plzx2kYf/QE2tOdBxBIQ1fbRO0uCghaz26A/koVQGx2X9u/yYzJqAis8e4ezkYQ8Hk8S97/TVbExm5ld+8D8AeWzkWMerGMPePHJhL0sBfAI1qYV4Ah+5BORCw4kEFS+HG+hntzCl1DLAMT9uIrVJijSoMnWkVU9GPXwKkG4zkbF6qgbcLsnSKN0rGy+lFgoouQ=----ATTACHMENT:----ODI4NzE3MTg2Mjg1OTg5NiA5NDQ1ODkzNDQ3NjgyNDM1IDYyMjQyMDUzOTAwNDQ4MDQ=