# Class Thelia\Tools\DIGenerator | thelia

# Class DIGenerator

Namespace: Thelia\Tools
Located at core/lib/Thelia/Tools/DIGenerator.php

Methods summary

`public static array`

# `genDiModel( string $directory, array $exclude = array() )`

Find all models in a directory

Find all models in a directory

#### Parameters

$directory
  `string`
  $directory Directory where models have to be find.
$exclude
  `array`
  $exclude Model to be exclude in the return

#### Returns

`array`
key is the service name and value the full Class name (including namespace if needed)

#### Throws

``RuntimeException``
id $directory is not a valid directory