Processes the given callback array value and answers the resulting data.

@param array $value

@return mixed
326573
protected function processCallbackArray($value)
    {
        if ($this->isCallbackArray($value)) {
            
            $class  = $value['class'];
            $method = $value['method'];
            
            if ($result = call_user_func("{$class}::{$method}")) {
                
                if (isset($value['property'])) {
                    return $result->{$value['property']};
                }
                
                return $result;
                
            }
            
        }
    }
392525
private function phpEncodeValue($value)
    {
        if (is_array($value)) {
            return $this->phpEncodeArray($value);
        }

        if (is_string($value)) {
            return json_encode($value);
        }

        return var_export($value, true);
    }
119250
protected function process($value, $flags)
    {
        $config = $this;

        if (!is_string($value)) {
            return $value;
        }

        return preg_replace_callback(
            '#\{\$(.+)\}#',
            function ($match) use ($config, $flags) {
                return $config->get($match[1], $flags);
            },
            $value
        );
    }
1110185
public function process(array $values)
    {
        $results = [];

        foreach ($values as $value) {
            $valueResults = $this->buildSolrHierarchyFromPath($value);
            $results = array_merge($results, $valueResults);
        }

        return array_unique($results);
    }
681628
private function serializeValue($value)
    {
        if (is_object($value)) {
            return $this->serializeObjectRecursively($value);
        } elseif (is_array($value)) {
            return $this->serializeArrayRecursively($value);
        }

        return $value;
    }
217533
public static function toArray($value)
    {
        # If it's already an array then just pass it back
        if (is_array($value)) {
            return $value;
        }

        if ($value instanceof SerialObject) {
            return $value->asArray();
        }

        if ($value instanceof \ArrayObject) {
            return $value->getArrayCopy();
        }

        # If it's not an array then create a new array to be returned
        $array = [];

        # If a value was passed as a string/int then include it in the new array
        if ($value) {
            $array[] = $value;
        }

        return $array;
    }
208072
protected function fixValue(array $value)/*# : array */
    {
        $result = [];
        foreach ($value as $k => $v) {
            if (false !== strpos($k, $this->field_splitter)) {
                $res = &$this->searchTree($k, $result, true);
                $res = is_array($v) ? $this->fixValue($v) : $v;
            } else {
                $result[$k] = is_array($v) ? $this->fixValue($v) : $v;
            }
        }
        return $result;
    }
1083777
public function processValue($value)
	{
		$clean = strip_tags($value);

		if (array_key_exists($clean, $this->types)) {
			if (!isset($this->types[$clean]['value'])) {
				$this->types[$clean]['value'] = 0;
			}
			$this->types[$clean]['value'] += 1;
		}
	}
232293
public function convert($value)
	{
		if (is_array(($value))) {
			$retval = [];
			foreach ($value as $object) {
				$retval[] = $this->convert($object); // force sequential indexing
			}

			return $retval;
		} else if (is_object($value)) {
			return $this->convertObject($value);
		} else {
			return $value;
		}
	}
758040
protected function convertToArray($value)
    {
        if (\is_string($value)) {
            $value = [$value];
        } elseif (null === $value) {
            $value = [];
        }

        return $value;
    }
847495
private function executePropertiesValidation(array $value)
    {
        $rest = $value;
        return $this->validateByProperty($value, $rest)
            && $this->validateByPattern($value, $rest)
            && $this->validateAdditionalProperties($rest);
    }
1205789
protected function _decodeArrayFieldValue(array $value)
    {
        $result = array();
        unset($value['__empty']);
        foreach ($value as $_id => $row) {
            if (!is_array($row) || !array_key_exists(
                'installment_currency',
                $row
            ) || !array_key_exists(
                'installment_boundary',
                $row
            ) || !array_key_exists(
                'installment_frequency',
                $row
            ) || !array_key_exists('installment_interest', $row)) {
                continue;
            }

            $currency = $row['installment_currency'];
            $boundary = $row['installment_boundary'];
            $frequency = $row['installment_frequency'];
            $interest = $row['installment_interest'];
            $result[] = array($currency, $boundary, $frequency, $interest);
        }

        return $result;
    }
189818
public function makeStorableArrayFieldValue($value)
    {
        if ($this->_isEncodedArrayFieldValue($value)) {
            $value = $this->_decodeArrayFieldValue($value);
        }

        $value = $this->_serializeValue($value);
        return $value;
    }
153959
protected function processListItemValue($value, $args = [])
    {
        return ViewTools::singleton()->processAttribute($value, $this->owner, $this->owner->getRenderer(), $args);
    }
756936
public function parse($value)
    {
        if (is_array($value)) {
            return $this->parseSet($value);
        } else {
            return $this->parseValue($value);
        }
    }
415449
private function convertArrayToArrayValue(array $value)
    {
        $values = [];
        foreach ($value as $val) {
            // ListValues may not contain nested ListValues.
            // Therefore, if an empty array is provided as part of an array,
            // we can encode it as an EntityValue.
            if (is_array($val) && empty($val)) {
                $val = (object) $val;
            }

            $values[] = $this->valueObject($val);
        }

        return [
            'arrayValue' => [
                'values' => $values
            ]
        ];
    }
1016278
public function process($value)
    {
        if($value instanceof \PHPixie\HTTP\Responses\Response) {
            return $value;
        }
        
        if($value instanceof \Psr\Http\Message\ResponseInterface) {
            return $value;
        }
        
        if($value instanceof \PHPixie\Template\Container) {
            $value = $value->render();
        }
        
        if(is_string($value)) {
            return $this->http->responses()->string($value);
        }
        
        if(is_object($value) || is_array($value)) {
            return $this->http->responses()->json($value);
        }
        
        $type = gettype($value);
        throw new \PHPixie\HTTPProcessors\Exception("Cannot convert type '$type' into a response");
    }