Converts $propname in $mf into array_map plaintext, or $fallback if not valid.

@param array       $mf
@param $propname
@param null|string $fallback
@return null
971911
public static function get_plaintext_array( array $mf, $propname, $fallback = null ) {
		if ( ! empty( $mf['properties'][ $propname ] ) && is_array( $mf['properties'][ $propname ] ) ) {
			return array_map( array( 'Parse_Mf2', 'to_plaintext' ), $mf['properties'][ $propname ] ); }
		return $fallback;
	}
348390
public static function decode_header($input, $fallback = null)
    {
        $str = self::decode_mime_string((string)$input, $fallback);

        return $str;
    }
212351
protected function getEncodedValueForProp($propName, $propValue)
    {
        if (in_array($propName, $this->propTypes['string'])) {
            # Simple strings are null terminated. Unsure if this is needed or simply a product of how ADUC does stuff?
            $value = $this->encodePropValue($propValue."\0", true);
        } elseif (in_array($propName, $this->propTypes['time'])) {
            # Needs to be in microseconds (assuming it is in minute format)...
            $value = $this->encodePropValue($propValue * self::TIME_CONVERSION);
        } else {
            $value = $this->encodePropValue($propValue);
        }

        return $value;
    }
1302295
public static function get(array $array, $key, $fallback = null)
    {
        $keys = explode('.', $key);
        foreach($keys as $key) {
            if(!isset($array[$key])) {
                return $fallback;
            }
            $array = $array[$key];
        }

        return $array;
    }
452329
private function getSchemaField($field, $property, $fallbackValue = '')
    {
        if (isset($this->schema->properties->$field->$property)) {
            $fallbackValue = $this->schema->properties->$field->$property;
        }

        return $fallbackValue;
    }
897011
private function fallback_to_link($urls, $name, $options) {
        // If link is turned off, return empty.
        if (!empty($options[self::OPTION_NO_LINK])) {
            return '';
        }

        // Build up link content.
        $output = '';
        foreach ($urls as $url) {
            if (strval($name) !== '' && $output === '') {
                $title = $name;
            } else {
                $title = $this->get_filename($url);
            }
            $printlink = html_writer::link($url, $title, array('class' => 'mediafallbacklink'));
            if ($output) {
                // Where there are multiple available formats, there are fallback links
                // for all formats, separated by /.
                $output .= ' / ';
            }
            $output .= $printlink;
        }
        return $output;
    }
274266
public function getDisplayName($nameFallback)
    {
        $fileName = $this->fileName;

        if (substr($fileName, -5) == '.yaml') {
            $fileName = substr($fileName, 0, -5);
        }

        if (!strlen($fileName)) {
            $fileName = $nameFallback;
        }

        return $this->getModelClassName().'/'.$fileName;
    }
870961
public DbHistory[] get_property_history(String objname, String propname) throws DevFailed {
		return databaseDAO.get_property_history(this, objname, propname);
	}
814400
public static function get_updated( array $mf, $ensurevalid = false, $fallback = null ) {
		return self::get_datetime_property( 'updated', $mf, $ensurevalid, $fallback );
	}
3904
function postVariable( $var, $fallbackValue = null )
    {
        $ret = $fallbackValue;
        if ( isset( $_POST[$var] ) )
        {
            $ret = $_POST[$var];
        }
        else if ( $ret === null )
        {
            eZDebug::writeWarning( "Undefined post variable: $var",
                                   "eZHTTPTool" );
        }
        return $ret;
    }
16643
public function arrayGet($arr, $key, $fallback = null)
    {
        if (is_array($arr)) {
            if (array_key_exists($key, $arr)) {
                return $arr[$key];
            } else {
                return $fallback;
            }
        } else {
            trigger_error("Auth_OpenID::arrayGet (key = ".$key.") expected " .
                          "array as first parameter, got " .
                          gettype($arr), E_USER_WARNING);

            return false;
        }
    }
880054
public static function fieldPropertyValue( EarthIT_Schema_Field $f, $propUri, $nonFakeDefault=null, $fakeDefault=null ) {
		$v = $f->getFirstPropertyValue($propUri);
		if( $v !== null ) return $v;
		
		$isFake = $f->getFirstPropertyValue(EarthIT_CMIPREST_NS::IS_FAKE_FIELD);
		return $isFake ? $fakeDefault : $nonFakeDefault;
	}
737379
private function getOriginalPropertyName($propertyName, ModelIdInterface $modelId)
    {
        $originalPropertyName =
            \trim(\substr($propertyName, \strlen(\str_replace('::', '____', $modelId->getSerialized()) . '_')), '[]');

        return $originalPropertyName ?: null;
    }
1185092
public DbDatum[] get_property(TacoTangoDevice tacoDevice, String[] propnames) throws DevFailed {
        Except.throw_exception("Api_TacoFailed",
                "Taco protocol not supported",
                "TacoTangoDeviceDAODefaultImpl.command_inout()");
        return null;
    }
401075
@Override
	public Locale getFallbackLocale(String baseName, Locale locale) {
		if (baseName == null) {
			throw new NullPointerException();
		}
		Locale defaultLocale = Locale.getDefault();

		if (!fallbackToSystemLocale) {
			defaultLocale = new Locale("", "");
		}

		return locale.equals(defaultLocale) ? null : defaultLocale;
	}
483208
public function parseFile(\SplFileInfo $file, string $useragent, string $fallback): string
    {
        try {
            $factories = $this->jsonParser->decode(
                file_get_contents($file->getPathname()),
                true
            );

            $mode  = $factories['generic'] ?? $fallback;
            $rules = $factories['rules'] ?? [];
        } catch (DecodeErrorException | \RuntimeException $e) {
            $this->logger->error($e);

            $mode  = $fallback;
            $rules = [];
        }

        foreach (array_keys($rules) as $rule) {
            if (preg_match($rule, $useragent)) {
                $mode = $rules[$rule];
                break;
            }
        }

        return $mode;
    }
209454
public function getTranslationAttribute($key, $locale = null, $fallback = true, $unmutated = false)
    {
        if ($this->isTranslationAttribute($key))
        {
            $translation = $this->translate($locale);

            $attribute = ($translation) ?
                ($unmutated ? $translation->getUnmutatedAttribute($key) : $translation->{$key}) :
                null;

            if (empty($attribute) && $fallback)
            {
                $translation = $this->translate($this->getFallbackLocale());

                if ($translation)
                {
                    return $unmutated ? $translation->getUnmutatedAttribute($key) : $translation->{$key};
                }
            }

            return $attribute;
        }

        return null;
    }