Jalz Posted May 2, 2011 Posted May 2, 2011 Hello all, Just curious, has anyone integrated CodeIgnitor (or one of the other PHP Frameworks) with the FileMaker Api for PHP? I'll be working on a new project and wouldnt mind using a framework like this to see what its like, I know there is some more of integration between the fx class, but I havent seen anyone use the API for PHP with these frameworks. Thanks Jalz
dansmith65 Posted May 2, 2011 Posted May 2, 2011 I just built a website in CodeIgniter that used FM API to connect to FileMaker. I didn't use the database class that CodeIgniter offers, as there is no driver for FileMaker, but it still helped a lot. I just had my model return the appropriate data as a multi-dimensional array. If you end up using CodeIgniter, let me know, because I created a few tools to make things easier for me. For example, the pagination class does not work well with FileMaker, so I extended it. Actually, I think someone did some sort of link between fx.php and CodeIgniter, but I don't think it hooked in to CodeIgniters database class either. You should be able to find it in the CodeIgniter Wiki.
Jalz Posted May 2, 2011 Author Posted May 2, 2011 Hi Dan, Thats cool. I'm currently working on a 'normal fmp' project at the moment so I wont start this one for at least a month yet. I'll keep you in mind if thats OK, I've built 3 sites with the api for php, but thought I could utilise a libraries in the CI framework to make development of applications quicker and 'neater'. Cheers Jalz
Newbies woodlandtrek9 Posted November 1, 2011 Newbies Posted November 1, 2011 Hi guys, I recently started a CI project in which most of the data will be coming from MS SQL, but some will need to come from filemaker. I set up the filemaker.php as a codeigniter library, but when I try to use it, I get the fatal error: "Unable to locate the specified class: ExceptionsEXT". It seems as though there is some sort of conflict with CI. Did either of you guys encounter this? I'm fairly new with php, so I could be doing something obviously wrong. How did you go about implementing the filemaker.php into your models? Thanks for your help
dansmith65 Posted November 3, 2011 Posted November 3, 2011 I created a Filemaker_helper library, with this as the __construct() method: function __construct($dbconfig='fmdb') { // provide access to CodeIgniter Resources $this->CI =& get_instance(); // create FM Database object require_once 'FileMaker.php'; $this->CI->config->load($dbconfig, TRUE); $this->db = new FileMaker( $this->CI->config->item('database', $dbconfig), $this->CI->config->item('hostname', $dbconfig), $this->CI->config->item('username', $dbconfig), $this->CI->config->item('password', $dbconfig) ); } I access the FileMaker.php file (from the PHP API) the same way as in the FM PHP API's documentation: make sure it is in a location that can be found via PHP's Include Path. Although... I'm going to be looking into using this for my next FM PHP project: http://fmforums.com/forum/topic/78813-fastfm-filemaker-php-orm/
dansmith65 Posted February 19, 2012 Posted February 19, 2012 I just uploaded my helper library and some sample files to show how it's used: https://github.com/dansmith65/CodeIgniter-Filemaker-helper
Recommended Posts
This topic is 4918 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now