Download the PHP package arc/base without Composer

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

arc\base common datatypes for ARC

Scrutinizer Code Quality Code Coverage Latest Stable Version Total Downloads Latest Unstable Version License

arc\base is part of ARC - a component library. This package provides a number of basic datatypes and operations that are used in most other ARC packages.

ARC is a spinoff from the Ariadne Web Application Platform and Content Management System http://www.ariadne-cms.org/.

Installation

You can install the full set of ARC components using composer:

composer require arc/arc

Or you can start a new project with arc/arc like this:

composer create-project arc/arc {$path}

Or just use this package:

composer require arc/base

arc/base contains

Example code

\arc\path

\arc\path::collapse( '../', '/current/directory/' );
// => '/current/'

\arc\path::collapse( 'some//../where', '/current/directory' );
// => '/current/directory/where/'

\arc\path::collapse( '../../../', '/current/directory/' );
// => '/'

\arc\path::diff( '/a/b/', '/a/c/' );
// => '../c/'

\arc\path::parent( '/parent/child/' );
// => '/parent/'

\arc\path::map( '/some path/with "quotes"/', function( $entry ) {
    return urlencode( $entry, ENT_QUOTES );
});
// => '/some+path/with+%22quotes%22/'

\arc\path::reduce( '/a/b/', function( $result, $entry ) {
    return $result . $entry . '\\';
}, '\\' );
// => '\\a\\b\\';

\arc\tree

$tree = \arc\tree::expand([
    '/' => 'Root',
    '/foo/bar/' => 'Bar'
]);
// => NamedNode tree with '/' => Root, '/foo/' => null, '/foo/bar/' => 'Bar'

$hash = \arc\tree::collapse( $tree );
// [ '/' => 'Root', '/foo/bar/' => 'Bar' ]

$nodeValueWithAnR = \arc\tree::search( $tree, function($node) {
    if ( strpos( $node->nodeValue, 'R' )!==false ) {
        return $node->nodeValue;
    }
});
// => 'Root'

$Btree = \arc\tree::filter( $tree, function($node) {
    return ( strpos( $node->nodeValue, 'B' ) !== false );
});
// => [ '/foo/bar/' => 'Bar' ]

\arc\hash

\arc\hash::get( '/foo/bar/', [ 'foo' => [ 'bar' => 'baz' ] ] );
// => 'baz'

\arc\hash::get( '/foo/bar/', [ 'foo' => [  ] ], 'zilch' );
// => 'zilch'

\arc\hash::parseName( 'input[one]' );
// => '/input/one/'

\arc\hash::compileName( '/input/one' );
// => 'input[one]'

\arc\tree::collapse(
    \arc\hash::tree(
        [ 'foo' => [ 'bar' => 'A bar', 'baz' => 'Not a bar' ] ]
    )
);
// => [ '/foo/bar/' => 'A bar', '/foo/baz/' => 'Not a bar' ]

All versions of base with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
arc/prototype Version ~3.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 arc/base contains the following files

Loading the files please wait ....