Swat/SwatHtmlHeadEntrySetDisplayer.php
public function display(
        SwatHtmlHeadEntrySet $set,
        $uri_prefix = '',
        $tag = null,
        $combine = false,
        $minify = false
    ) {
        // clone set so displaying doesn't modify it
        $set = clone $set;

        $entries = $set->toArray();

        // combine files
        if ($combine) {
            $info = $this->getCombinedEntries($entries);
            $entries = $info['entries'];
            $uris = $info['superset'];
        } else {
            $uris = array_keys($entries);
        }

        // check for conflicts in the displayed set
        $this->checkForConflicts($uris);

        // sort
        $entries = $this->getSortedEntries($entries);

        // display entries
        $current_type = null;
        foreach ($entries as $entry) {
            if ($this->compareTypes($current_type, $entry->getType()) !== 0) {
                $current_type = $entry->getType();
                echo "\n";
            }

            echo "\t";

            $prefix = $uri_prefix;

            if ($minify && $this->concentrator->isMinified($entry->getUri())) {
                $prefix = $prefix . 'min/';
            }

            if ($entry->getType() === 'SwatLessStyleSheetHtmlHeadEntry') {
                $prefix = $prefix . 'compiled/';
                $entry = $entry->getStyleSheetHeadEntry();
            }

            $entry->display($prefix, $tag);
            echo "\n";
        }

        echo "\n";
    }
public function display(
        SwatHtmlHeadEntrySet $set,
        $uri_prefix = '',
        $tag = null,
        $combine = false,
        $minify = false
    ) {
        // clone set so displaying doesn't modify it
        $set = clone $set;

        $entries = $set->toArray();

        // combine files
        if ($combine) {
            $info = $this->getCombinedEntries($entries);
            $entries = $info['entries'];
            $uris = $info['superset'];
        } else {
            $uris = array_keys($entries);
        }

        // check for conflicts in the displayed set
        $this->checkForConflicts($uris);

        // sort
        $entries = $this->getSortedEntries($entries);

        // display entries
        $current_type = null;
        foreach ($entries as $entry) {
            if ($this->compareTypes($current_type, $entry->getType()) !== 0) {
                $current_type = $entry->getType();
                echo "\n";
            }

            echo "\t";

            $prefix = $uri_prefix;

            if ($minify && $this->concentrator->isMinified($entry->getUri())) {
                $prefix = $prefix . 'min/';
            }

            if ($entry->getType() === 'SwatLessStyleSheetHtmlHeadEntry') {
                $prefix = $prefix . 'compiled/';
                $entry = $entry->getStyleSheetHeadEntry();
            }

            $entry->display($prefix, $tag);
            echo "\n";
        }

        echo "\n";
    }
public function display ( SwatHtmlHeadEntrySet $ set , $ uri_prefix = '' , $ tag = null , $ combine = false , $ minify = false ) { // clone set so displaying doesn't modify it $ set = clone $ set ; $ entries = $ set -> toArray ( ) ; // combine files if ( $ combine ) { $ info = $ this -> getCombinedEntries ( $ entries ) ; $ entries = $ info [ 'entries' ] ; $ uris = $ info [ 'superset' ] ; } else { $ uris = array_keys ( $ entries ) ; } // check for conflicts in the displayed set $ this -> checkForConflicts ( $ uris ) ; // sort $ entries = $ this -> getSortedEntries ( $ entries ) ; // display entries $ current_type = null ; foreach ( $ entries as $ entry ) { if ( $ this -> compareTypes ( $ current_type , $ entry -> getType ( ) ) !== 0 ) { $ current_type = $ entry -> getType ( ) ; echo "\n" ; } echo "\t" ; $ prefix = $ uri_prefix ; if ( $ minify && $ this -> concentrator -> isMinified ( $ entry -> getUri ( ) ) ) { $ prefix = $ prefix . 'min/' ; } if ( $ entry -> getType ( ) === 'SwatLessStyleSheetHtmlHeadEntry' ) { $ prefix = $ prefix . 'compiled/' ; $ entry = $ entry -> getStyleSheetHeadEntry ( ) ; } $ entry -> display ( $ prefix , $ tag ) ; echo "\n" ; } echo "\n" ; }
Displays a set of HTML head entries

@param SwatHtmlHeadEntrySet $set the HTML head entry set to display.
@param string $uri_prefix an optional URI prefix to prepend to all the
displayed HTML head entries.
@param string $tag an optional tag to suffix the URI with. This is
suffixed as a HTTP get var and can be used to
explicitly refresh the browser cache.
@param boolean $combine whether or not to combine files. Defaults to
false.
@param boolean $minify whether or not to minify files. Defaults to
false.
Displays a set of HTML head entries