# formidable/4.11.04/classes/factories/FrmEntryFactory.php

Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes &amp; More, version 4.11.04. 50 lines.

- Page: https://pluginprobe.com/plugins/formidable/4.11.04/code/classes/factories/FrmEntryFactory.php
- Raw: https://pluginprobe.com/plugins/formidable/4.11.04/raw/classes/factories/FrmEntryFactory.php
- Modified: 2020-12-07T20:56:38+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/formidable/4.11.04/code/classes/factories/FrmEntryFactory.php#L10-L20`.

```php
<?php
if ( ! defined( 'ABSPATH' ) ) {
	die( 'You are not allowed to call this page directly.' );
}

/**
 * @since 2.04
 */
class FrmEntryFactory {

	/**
	 * Create an instance of the FrmEntryFormatter class
	 *
	 * @since 2.04
	 *
	 * @param array $atts
	 *
	 * @return FrmEntryFormatter|FrmProEntryFormatter
	 */
	public static function entry_formatter_instance( $atts ) {
		if ( FrmAppHelper::pro_is_installed() ) {
			$entry_formatter = new FrmProEntryFormatter( $atts );
		} else {
			$entry_formatter = new FrmEntryFormatter( $atts );
		}

		return $entry_formatter;
	}

	/**
	 * Create an intsance of the FrmEntryShortcodeFormatter class
	 *
	 * @since 2.04
	 *
	 * @param int|string $form_id
	 * @param array $atts
	 *
	 * @return FrmEntryShortcodeFormatter|FrmProEntryShortcodeFormatter
	 */
	public static function entry_shortcode_formatter_instance( $form_id, $atts ) {
		if ( FrmAppHelper::pro_is_installed() ) {
			$shortcode_formatter = new FrmProEntryShortcodeFormatter( $form_id, $atts );
		} else {
			$shortcode_formatter = new FrmEntryShortcodeFormatter( $form_id, $atts );
		}

		return $shortcode_formatter;
	}
}

```
