Postgres::getFunctionProperties PHP Метод

getFunctionProperties() публичный Метод

Returns an array containing a function's properties
public getFunctionProperties ( $f ) : An
$f The array of data for the function
Результат An array containing the properties
    function getFunctionProperties($f)
    {
        $temp = array();
        // Volatility
        if ($f['provolatile'] == 'v') {
            $temp[] = 'VOLATILE';
        } elseif ($f['provolatile'] == 'i') {
            $temp[] = 'IMMUTABLE';
        } elseif ($f['provolatile'] == 's') {
            $temp[] = 'STABLE';
        } else {
            return -1;
        }
        // Null handling
        $f['proisstrict'] = $this->phpBool($f['proisstrict']);
        if ($f['proisstrict']) {
            $temp[] = 'RETURNS NULL ON NULL INPUT';
        } else {
            $temp[] = 'CALLED ON NULL INPUT';
        }
        // Security
        $f['prosecdef'] = $this->phpBool($f['prosecdef']);
        if ($f['prosecdef']) {
            $temp[] = 'SECURITY DEFINER';
        } else {
            $temp[] = 'SECURITY INVOKER';
        }
        return $temp;
    }
Postgres