2017 © Pedro Peláez
 

library fix-zeus

just want to hack zeus data

image

eleme/fix-zeus

just want to hack zeus data

  • Friday, November 7, 2014
  • by No5stranger
  • Repository
  • 1 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

fix-zeus

  • Thank for fzaninotto/Faker;
  • fix-zeus use Faker to create random data
  • Just want to fix zeus data, what is the reason? I don't want to too relay on zeus!

Usage:

Install with Composer

  • require fix-zeus in project
"require": {
    "eleme/fix-zeus": "~0.1"
}

Use fix-zeus to fix date

  • Base Usage:
use Fixzeus\Factory;

$nSpace = array(
    "namespace" => "thrift service name" . "_",
    "gfix" => "GfixService_" //example
)
$path  //the special file's absolute path, the json file format see below

$fixZeusFactory = new Factory($nSpace, $path);
$fixResutl = $fixZeusFactory->fix($service, $method);
  • $service: the namespace you define in your thrift file
  • $method: the method you define in your thrift service

Customize or range a value

To define a value you want, you just write a json file like below, and give the file's absolute path to the entrace function: Factory::fix($service, $method, $path) * define_value: customize value for a variable * range_value: give the range to a variable (now just support these types: integer/date/time/datetime/unixtime/user_agent), (*1)

{
    "define_value": {
        "name": "cjp",
        "age": "22"
    },
    "range_value": {
        "integer": {
            "type": "integer",
            "min": "1",
            "max": "10"
        },
        "date": {
            "type": "date",
            "format": "Y-m-d",
            "max": "2014-11-11"
        },
        "time": {
            "type": "time",
            "format": "H:i:s",
            "max": "22:22:22"
        },
        "datetime": {
            "type": "datetime",
            "format": "Y-m-d H:i:s",
            "min": "2013-11-11 22:22:22",
            "max": "2014-11-11 22:22:22"
        },
        "unixtime": {
            "type": "unixtime",
            "max": "now"
        },
        "user_agent": {
            "type": "userAgent",
            "value": "chrome/firefox/safari/opera/internetExplorer"
        }
    }
}

The Versions

07/11 2014

dev-master

9999999-dev

just want to hack zeus data

  Sources   Download

MIT

The Requires

 

The Development Requires

by cjp

thrift eleme fix zeus

07/11 2014

0.1.2

0.1.2.0

just want to hack zeus data

  Sources   Download

MIT

The Requires

 

The Development Requires

by cjp

thrift eleme fix zeus

07/11 2014

dev-cjp

dev-cjp

just want to hack zeus data

  Sources   Download

MIT

The Requires

 

The Development Requires

by cjp

thrift eleme fix zeus

30/10 2014

0.1.1

0.1.1.0

just want to hack zeus data

  Sources   Download

MIT

The Requires

 

The Development Requires

by cjp

thrift eleme fix zeus

30/10 2014

0.1.0

0.1.0.0

just want to hack zeus data

  Sources   Download

The Requires

 

The Development Requires

by cjp