Lines Matching refs:value

41      * @param  mixed  $value
45 public function export($value, $indentation = 0) argument
47 return $this->recursiveExport($value, $indentation);
67 foreach ($array as $key => $value) {
68 if (is_array($value)) {
82 $result[] = $exporter->shortenedExport($value);
98 * @param mixed $value
102 public function shortenedExport($value) argument
104 if (is_string($value)) {
105 $string = $this->export($value);
120 if (is_object($value)) {
123 get_class($value),
124 count($this->toArray($value)) > 0 ? '...' : ''
128 if (is_array($value)) {
131 count($value) > 0 ? '...' : ''
135 return $this->export($value);
142 * @param mixed $value
145 public function toArray($value) argument
147 if (!is_object($value)) {
148 return (array) $value;
153 foreach ((array) $value as $key => $val) {
173 if ($value instanceof \SplObjectStorage) {
186 foreach ($value as $key => $val) {
189 'inf' => $value->getInfo(),
200 * @param mixed $value The value to export
206 protected function recursiveExport(&$value, $indentation, $processed = null) argument
208 if ($value === null) {
212 if ($value === true) {
216 if ($value === false) {
220 if (is_float($value) && floatval(intval($value)) === $value) {
221 return "$value.0";
224 if (is_resource($value)) {
227 $value,
228 get_resource_type($value)
232 if (is_string($value)) {
234 if (preg_match('/[^\x09-\x0d\x1b\x20-\xff]/', $value)) {
235 return 'Binary String: 0x' . bin2hex($value);
239 str_replace(array("\r\n", "\n\r", "\r"), array("\n", "\n", "\n"), $value) .
249 if (is_array($value)) {
250 if (($key = $processed->contains($value)) !== false) {
254 $array = $value;
255 $key = $processed->add($value);
264 $this->recursiveExport($value[$k], $indentation + 1, $processed)
274 if (is_object($value)) {
275 $class = get_class($value);
277 if ($hash = $processed->contains($value)) {
281 $hash = $processed->add($value);
283 $array = $this->toArray($value);
301 return var_export($value, true);