Code Monkey home page Code Monkey logo

fuelphp-doctrine's Introduction

FuelPHP Doctrine

Latest Version Software License Total Downloads

This package is a wrapper around doctrine/doctrine2 package.

Install

Via Composer

$ composer require indigophp/fuelphp-doctrine

Usage

Simply install this package to be able to use Doctrine inside FuelPHP.

Configuration

To make it work, you need the following doctrine configuration.

	'dbal'                        => 'default',
	'proxy_dir'                   => '/tmp',
	'proxy_namespace'             => 'PrOxYnAmEsPaCe',
	'auto_generate_proxy_classes' => true,
	'mappings'                    => array(
		'mapping' => array(
			'type'   => 'xml',
			'dir'    => '/mypath',
			'prefix' => 'MyPrefix',
		),
	),
	'cache_driver'                => 'array',

You can also use the Setup class to auto configure the Configuration object.

	'dbal'            => 'default',
	'auto_config'     => true,
	'dev_mode'        => \Fuel::$env === \Fuel::DEVELOPMENT,
	'proxy_dir'       => '/tmp',
	'cache_driver'    => 'array',

Multiple managers

By default you have one manager (default). If you would like use multiple managers, you have to add a key managers to your doctrine config, and set your configurations there. You can also set global configurations in the config root. Make sure to set auto_mapping to false.

	'auto_mapping'    => false,
	'dbal'            => 'default',
	'managers'        => array(
		'default'   => array(),
		'aditional' => array()
	),

Note: This package uses indigophp/fuelphp-dbal for connections. Check the package documentation.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

fuelphp-doctrine's People

Contributors

sagikazarmark avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.