2017 © Pedro Peláez
 

yii2-extension yii2-fmconnector

FileMaker ODBC connector and PHP-API integration

image

airmoi/yii2-fmconnector

FileMaker ODBC connector and PHP-API integration

  • Tuesday, January 30, 2018
  • by airmoi
  • Repository
  • 1 Watchers
  • 2 Stars
  • 328 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 25 Versions
  • 11 % Grown

The README.md

Yii2 FileMaker Connector

FileMaker ODBC connector and PHP-API integration, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist airmoi/yii2-fmconnector "*"

or add, (*4)

"airmoi/yii2-fmconnector": "*"

to the require section of your composer.json file., (*5)

Usage

  1. ODBC connection

Once plugin installed using composer, and ODBC driver configured on the server, Create/Edit your db config file using this lines, (*6)

return [
    'class' => 'airmoi\yii2fmconnector\db\Connection',
    'dsn' => 'fmp:<odbc_connection_name>',
    'username' => '<odbc_username>',
    'password' => '<odbc_username>',
    'charset' => 'utf8',
    'pdoClass' => 'airmoi\yii2fmconnector\db\PDO',
    //'enableSchemaCache' => true,
    //'schemaCacheDuration' => 86400,
    //'enableQueryCache' => true,
    //'queryCacheDuration' => 1000,
    'schemaMap' => ['fmp' => [
            'class' => 'airmoi\yii2fmconnector\db\Schema',
            /* 
             * Customize this option to ignore specific fields (like global/utils fields) which you don't want to get access
             * Ignore theses fields improve query performences
             */
            'ignoreFields' => [
                'FieldType' => ['global%'],
                'FieldClass' => ['Summary'],
                'FieldName' => ['zkk_%',
                    'zgi_%',
                    'zg_%',
                    'zz_%',
                    'zzz_%',
                    'zlg_%',
                    'z_foundCount_cU',
                    'z_listOf_eval_cU',
                ]
            ],
            /* 
             * Regexp pattern used to detect if a field is a primary key
             * this pattern while be used against fields names
             */
            'primaryKeyPattern' => '/^zkp(_)?/',
            /* 
             * pattern used to detect if a field is a foreign key
             * this pattern while be used against fields names
             * Second match of the pattern must return the foreign key trigram (XXX)
             */
            'foreignKeyPattern' => '/^(zkf|zkp)_([^_]*).*/', //pattern used to detect if a field is a foreign key
        ]
    ]
];
  1. PHP-API

You may also configure a connection using PHP-API this way, (*7)

[
    'class' => 'airmoi\yii2fmconnector\api\Connection',
    'dsn' => 'fmpapi:host=your_host_ip;dbname=your_db_name',
    'username' => 'db username',
    'password' => 'db passwod',
    'charset' => 'utf8',
    //'schemaCache' => 'cache',
    //'enableSchemaCache' => true,
    //'schemaCacheDuration' => 3600,
    'options' => [ //Specific connector options
        'dateFormat' => 'd/m/Y',
        'emptyAsNull' => true,
    ],
    'schemaMap' => [
        'fmpapi' => [
            'class' => 'airmoi\yii2fmconnector\api\Schema',
            //'layoutFiltterPattern' =>  '/^PHP_/' //Regex pattern to filter layout's list
        ]
    ]
]
  1. Customize gii

Add these lines to gii module config to enhance model and CRUD generators, (*8)

'generators' => [
        'model' => [
        'class' => 'yii\gii\generators\model\Generator',
        'templates' => [
            'FileMakerAPI' => '@app/vendor/airmoi/yii2-fmconnector/gii/api/templates/',
            'FileMakerODBC' => '@app/vendor/airmoi/yii2-fmconnector/gii/odbc/templates/',
        ]
    ],
     'crud' => [ // generator name
        'class' => 'airmoi\yii2fmconnector\gii\api\crud\Generator', // generator class
        /*'templates' => [ //setting for out templates
            'myCrud' => '@app/myTemplates/crud/default', // template name => path to template
        ]*/
    ]
],

The Versions

30/01 2018

dev-develop

dev-develop

FileMaker ODBC connector and PHP-API integration

  Sources   Download

MIT

The Requires

 

by Romain Dunand

extension yii2 filemaker odbc

08/01 2018

dev-master

9999999-dev

FileMaker ODBC connector and PHP-API integration

  Sources   Download

MIT

The Requires

 

by Romain Dunand

extension yii2 filemaker odbc

08/01 2018

2.1.5

2.1.5.0

FileMaker ODBC connector and PHP-API integration

  Sources   Download

MIT

The Requires

 

by Romain Dunand

extension yii2 filemaker odbc

30/10 2017

2.1.4

2.1.4.0

