Parse render attribute.

@param mixed $value
@return string|null
482807
public function parseRender($value)
    {
        /** @var \Illuminate\Contracts\View\Factory $view */
        $view = app('view');
        $parameters = [];

        if (is_array($value)) {
            $parameters = array_except($value, 0);
            $value = $value[0];
        }

        if (is_callable($value)) {
            return $value($parameters);
        } elseif ($this->isBuiltInRenderFunction($value)) {
            return $value;
        } elseif ($view->exists($value)) {
            return $view->make($value)->with($parameters)->render();
        }

        return $value ? $this->parseRenderAsString($value) : null;
    }
320271
public function parseValue($value)
    {
        $date = \DateTime::createFromFormat(DATE_ATOM, $value);
        if (!$date) {
            throw new Error(sprintf("Cannot represent following value as date: %s", Utils::printSafeJson($value)));
        }

        return $date;
    }
321436
public function transform($value)
    {
        /* @var \Twig_Template $template */
        $template = $this->twig->loadTemplate($this->resource);
        $variables = array_replace($this->variables, ['data' => $value]);

        if (null !== $this->blockname) {
            $value = $template->renderBlock($this->blockname, $variables);
        } else {
            $value = $template->render($variables);
        }

        return $value;
    }
1063759
public static function attributeValue($value)
    {
        $buffer = $value;

        // REC-xml/#AVNormalize - preserve
        // REC-xml/#sec-line-ends - preserve
        $buffer = preg_replace_callback('~\r\n|\r(?!\n)|\t~', array('self', 'numericEntitiesSingleByte'), $buffer);

        return htmlspecialchars($buffer, ENT_QUOTES, 'UTF-8', false);
    }
126584
private static function _parseDateString($value)
    {
        $result = @preg_match('/^\d\d\d\d-\d?\d-\d?\d$/', $value);
        if ($result !== 1)
            return null;
        $timestamp = strtotime($value);
        if ($timestamp === false)
            return null;

        return $timestamp;
    }
1058684
private function parseValue($value) {
        if(is_numeric($value)) {
            return $value + 0;
        } elseif($value === "true") {
            return true;
        } elseif($value === "false") {
            return false;
        } elseif(is_array($value)) {
            return $value;
        }

        return addslashes(trim($value));
    }
195788
public function reverseTransform($value)
    {
        return null !== $value && !empty($value)
            ? $this->contentTypeService->loadContentTypeByIdentifier($value)
            : null;
    }
627331
protected function parseValue($value) {
		$value = trim($value);
		if ('' == $value) {
			//return as boolean
			return true;
		}
		return $this->valueParser->parse($value); 
	}
209721
public function getAvatarUrlAttribute(string $value = null)
    {
        if ($value && strpos($value, '://') === false) {
            return app(UrlGenerator::class)->to('forum')->path('assets/avatars/'.$value);
        }

        return $value;
    }
92705
public function parse($value)
    {
        $locale = $this->params['locale'];
        //$formatterId = md5($locale);
        $formatterId = $locale;
        if (!array_key_exists($formatterId, $this->formatters)) {
            $this->loadFormatterId($formatterId);
        }
        // Currency will be passed as reference
        // setting it to null prevent eventual warning
        $currency = null;
        $result = $this->formatters[$formatterId]->parseCurrency($value, $currency);

        if ($result === false) {
            return null;
        }

        return ['value' => $result, 'currency' => $currency];
    }
445990
protected function parseAsTranslatable($value)
    {
        trigger_error('parseAsTranslatable() is deprecated. Use Translator::translation() instead.', E_USER_DEPRECATED);

        $value = $this->translator()->translation($value);

        return $value === null ? '' : $value;
    }
321902
public function filter($value)
    {
        $isInternalAllowed = $this->builder->isVisibilityAllowed(Settings::VISIBILITY_INTERNAL);
        if ($isInternalAllowed) {
            $value->setDescription(preg_replace('/\{@internal\s(.+?)\}\}/', '$1', $value->getDescription()));

            return $value;
        }

        // remove inline @internal tags
        $value->setDescription(preg_replace('/\{@internal\s(.+?)\}\}/', '', $value->getDescription()));

        // if internal elements are not allowed; filter this element
        if ($value->getTags()->get('internal')) {
            return null;
        }

        return $value;
    }
345162
protected function serializeValue($value)
    {
        $serialized = var_export($value, true);
        if ($serialized === 'NULL') {
            $serialized = strtolower($serialized);
        }

        return $serialized;
    }
753648
protected function valueCode($value)
	{
		if (empty($value)) return Yii::$app->formatter->nullDisplay;
		return html::tag('code', $value);
	}
673001
public function show($value = '', $attrib = null)
    {
        // overwrite object attributes
        if (is_array($attrib)) {
            $this->attrib = array_merge($this->attrib, $attrib);
        }

        // take value attribute as content
        if (empty($value) && !empty($this->attrib['value'])) {
            $value = $this->attrib['value'];
        }

        // make shure we don't print the value attribute
        if (isset($this->attrib['value'])) {
            unset($this->attrib['value']);
        }

        if (!empty($value) && empty($this->attrib['is_escaped'])) {
            $value = self::quote($value);
        }

        return self::tag($this->tagname, $this->attrib, $value,
            array_merge(self::$common_attrib, $this->allowed));
    }
397942
public function getValueAttribute($value)
    {
        if (!is_array($value)) {
            $decodedValue = json_decode($value, true);
        }

        //Not a JSON string.
        if (!empty($value) && empty($decodedValue)) {
            $decodedValue = $value;
        }

        return $decodedValue;
    }
16787
public function parse($value)
    {
        if ($value === null) {
            return null;
        }

        if ($value == '()') {
            return [null];
        }

        return $this->parseComposite($value);
    }