Skip to content

Instantly share code, notes, and snippets.

@kjohnson
Last active August 27, 2015 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kjohnson/b52ec6846c8db536a2bb to your computer and use it in GitHub Desktop.
Save kjohnson/b52ec6846c8db536a2bb to your computer and use it in GitHub Desktop.
<?php
class NF_Factory
{
protected $_form;
public function __construct( $id )
{
$this->_form = new NF_Form( $id );
return $this;
}
public function get()
{
return $this->_form;
}
public function get_field( $id )
{
$form_id = $this->_form->get_id();
return new NF_Field( $id, $form_id );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment