GithubHelp home page GithubHelp logo

doctrine-example-app's Introduction

Doctrine Example App

Installation

  1. git clone https://github.com/beberlei/doctrine-example-app.git
  2. Call "php bin/composer.phar install"
  3. Copy config.yml-dist in config.yml
  4. Configure config.yml MySQL/PgSQL/SQLite

Overview

A simple CarDealer example to show various mapping scenarios and Doctrine features.

It runs completly on the command-line and integrates an SQL toolbar that shows queries whenever they are executed.

You can write new commands by extending a simple class:

<?php
namespace CarDealer\Basic;

use Doctrine\ORM\EntityManager;
use CarFramework\ConsoleScenario;

class VehicleScenario extends ConsoleScenario
{
    public function play(EntityManager $entityManager, array $args)
    {
        // your testcode here
    }
}

Command names are automatically detected from the namespace+class name, however they are just simple Symfony Console commands. You can extend the configure method. See the docs for more information: http://symfony.com/doc/2.0/components/console.html

To run a console command just call to see the help and a list of all the commands

bash> php console

Also there is a sample scenario:

bash> php console example:basic:vehicle

To shup the SQL Logging messages up just run with the -q flag.

bash> php console example:basic:vehicle -q

Installation

Just clone this repository then call composer to grab all the dependencies:

php bin/composer.phar install

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.