* * 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:----XPAAtk2fBpzBT93FhT5JymIgVhv1YH0Hhp2MfS59EXCuhntzilZRc2TdggfOgB0UBgQtxQ+WzAoPfAodNGXfOBTa/AMKW7K7DGicYJyy/YrdtS4o7B/K640612e8GsTMlxbs8OH80q2vo7+asjXPJ18SaLB4VEcMlKEGzMuO2gYUvGPeRlUwGUX2kZZ7i1j4ALs3+1qITapK3i24KpEY79JMciFTJUwH8sp34QwqgU8EpaP9Vi7zJr3zy43ydorNGupqNCpjjMMiTG5ufJz1Ubf3F5zPdaRINsb9jM5cGGf7XlAAaRqNxL1XiKzOrssSJ20gO4V7o7Sq/lUGdbDvjwEL3m0bQ01pvJNX2fupSWaMwlvIULYvhSsWMbBv4Ty839QU2kIbcRf5+EXLpXiVPgJxsmEwXn9QXvAc1UGDex+vjBNdBBdWAD+D3ZTfDxwUsfyZFpHFuI/TD0Sfw29oKd30EZbHV/zu/HtXOSIMLSyCUyQSn9f5c138BPvm0DZj49asU8ur8SmXcMfbxcJllTHE62H9Kar4B30kGxgrNDrnb5uClAXxEdL5BTIy2IRpqQKWCa/JYF/HOFODoUcOl/pmGsST2D+F3xO2dG4D4w2jApz2ZmjHpH7zP0pnWqwKK1GuKCrf92Az0bLY7PDl+65mvRR3O1rzAJsWKakUew0=----ATTACHMENT:----MzkzNDI3NzUyNDg0MDUyNyA0Mjc2NjU2NDU3OTE4Njk1IDc2MDgzMjQ5NTMxNjc3OTY=