2017 © Pedro Peláez
 

library fixture

Fixture component

image

funddy/fixture

Fixture component

  • Tuesday, July 2, 2013
  • by funddy
  • Repository
  • 2 Watchers
  • 3 Stars
  • 1,194 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Funddy Fixture

Build Status, (*1)

Very simple fixtures library., (*2)

Setup and Configuration

Add the following to your composer.json file:, (*3)

{
    "require": {
        "funddy/fixture": "2.0.*"
    }
}

Update the vendor libraries:, (*4)

curl -s http://getcomposer.org/installer | php
php composer.phar install

Usage

<?php

require 'vendor/autoload.php';

use Funddy\Fixture\Fixture\Fixture;
use Funddy\Fixture\Fixture\FixtureLinker;
use Funddy\Fixture\Fixture\FixtureLoader;

class HelloFixture extends Fixture
{
    public function load()
    {
        echo 'Hello!';
        $this->setReference('var', 'var');
    }

    public function getOrder()
    {
        return 0;
    }
}

class FooFixture extends Fixture
{
    private $foo;

    public function __construct($foo)
    {
        $this->foo = $foo;
    }

    public function load()
    {
        echo $this->foo;
        echo $this->getReference('var');
    }

    public function getOrder()
    {
        return 1;
    }
}

$fixtureLoader = new FixtureLoader();
$fixtureLinker = new FixtureLinker();

$helloFixture = new HelloFixture();
$helloFixture->setFixtureLinker($fixtureLinker);
$fixtureLoader->addFixture($helloFixture);

$fooFixture = new FooFixture('foo');
$fooFixture->setFixtureLinker($fixtureLinker);
$fixtureLoader->addFixture($fooFixture);

$fixtureLoader->loadAll();//Hello!foovar

The Versions

02/07 2013

dev-master

9999999-dev https://github.com/funddy/fixture

Fixture component

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

fixture

02/07 2013

v2.0.0

2.0.0.0 https://github.com/funddy/fixture

Fixture component

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

fixture

13/12 2012

v1.0.0

1.0.0.0 https://github.com/funddy/fixture

Fixture component

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

fixture