protected function createInstance($classes, $properties) {
        $first = array_shift($classes);
        $instance = $first->createInstanceWithProperties($properties);
        foreach ($classes as $class) {
            $instance = $this->getResource('');
            $instance->setType($class);
        }
        return $instance;
    }
protected function createInstance($classes, $properties) {
        $first = array_shift($classes);
        $instance = $first->createInstanceWithProperties($properties);
        foreach ($classes as $class) {
            $instance = $this->getResource('');
            $instance->setType($class);
        }
        return $instance;
    }
protected function createInstance ( $ classes , $ properties ) { $ first = array_shift ( $ classes ) ; $ instance = $ first -> createInstanceWithProperties ( $ properties ) ; foreach ( $ classes as $ class ) { $ instance = $ this -> getResource ( '' ) ; $ instance -> setType ( $ class ) ; } return $ instance ; }
creates the instance

@param array $classes
@param array $properties
@return core_kernel_classes_Resource
creates the instance