Пример #1
0
    protected function configure()
    {
        $this->setDescription('Will create / overrite the configuration');
        $this->setHelp(<<<EOF
Write a <info>new configuration file</info> to the project folder:

Example

>> faker:configure

Will as you the following questions which can include: 

Type of Database [mysql|oracle|mssql|pgsql|sqlite|oci8]?
Database Schema Name?
Database user Password?
Database user Name?
EOF
);
        parent::configure();
    }
Пример #2
0
    protected function configure()
    {
        $this->setDescription('Will write a project folder to location');
        $this->setHelp(<<<EOF
Write a <info>new project folder</info> to the destination:

This is the first command you should run, the folder must exist, you will
normally run this within the project folder but can be overriden with -p option.

Example
<comment>Override the path</comment>
>> faker:init <info> -p /home/bob/project </info>

<comment>Build into the current folder.</comment>
>> faker:init

EOF
);
        $this->setDefinition(array(new InputArgument('folder', InputArgument::OPTIONAL, 'Folder to place the project into', '')));
        parent::configure();
    }
Пример #3
0
    protected function configure()
    {
        $this->setDescription('Analyse the configured database and create a new faker schema');
        $this->setHelp(<<<EOF
Will <info>create a new faker schema</info> using the configured database.

A database must be configured first using <info>config</info> command.
you can specify the name of the output file as show below.

Example:

<comment>Will create schema called myschema.xml</comment>
>> faker:analyse myschema

<comment>Will default schema to schema.xml</comment>
>> faker:analyse 

EOF
);
        $this->addArgument('out', InputArgument::OPTIONAL, 'file name of the faker schema to generate');
        parent::configure();
    }
Пример #4
0
    protected function configure()
    {
        $this->setDescription('Will generate the faker data');
        $this->setHelp(<<<EOF
Parse the given schema and generate data.

Example

faker:generate schema.xml      <info>Parse schema.xml in sources dir.</info>

faker:generate schema.xml true <info>Use the debug outputter.</info>

faker:generate                 <info>Parse schema.xml (default) in sources dir.</info>

EOF
);
        $this->addArgument('schema', InputArgument::OPTIONAL, 'The name of the schema file', 'schema.xml');
        parent::configure();
    }