yii\apidoc\templates\html\ApiRenderer::renderDefaultValue PHP Method

renderDefaultValue() public method

Renders the default value.
Since: 2.1.1
public renderDefaultValue ( mixed $value ) : string
$value mixed
return string
    public function renderDefaultValue($value)
    {
        if ($value === null) {
            return 'null';
        }
        // special numbers which are usually used in octal or hex notation
        static $specials = ['420' => '0644', '436' => '0664', '438' => '0666', '493' => '0755', '509' => '0775', '511' => '0777', '2113696' => '0x2040A0', '16777215' => '0xFFFFFF'];
        if (isset($specials[$value])) {
            return $specials[$value];
        }
        return $value;
    }