Giter Club home page Giter Club logo

php_propel_behavior_create_entity's Introduction

Full Stop

I still like the idea but there is currently no use case to develop it anymore.

Create Entity Behavior for Propel

This free as in freedom behavior should easy up entity creation in your propel query classes.

Thanks to the StateMachineBehavior to act as such a great template.

The build status of the current master branch is tracked by Travis CI: Build Status Latest stable

The scrutinizer status are: code quality

The versioneye status is: dependencies

Downloads: Downloads this Month

It is available at openhub.net.

Why

  • no new in your code anymore
  • eases up writing test code (createEntity can be mocked)

Usage

  • make sure you have extension=pdo_sqlite.so enabled if you want to run phpunit
  • the behavior adds a createEntity method to the table query class
$query = DemoQuery::create();
//create a new instance of class "Demo" without using new
$entity = $query->createEntity();

Installation

By Hand

mkdir -p vendor/net_bazzline/php_propel_behavior_create_entity
cd vendor/net_bazzline/php_propel_behavior_create_entity
git clone https://github.com/bazzline/php_propel_behavior_create_entity
"net_bazzline/php_propel_behavior_create_entity": "dev-master"

Enable Behavior in Propel

  • add the following to your propel.ini
propel.behavior.create_entity.class = lib.vendor.net_bazzline.php_propel_behavior_create_entity.source.CreateEntityBehavior
  • add usage in your schema.xml
<!-- for the whole database -->
<database name="propel" defaultIdMethod="native" package="lib.model">
    <behavior name="create_entity" />
</database>
<!-- for one table -->
<database name="propel" defaultIdMethod="native" package="lib.model">
    <table name="my_table">
        <column name="id" type="INTEGER" required="true" primaryKey="true" autoIncrement="true" />
        <behavior name="create_entity" />
    </table>
</database>

API

API available at bazzline.net

History

  • upcoming
    • @todo
    • added "why" section
    • optimized reading
  • 1.2.0 - released at 06.03.2016
    • added support for php 7.0
    • removed support for php 5.3.3
  • 1.1.4 - released at 06.03.2016
    • updated dependencies
  • 1.1.3 - released at 11.01.2015
    • fixed dependency handling for phpunit 4.8.*
  • 1.1.2 - released at 11.12.2015
    • updated dependency
  • 1.1.1 - released at 07.11.2015
    • updated dependency
  • 1.1.0 - released at 17.09.2015
    • fixed issue when dealing with namespaces
  • 1.0.1 - released at 19.08.2015
    • updated dependency
  • 1.0.0 - released at 02.08.2015
    • initial release

Final Words

Star it if you like it :-). Add issues if you need it. Pull patches if you enjoy it. Write a blog entry if you use it. Donate something if you love it :-].

php_propel_behavior_create_entity's People

Contributors

stevleibelt avatar tworzenieweb avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

php_propel_behavior_create_entity's Issues

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.