FileMaker ODBC connector and PHP-API integration

  Sources   Download

MIT

The Requires

 

by Romain Dunand

extension yii2 filemaker odbc

05/04 2017

2.1.4-beta

2.1.4.0-beta

FileMaker ODBC connector and PHP-API integration

  Sources   Download

MIT

The Requires

 

by Romain Dunand

extension yii2 filemaker odbc

10/03 2017

2.1.3

2.1.3.0

FileMaker ODBC connector and PHP-API integration

  Sources   Download

MIT

The Requires

 

by Romain Dunand

extension yii2 filemaker odbc

09/03 2017

2.1.2

2.1.2.0

FileMaker ODBC connector and PHP-API integration

  Sources   Download

MIT

The Requires

 

by Romain Dunand

extension yii2 filemaker odbc

23/12 2016

2.1.1

2.1.1.0

FileMaker ODBC connector and PHP-API integration

  Sources   Download

MIT

The Requires

 

by Romain Dunand

extension yii2 filemaker odbc

23/12 2016

dev-feature/relation_supports

dev-feature/relation_supports

FileMaker ODBC connector and PHP-API integration

  Sources   Download

MIT

The Requires

 

by Romain Dunand

extension yii2 filemaker odbc

08/12 2016

dev-api-2.2.0

dev-api-2.2.0

FileMaker ODBC connector and PHP-API integration

  Sources   Download

MIT

The Requires

 

by Romain Dunand

extension yii2 filemaker odbc

08/12 2016

2.1.0-beta1

2.1.0.0-beta1

FileMaker ODBC connector and PHP-API integration

  Sources   Download

MIT

The Requires

 

by Romain Dunand

extension yii2 filemaker odbc

09/11 2016

2.0.6

2.0.6.0

FileMaker ODBC connector and PHP-API integration

  Sources   Download

MIT

The Requires

 

by Romain Dunand

extension yii2 filemaker odbc

25/10 2016

2.0.5

2.0.5.0

FileMaker ODBC connector and PHP-API integration

  Sources   Download

MIT

The Requires

 

by Romain Dunand

extension yii2 filemaker odbc

14/10 2016

2.0.4

2.0.4.0

FileMaker ODBC connector and PHP-API integration

  Sources   Download

MIT

The Requires

 

by Romain Dunand

extension yii2 filemaker odbc

05/10 2016

2.0.3

2.0.3.0

FileMaker ODBC connector and PHP-API integration

  Sources   Download

MIT

The Requires

 

by Romain Dunand

extension yii2 filemaker odbc

23/09 2016

2.0.2

2.0.2.0

FileMaker ODBC connector and PHP-API integration

  Sources   Download

MIT

The Requires

 

by Romain Dunand

extension yii2 filemaker odbc

21/07 2016

2.0.x-dev

2.0.9999999.9999999-dev

FileMaker ODBC connector and PHP-API integration

  Sources   Download

MIT

The Requires

 

by Romain Dunand

extension yii2 filemaker odbc

21/07 2016

2.0.1

2.0.1.0

FileMaker ODBC connector and PHP-API integration

  Sources   Download

MIT

The Requires

 

by Romain Dunand

extension yii2 filemaker odbc

06/07 2016

2.0.0

2.0.0.0

FileMaker ODBC connector and PHP-API integration

  Sources   Download

MIT

The Requires

 

by Romain Dunand

extension yii2 filemaker odbc

17/12 2015

2.0.0-alpha

2.0.0.0-alpha

FileMaker ODBC connector and PHP-API integration

  Sources   Download

MIT

The Requires

 

by Romain Dunand

extension yii2 filemaker odbc

14/08 2015

1.0.4-beta

1.0.4.0-beta

FileMaker ODBC connector and PHP-API integration

  Sources   Download

MIT

The Requires

 

by Romain Dunand

extension yii2 filemaker odbc

11/08 2015

1.0.3-beta

1.0.3.0-beta

FileMaker ODBC connector and PHP-API integration

  Sources   Download

MIT

The Requires

 

by Romain Dunand

extension yii2 filemaker odbc

10/08 2015

1.0.2-beta

1.0.2.0-beta

FileMaker ODBC connector and PHP-API integration

  Sources   Download

MIT

The Requires

 

by Romain Dunand

extension yii2 filemaker odbc

26/05 2015

1.0.1-beta

1.0.1.0-beta

FileMaker ODBC connector and PHP-API integration

  Sources   Download

MIT

The Requires

 

by Romain Dunand

extension yii2 filemaker odbc

11/05 2015

1.0.0-beta

1.0.0.0-beta

FileMaker ODBC connector and PHP-API integration

  Sources   Download

MIT

The Requires

 

by Romain Dunand

extension yii2 filemaker odbc