Download the PHP package rah/rah_terminal without Composer

On this page you can find all versions of the php package rah/rah_terminal. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package rah_terminal

h1. rah_terminal

p. "Twitter":http://twitter.com/gocom | "GitHub":https://github.com/gocom/rah_terminal | "Donate":http://rahforum.biz/donate/rah_terminal

p. Rah_terminal is a plugin for "Textpattern CMS.":http:://textpattern.com It provides a terminal emulator interface for executing external applications, commands and evaluating PHP code, right from Textpattern's admin-panel.

h2. Installing

p. Using "Composer":http://getcomposer.org:

bc. $ composer.phar require rah/rah_terminal

h2. Toolshed notice

p. This is a toolshed project. Experimental and not part of the main supported product line of Rah. Not yet at least. Please use at your own risk.

h2. Requirements

h2. Modules

p. Modules can be used to extend rah_terminal's functionality, adding additional terminal types. Modules are like any other Textpattern plugin, and can be installed the same way. The following modules are available.

h2. Extending

p. The plugin comes small API which can be used to add additional terminal types to plugin. By default the plugin comes with options PHP, SQL and Shell, but that can be extended to include a Textile Generator among other things. These added terminal types act same as the built in ones do. A callback function is registered, and everything that the callback functions prints or returns to global scope, will be shown to the user. Thrown exceptions and errors are captured too.

h3. API

h4. rah_terminal::get() - Gets an instance of rah_terminal class

bc. object rah_terminal::get();

p. @get()@ is your standard factory method, following a loose singleton pattern. It returns an instance of the rah_terminal class. When creating an object, always use @get()@ instead of creating new instance yourself.

h4. rah_terminal::add_terminal() - Adds a new terminal option

bc. object rah_terminal::add_terminal( string $name, string|null $label, callback $callback );

p. @add_terminal()@ adds and registers a new terminal option. The first parameter @$name@ is a unique name for the terminal option, @$label@ is the label shown to users and @$callback@ is the callback function.

p. When registering new labels, please use prefixes in the @$name@ and the @$callback@ function to avoid conflicts with other codebases, including Textpattern core and rah_terminal itself. For more information about prefixing please see Textpattern's "Plugin Development Guidelines.":http://textpattern.net/wiki/index.php?title=Plugin_Development_Guidelines

p. To use @add_terminal()@ you would first get an instance of rah_terminal using the static method @get()@.

bc. rah_terminal::get() ->add_terminal('abc_example', gTxt('abc_example_label'), 'abc_example_function');

h4. add_privs() - Grants user-groups privileges to a terminal option

bc. mixed add_privs(string $event, string $groups);

p. @add_privs()@ is a standard Textpattern function. In Textpattern it's used to grant permission. Rah_terminal uses it for same thing, to grant users access to terminal options. This is to allow and limit from certain groups access to some terminals, while allowing access to others.

p. @$event@ is the name of the "event" which the access is allowed, and @$groups@ is comma-separated list of user-group numbers. Note that neither allow any whitespace.

p. Rah_terminal's events are prefixed with @rah_terminal.@. And terminal event name would consist of the prefix, followed by the terminal options name, given with the @add_terminal()@ methods first parameter. For terminal option named as @abc_example@, add_privs line would look like following:

bc. add_privs('rah_terminal.abc_example', '1,2,3,4');

h2. Changelog

h3. Version 0.1.1 - 2013/05/07

h3. Version 0.1.0 - 2013/04/24


All versions of rah_terminal with dependencies

PHP Build Version
Package Version
Requires php Version >=5.2.0
textpattern/lock Version >=4.5.0
textpattern/installer Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rah/rah_terminal contains the following files

Loading the files please wait ....