private function parseCastParamaters($paramaters)
    {
        foreach ($paramaters as &$value) {
            // Local callable method. ($someMethod())
            if (substr($value, 0, 1) === '$' && stripos($value, '()') !== false) {
                $method = substr($value, 1, -2);
                $value = is_callable([$this, $method]) ? $this->{$method}() : null;

            // Local attribute. ($some_attribute)
            } elseif (substr($value, 0, 1) === '$') {
                $key = substr($value, 1);
                $value = $this->{$key};

            // Callable function (eg helper). (some_function())
            } elseif (stripos($value, '()') !== false) {
                $method = substr($value, 0, -2);
                $value = is_callable($method) ? $method() : null;
            }

            // String value.
        }

        return $paramaters;
    }