Download the PHP package velosipedist/beatrix without Composer

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

Face the truth — now it is better, much better!

Beatrix

Attempt to beat the Bitrix defectiveness. You should not know what is inside.

What i have to do?

Just download beatrix.phar from releases Github section or build it by yourself using Phing

Include beatrix.phar at Bitrix startup (recommended in /bitrix/php_interface/init.php, create if not exists).

Initialize with options if you need to tune up something:

Some options will be forced internally, others available as described in Slim docs

Nothing changed. What's next?

Of course. There is no magic (almost), you have to write some code yourself :unamused:.

All Beatrix instance methods available through Beatrix::app() (it gives us access to Application which is Slim app with some improvements), but also we have some useful shortcut functions.

For now we have following features:

Plates templating engine

Old school template-sawing (with header.php & footer.php as output) replaced with power of Plates engine. It gives us templates inheritance, blocks, etc.

Basic setup

Just create .tpl folder at site document root (or configure any other using options). Now you can place any php templates here and render them individually:

Non-sawed layout can be used this way:

  1. open template's header.php and write only this

  2. at template's footer.php write:

After this, Beatrix will search .tpl/layout/{templateName} as layout template.

But you can change layout at runtime from anywhere, just calling:

! Any layout template MUST contain $this->section('content') call !

Sections

Inside of any particular template you can create or rewrite existing named section to print at layout later:

If contents is string it will be written as section output, that can be overwritten later if you want.

If contents is callback, it will be executed at section rendering moment inside of layout template. It is useful when some heavy rendering logic may become useless for some reason later, and this section will be omitted without overhead.

Slim instance running

Beatrix uses Slim app instance with some tunings under the hood, to keep all settings, common container features and fields.

We also have all routing power of Slim. It allows to handle any non-static site part with no more /urlrewrite.php!

Put .htaccess in desired site subdirectory, i.e. /company/news:

Then inside index.php (leave Bitrix file header & footer)

All routing features (get/post/etc, grouping, regexp in conditions) available in docs.

Database and infoblocks

See readme for iblocks (src/iblock/README.md) for details

Helper functions

is_ajax() does current http request sent by AJAX. Useful in Bitrix templates conditions (set in PHP condition of empty template, to render "plain" app response).

slimUrl() url to named route with path params + query params appending support

And finally, all Illuminate/Support sweet helpers (array_pluck, str_finish etc).

RSS builder bundled

Instead of generic component you can emit RSS data using this library

Is it all for now?

Yes, for now, but in perspective or alpha development:

Also, some subsplit modules (not spooky Bitrix modules!) in draft:


All versions of beatrix with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
slim/slim Version 2.*
illuminate/support Version 4.1.*
symfony/console Version 2.7.*
league/plates Version 3.*
league/url Version 3.*
symfony/finder Version 2.*
intervention/image Version 2.2.*
siriusphp/validation Version 2.1.*
suin/php-rss-writer Version 1.*
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 velosipedist/beatrix contains the following files

Loading the files please wait ....