Skip to content
a small framework to create command line tools with php & PDO CLI Interface
PHP
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib/CliWrapper
LGPL-3.0.txt
README.md
composer.json
example.php
screencast.gif

README.md

PHPCliWrapper

About

PHPCliWrapper is a small framework that helps you build commandline tools in PHP.
With the included PDO commands you can use PHPCliWrapper as a PDO commandline interface.
You can also write your own commands and use this library for whatever purpose you like.

Demo

Usage

  1. You can load and run PHPCLiWrapper like this:
$cli = new CliWrapper\Cli();

$cli->addCommand('list', new CliWrapper\Pdo\ListCommand($connection));
$cli->addCommand('show', new CliWrapper\Pdo\ShowCommand($connection));
$cli->addCommand('set',  new CliWrapper\Pdo\SetCommand($connection));
$cli->addCommand('cd',   new CliWrapper\Pdo\CdCommand($connection));

$cli->run();

Installing

You can install PHPCliWrapper with Composer. Add these lines to your composer.json

 "require": {
     "grothkopp/PHPCliWrapper": "0.1.*"
   },
  "repositories": [
   {
      "type": "vcs",
      "url": "git@github.com:grothkopp/phpcliwrapper.git"
    }

License

PHPCliWrapper
Copyright (c) 2014, Stefan Grothkopp, All rights reserved.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3.0 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library.

You can’t perform that action at this time.