Download the PHP package carlesjove/a without Composer

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

A

A is a PHP microframework based on file naming, for those times you want to keep things simple. Just name a file like_this.php and you'll get a working route http://example.com/like/this. No database, no configuration files, no nothing. And it's ready for multilingual sites.

Overview

A is meant for simple sites that do not require database or complex architectures, but still want to have clean URLs and stuff as organized as possible.

Features

Requirements

Usage

A works out of the box, no configuration needed. Download the files and start building your site.

URIs and file naming

Imagine you want this/cool/uri in your site. For it to work, you just need to create a file named this_cool_uri.php, and you're done. You probably want a home page for your site, so create a file named home.php, and there you go.

Layout

If you create a file named layout.php A will use it as a wrapper for all pages, and thus you can save some time and keep things cleaner. You just need to include `` where you want each page content displayed. Here's an example:

Data

A encourages you to keep data and presentation separated. This is particullary interesting in pages with longs lists or large pieces of text.

Within the data directory you'll find a file called global.php where you can write site wide variables. You can also create individual files that will be only loaded on page request, by simply naming them the same as the page file. So if you have a page named about.php A will look for a data/about.php file and load it. If your page is very_long_route.php, then the data for it will be in data/very_long_route.php.

Lists and single item pages

A allows to create individual item pages from a list using a single template, just like in MVC frameworks and most CMS.

Imagine you have a page called posts.php that lists all your posts. You can now create another file called posts_[id].php which will be used as the template for individual posts. You need to have the array of posts in data/posts.php and name it $list, where each array's key is the url you want for the post. A will load the post data in the $item variable. Example:

Multilingual sites

If you want your sites to support multiple languages, it's really easy. You just need to create a langs directory within the data directory, and there creating a directory for every language you want to support. And example would be:

Now in each language directory, you can create your data files as usual, following the naming pattern, so my_page.php will look at data/langs/[current language]/my_page.php.

One important thing to know is: A won't use translations instead of other data, it will just override it. That means that if your current language is fr and your current page is my_page.php, A will get data first from data/my_page.php and then from data/langs/fr/my_page.php. This is a convenient way to keep things DRY when a given text doesn't need translation.

If you're creating a multilingual site, you'd really want to use the helper methods nav() and lang() to preserve routes accross languages.

Custom functions

Sometimes you want to do things, and you wrap them in functions. You can put them in a file named functions.php, and it will be included.

Changelog

== 0.6 ==

== 0.5 ==

== 0.4 ==

== 0.3 ==

== 0.2 ==

License

Do whatever the fuck you want with this code. Really.


All versions of a with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.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 carlesjove/a contains the following files

Loading the files please wait ....