protected function loadDescriptions(?iterable $messageDescriptions): self
    {
        if ($messageDescriptions !== null) {
            foreach ($messageDescriptions as list($locale, $namespace, $messageStorage)) {
                assert(is_string($locale) === true && empty($locale) === false);
                assert(is_string($namespace) === true && empty($namespace) === false);
                assert(is_string($messageStorage) === true && empty($messageStorage) === false);
                assert(class_exists($messageStorage) === true);
                assert(in_array(MessageStorageInterface::class, class_implements($messageStorage)) === true);

                /** @var MessageStorageInterface $messageStorage */

                $properties = $messageStorage::getMessages();
                $bundle     = new ResourceBundle($locale, $namespace, $properties);
                $this->addBundle($bundle);
            }
        }

        return $this;
    }
protected function loadDescriptions(?iterable $messageDescriptions): self
    {
        if ($messageDescriptions !== null) {
            foreach ($messageDescriptions as list($locale, $namespace, $messageStorage)) {
                assert(is_string($locale) === true && empty($locale) === false);
                assert(is_string($namespace) === true && empty($namespace) === false);
                assert(is_string($messageStorage) === true && empty($messageStorage) === false);
                assert(class_exists($messageStorage) === true);
                assert(in_array(MessageStorageInterface::class, class_implements($messageStorage)) === true);

                /** @var MessageStorageInterface $messageStorage */

                $properties = $messageStorage::getMessages();
                $bundle     = new ResourceBundle($locale, $namespace, $properties);
                $this->addBundle($bundle);
            }
        }

        return $this;
    }
protected function loadDescriptions ( ? iterable $ messageDescriptions ) : self { if ( $ messageDescriptions !== null ) { foreach ( $ messageDescriptions as list ( $ locale , $ namespace , $ messageStorage ) ) { assert ( is_string ( $ locale ) === true && empty ( $ locale ) === false ) ; assert ( is_string ( $ namespace ) === true && empty ( $ namespace ) === false ) ; assert ( is_string ( $ messageStorage ) === true && empty ( $ messageStorage ) === false ) ; assert ( class_exists ( $ messageStorage ) === true ) ; assert ( in_array ( MessageStorageInterface :: class , class_implements ( $ messageStorage ) ) === true ) ; /** @var MessageStorageInterface $messageStorage */ $ properties = $ messageStorage :: getMessages ( ) ; $ bundle = new ResourceBundle ( $ locale , $ namespace , $ properties ) ; $ this -> addBundle ( $ bundle ) ; } } return $ this ; }
Method is used for loading resources from packages.

@see ProvidesMessageResourcesInterface

@param iterable|null $messageDescriptions

@return FileBundleEncoder
Method is used for loading resources from packages .