public static function fromArray( array $data )
    {

        if( !isset($data['id']) || !isset($data['module']) || !isset($data['category']) ) {
            throw new common_exception_InconsistentData('The module requires an id, a module and a category');
        }
        return new static($data['id'], $data['module'], $data['category'], $data);
    }
public static function fromArray( array $data )
    {

        if( !isset($data['id']) || !isset($data['module']) || !isset($data['category']) ) {
            throw new common_exception_InconsistentData('The module requires an id, a module and a category');
        }
        return new static($data['id'], $data['module'], $data['category'], $data);
    }
public static function fromArray ( array $ data ) { if ( ! isset ( $ data [ 'id' ] ) || ! isset ( $ data [ 'module' ] ) || ! isset ( $ data [ 'category' ] ) ) { throw new common_exception_InconsistentData ( 'The module requires an id, a module and a category' ) ; } return new static ( $ data [ 'id' ] , $ data [ 'module' ] , $ data [ 'category' ] , $ data ) ; }
Create a test module from an assoc array
@param array $data
@return DynamicModule the new instance
@throws common_exception_InconsistentData
Create a test module from an assoc array