Download the PHP package rah/rah_replace without Composer

On this page you can find all versions of the php package rah/rah_replace. 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_replace

h1. rah_replace

"Download":https://github.com/gocom/rah_replace/releases | "Packagist":https://packagist.org/packages/rah/rah_replace | "Issues":https://github.com/gocom/rah_replace/issues

"Textpattern CMS":https://textpattern.com template tag that returns contained content with all searched occurrences replaced with given replacements, in the same manner as PHP's "str_replace":https://secure.php.net/manual/en/function.str-replace.php function.

h2. Install

Using "Composer":https://getcomposer.org:

bc. $ composer require rah/rah_replace

Or "download":https://github.com/gocom/rah_replace/releases an installer package.

h2. Basics

The plugin, rah_replace, introduces a new container tag to Textpattern's arsenal. The tag returns wrapped content with all found occurrences replaced with given replacements. A tag supports multiple searched occurrences and replacements.

bc. Searched content </rah::replace>

h2. Attributes

bc. ...contained statement... </rah::replace>

The tag is a container and attributes for it follow.

from Strings that will be searched and replaced with @to@ attribute's values. Separate multiple values with a comma (or @delimiter@ if changed). Default: @from=""@ Example: @"dog,cat,house"@

to Replacements that will be used to replace @from@ attribute's values. Comma (or @delimiter@) separated if multiple. Default: @to=""@ Example: @"ship,home,hat"@

delimiter Sets the delimiter used in @from@ and @to@ to separate multiple values. Default is a comma. Default: @delimiter=","@ Example: @"|"@

h2. Examples

h3. Replaces a dog with a cat

bc. My favorite animal is a dog. </rah::replace>

Returns: @My favorite animal is a cat.@

h3. Replace multiple needles with different replacements

bc. I live in a house with my dog and Mike. </rah::replace>

Returns: @I live in a boat with my friend and wife.@

h3. Replace multiple needles with a one replacement

bc. I remember when dad and Mike did go to fishing. </rah::replace>

Returns: @I remember when I and I did go to fishing.@

h3. Using a different delimiter

p. By default any comma is treated as a delimiter and can not be used as actual value. To use a comma (@,@) as a needle or a replacement, you would have to change the delimiter to something else. Like for instance to a vertical bar:

bc. A, B, C. </rah::replace>

Returns: @A! B! C!@

h2. Changelog

h3. Version 0.5.0 - 2019/04/06

h3. Version 0.4.2 - 2013/05/07

h3. Version 0.4.1 - 2013/04/25

h3. Version 0.4 - 2012/07/12

h3. Version 0.3 - 2011/04/22

h3. Version 0.2 - 2009/04/16

h3. Version 0.1 - 2009/04/16


All versions of rah_replace with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
textpattern/installer Version *
textpattern/lock Version >=4.7.0
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_replace contains the following files

Loading the files please wait ....