src/Common/Service/Asset.php
protected function loadModule($sAsset, $sForceType, $mModule)
    {
        if (is_array($mModule)) {
            $sModule   = !empty($mModule[0]) ? $mModule[0] : null;
            $sLocation = !empty($mModule[1]) ? $mModule[1] : null;

        } else {

            $sModule   = $mModule;
            $sLocation = null;
        }

        $sType = $this->determineType($sAsset, $sForceType);
        $sKey  = 'MODULE-' . $sModule . '-' . $sAsset;

        switch ($sType) {

            case 'CSS':

                if ($sLocation == 'BOWER') {
                    $this->aCss[$sKey] = $this->sBaseModuleUrl . $sModule . '/assets/bower_components/' . $sAsset;
                } else {
                    $this->aCss[$sKey] = $this->sBaseModuleUrl . $sModule . '/assets/css/' . $sAsset;
                }
                break;

            case 'JS':

                if ($sLocation == 'BOWER') {
                    $this->aJs[$sKey] = $this->sBaseModuleUrl . $sModule . '/assets/bower_components/' . $sAsset;
                } else {
                    $this->aJs[$sKey] = $this->sBaseModuleUrl . $sModule . '/assets/js/' . $sAsset;
                }
                break;
        }
    }
protected function loadModule($sAsset, $sForceType, $mModule)
    {
        if (is_array($mModule)) {
            $sModule   = !empty($mModule[0]) ? $mModule[0] : null;
            $sLocation = !empty($mModule[1]) ? $mModule[1] : null;

        } else {

            $sModule   = $mModule;
            $sLocation = null;
        }

        $sType = $this->determineType($sAsset, $sForceType);
        $sKey  = 'MODULE-' . $sModule . '-' . $sAsset;

        switch ($sType) {

            case 'CSS':

                if ($sLocation == 'BOWER') {
                    $this->aCss[$sKey] = $this->sBaseModuleUrl . $sModule . '/assets/bower_components/' . $sAsset;
                } else {
                    $this->aCss[$sKey] = $this->sBaseModuleUrl . $sModule . '/assets/css/' . $sAsset;
                }
                break;

            case 'JS':

                if ($sLocation == 'BOWER') {
                    $this->aJs[$sKey] = $this->sBaseModuleUrl . $sModule . '/assets/bower_components/' . $sAsset;
                } else {
                    $this->aJs[$sKey] = $this->sBaseModuleUrl . $sModule . '/assets/js/' . $sAsset;
                }
                break;
        }
    }
protected function loadModule ( $ sAsset , $ sForceType , $ mModule ) { if ( is_array ( $ mModule ) ) { $ sModule = ! empty ( $ mModule [ 0 ] ) ? $ mModule [ 0 ] : null ; $ sLocation = ! empty ( $ mModule [ 1 ] ) ? $ mModule [ 1 ] : null ; } else { $ sModule = $ mModule ; $ sLocation = null ; } $ sType = $ this -> determineType ( $ sAsset , $ sForceType ) ; $ sKey = 'MODULE-' . $ sModule . '-' . $ sAsset ; switch ( $ sType ) { case 'CSS' : if ( $ sLocation == 'BOWER' ) { $ this -> aCss [ $ sKey ] = $ this -> sBaseModuleUrl . $ sModule . '/assets/bower_components/' . $ sAsset ; } else { $ this -> aCss [ $ sKey ] = $ this -> sBaseModuleUrl . $ sModule . '/assets/css/' . $ sAsset ; } break ; case 'JS' : if ( $ sLocation == 'BOWER' ) { $ this -> aJs [ $ sKey ] = $ this -> sBaseModuleUrl . $ sModule . '/assets/bower_components/' . $ sAsset ; } else { $ this -> aJs [ $ sKey ] = $ this -> sBaseModuleUrl . $ sModule . '/assets/js/' . $ sAsset ; } break ; } }
Loads an asset from a module's asset directory

@param  string $sAsset     The asset to load
@param  mixed  $mModule    The module to load from
@param  string $sForceType Force a particular type of asset (i.e. JS or CSS)

@return void
Loads an asset from a module s asset directory