public static function createFlexModel($identifier, $resource, $cachePath)
    {
        $domDocument = new DOMDocument('1.0', 'UTF-8');
        $domDocument->load($resource);
        $domDocument->xinclude();

        $flexModel = new FlexModel($identifier);
        $flexModel->load($domDocument, $cachePath);

        return $flexModel;
    }