src/Awjudd/AssetProcessor/AssetProcessor.php
private function setupLibraries()
    {
        // Get the list of processors
        $processors = config('assetprocessor.processors.types', array());

        // Grab the interface we should be implementing
        $interface = config('assetprocessor.processors.interface');

        // Iterate through the list
        foreach($processors as $name => $class)
        {
            // Get an instance of the processor
            $instance = $class::getInstance($this->processingEnabled);

            // Ensure that it implements the correct interface
            if(!($instance instanceof $interface))
            {
                throw new Exception(Lang::get('assetprocessor::errors.asset.invalid-type', array('class' => $class, 'interface' => $interface)));
            }

            // Add it into the array of processors
            $this->processors[$name] = $instance;

            // Grab the list of extensions it processes
            $this->deriveExtensionMapping($name, $class::getAssociatedExtensions());

            // Check if the asset type exists
            if(!isset($this->files[$instance->getAssetType()]))
            {
                // Asset type didn't exist, so add it into the mapping
                $this->files[$instance->getAssetType()] = array();
            }
        }
    }
private function setupLibraries()
    {
        // Get the list of processors
        $processors = config('assetprocessor.processors.types', array());

        // Grab the interface we should be implementing
        $interface = config('assetprocessor.processors.interface');

        // Iterate through the list
        foreach($processors as $name => $class)
        {
            // Get an instance of the processor
            $instance = $class::getInstance($this->processingEnabled);

            // Ensure that it implements the correct interface
            if(!($instance instanceof $interface))
            {
                throw new Exception(Lang::get('assetprocessor::errors.asset.invalid-type', array('class' => $class, 'interface' => $interface)));
            }

            // Add it into the array of processors
            $this->processors[$name] = $instance;

            // Grab the list of extensions it processes
            $this->deriveExtensionMapping($name, $class::getAssociatedExtensions());

            // Check if the asset type exists
            if(!isset($this->files[$instance->getAssetType()]))
            {
                // Asset type didn't exist, so add it into the mapping
                $this->files[$instance->getAssetType()] = array();
            }
        }
    }
private function setupLibraries ( ) { // Get the list of processors $ processors = config ( 'assetprocessor.processors.types' , array ( ) ) ; // Grab the interface we should be implementing $ interface = config ( 'assetprocessor.processors.interface' ) ; // Iterate through the list foreach ( $ processors as $ name => $ class ) { // Get an instance of the processor $ instance = $ class :: getInstance ( $ this -> processingEnabled ) ; // Ensure that it implements the correct interface if ( ! ( $ instance instanceof $ interface ) ) { throw new Exception ( Lang :: get ( 'assetprocessor::errors.asset.invalid-type' , array ( 'class' => $ class , 'interface' => $ interface ) ) ) ; } // Add it into the array of processors $ this -> processors [ $ name ] = $ instance ; // Grab the list of extensions it processes $ this -> deriveExtensionMapping ( $ name , $ class :: getAssociatedExtensions ( ) ) ; // Check if the asset type exists if ( ! isset ( $ this -> files [ $ instance -> getAssetType ( ) ] ) ) { // Asset type didn't exist, so add it into the mapping $ this -> files [ $ instance -> getAssetType ( ) ] = array ( ) ; } } }
Used internally in order to set up an instance of each of the processors
that we will need.

@return void
Used internally in order to set up an instance of each of the processors that we will need .