src/Resource/Asset.php
private function getProperty(string $property, $locale = null)
    {
        $localeCode = $this->getLocaleFromInput($locale);

        // This checks happens after the call to getLocaleFromInput
        // to make sure the Exception for invalid locales is still thrown.
        if (null === $this->$property) {
            return null;
        }

        $localeCode = $this->walkFallbackChain($this->$property, $localeCode, $this->sys->getEnvironment());

        return null === $localeCode
            ? null
            : $this->{$property}[$localeCode];
    }
private function getProperty(string $property, $locale = null)
    {
        $localeCode = $this->getLocaleFromInput($locale);

        // This checks happens after the call to getLocaleFromInput
        // to make sure the Exception for invalid locales is still thrown.
        if (null === $this->$property) {
            return null;
        }

        $localeCode = $this->walkFallbackChain($this->$property, $localeCode, $this->sys->getEnvironment());

        return null === $localeCode
            ? null
            : $this->{$property}[$localeCode];
    }
private function getProperty ( string $ property , $ locale = null ) { $ localeCode = $ this -> getLocaleFromInput ( $ locale ) ; // This checks happens after the call to getLocaleFromInput // to make sure the Exception for invalid locales is still thrown. if ( null === $ this -> $ property ) { return null ; } $ localeCode = $ this -> walkFallbackChain ( $ this -> $ property , $ localeCode , $ this -> sys -> getEnvironment ( ) ) ; return null === $ localeCode ? null : $ this -> { $ property } [ $ localeCode ] ; }
@param string             $property
@param Locale|string|null $locale

@throws \InvalidArgumentException when $locale is not one of the locales supported by the space

@return string|FileInterface|null
@param string $property @param Locale|string|null $locale