Lines Matching refs:value
36 * @param mixed $value
40 public static function export($value, $indentation = 0) argument
42 return self::recursiveExport($value, $indentation);
49 * @param mixed $value
52 public static function toArray($value) argument
54 if (!is_object($value)) {
55 return (array) $value;
60 foreach ((array) $value as $key => $val) {
80 if ($value instanceof \SplObjectStorage) {
93 foreach ($value as $key => $val) {
96 'inf' => $value->getInfo(),
107 * @param mixed $value The value to export
113 protected static function recursiveExport(&$value, $indentation, $processed = null) argument
115 if ($value === null) {
119 if ($value === true) {
123 if ($value === false) {
127 if (is_float($value) && floatval(intval($value)) === $value) {
128 return "$value.0";
131 if (is_resource($value)) {
134 $value,
135 get_resource_type($value)
139 if (is_string($value)) {
141 if (preg_match('/[^\x09-\x0d\x20-\xff]/', $value)) {
142 return 'Binary String: 0x' . bin2hex($value);
146 str_replace(array("\r\n", "\n\r", "\r"), array("\n", "\n", "\n"), $value) .
156 if (is_array($value)) {
157 if (($key = $processed->contains($value)) !== false) {
161 $array = $value;
162 $key = $processed->add($value);
171 self::recursiveExport($value[$k], $indentation + 1, $processed)
181 if (is_object($value)) {
182 $class = get_class($value);
184 if ($value instanceof ProphecyInterface) {
186 } elseif ($hash = $processed->contains($value)) {
190 $hash = $processed->add($value);
192 $array = self::toArray($value);
210 return var_export($value, true);