src/AssetManager/Asset/AggregateAsset.php
private function processContent($content)
    {
        $this->mimetype = null;
        foreach ($content as $asset) {
            if (null === $this->mimetype) {
                $this->mimetype = $asset->mimetype;
            }

            if ($asset->mimetype !== $this->mimetype) {
                throw new Exception\RuntimeException(
                    sprintf(
                        'Asset "%s" doesn\'t have the expected mime-type "%s".',
                        $asset->getTargetPath(),
                        $this->mimetype
                    )
                );
            }

            $this->setLastModified(
                max(
                    $asset->getLastModified(),
                    $this->getLastModified()
                )
            );
            $this->setContent(
                $this->getContent() . $asset->dump()
            );
        }
    }
private function processContent($content)
    {
        $this->mimetype = null;
        foreach ($content as $asset) {
            if (null === $this->mimetype) {
                $this->mimetype = $asset->mimetype;
            }

            if ($asset->mimetype !== $this->mimetype) {
                throw new Exception\RuntimeException(
                    sprintf(
                        'Asset "%s" doesn\'t have the expected mime-type "%s".',
                        $asset->getTargetPath(),
                        $this->mimetype
                    )
                );
            }

            $this->setLastModified(
                max(
                    $asset->getLastModified(),
                    $this->getLastModified()
                )
            );
            $this->setContent(
                $this->getContent() . $asset->dump()
            );
        }
    }
private function processContent ( $ content ) { $ this -> mimetype = null ; foreach ( $ content as $ asset ) { if ( null === $ this -> mimetype ) { $ this -> mimetype = $ asset -> mimetype ; } if ( $ asset -> mimetype !== $ this -> mimetype ) { throw new Exception \ RuntimeException ( sprintf ( 'Asset "%s" doesn\'t have the expected mime-type "%s".' , $ asset -> getTargetPath ( ) , $ this -> mimetype ) ) ; } $ this -> setLastModified ( max ( $ asset -> getLastModified ( ) , $ this -> getLastModified ( ) ) ) ; $ this -> setContent ( $ this -> getContent ( ) . $ asset -> dump ( ) ) ; } }
Loop through assets and merge content

@param string $content

@throws Exception\RuntimeException
Loop through assets and merge content