Download the PHP package alphazento/zento without Composer

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

Introduction

This is a package to provide a solution of modularity your Laravel project with Laravel framework.

It includes three sub-packages: Kernel, ThemeManager, UrlRewriter. These three packages only "Kernel" is mandatory enabled, UrlRewriter and ThemeManager you can enable or disable it base on your project requirement.

Kernel Package

Kernel package extends package management feature to Laravel project by just configuring some key concepts such as Provider, Middleware, Middleware Group, Command Line, Route, Theme package, Listener.

It provides a folder mypackages as private package codebase, you can create your private package in this folder by using artisan make:package.

And this package also provides some useful features: 1) Config system which can connect to DB(or you can define your config extension) 2) Dynamic Attribute, Event and Sequence Listeners.

By running command to enable this package:

ThemeManager

By running command to enable this package:

UrlRewriter

UrlRewriter provides a URL rewrite management for Laravel. You can connect a static URL to your Laravel route.

When the package is enabled, it will create a new table 'url_rewrite_rules' where you can manage your url rewrites.

By running command to enable this package:

Installation

Please install it via composer:

I. Package Development

Alphazento/Zento extends Laravel Package Discover and also provides a new "mypackage" folder in project root path. This folder will also be discovered by "package:discover" and you can put your private code base in here.

Package Discover

This package extends Laravel Package Discovery feature by adding "zento" section to "extra"->"laravel" section of your package's composer.json file. A classic Zento package you would like to config:

MyPackage Folder Structure

You can create your package by running command:

Then it will pre-create a folder in the path: projectroot/mypackages/VendorName/PackageName

II. Usage

1 Command Lines

This package extends some command lines:

1) make:package

2) package:enable

It will register the package to the system, so it's provider, middleware, middlewaregroup, command lines and event listeners will be registered, then you can use these resources.

If a Zento package is not registered, those resource(list above) will not able to be used. But of cause, you still can use it's classes.

2) package:disable

Disable package.(but it's classes still can be used.

3) package:discover

This command line is provide from original Laravel, but we extend it to discover the packages that you created in mypackages. And it also merge and cache configuration items in your package's composer.json file.

4) listeners

Zento Kernel has extended original Laravel Event/Listener. Original Laravel Event's Listener doesnpt support control listener call Sequence, but many time your listener must be called by a special Sequence. By running the command:

It will list your package listening to events and these listeners calling Sequence.

2. Extends Features

1). Dynamic Attribute

Zento Kernel package bring dynamic Attribute feature to Eloqument. You can easily extends attributes to an exist eloqument without change model's database table.

Dynamic Attribute has two types:

single

attribute only has a value

option

attribe has multiple option values.

Create a dynamic Attribute for a model

DanamicAttributeFactory::createRelationShipORM($modelClassName, $dynamicAttributeName, $optionArray, $isSingleOrOptions)

By calling this function, it will generate a dynamic Attribute table for the model. DanamicAttributeFactory::createRelationShipORM(\namespace\class::class, 'attribute', ['char', 32], true);

Extend withDynamicSingleAttribute and withDynamicOptionAttribute to retrieve dynamic attribute

You can use withDynamicSingleAttribute(single), or withDynamicOptionAttribute(option) $collection = \Zento\Kernel\TestModel::where('id', 1)->withDynamicSingleAttribute('new_column')->first();

listDynamicAttributes

This function will list all dynamic attributes for an exists model

How to use it

If you want your Eloquemnt Model has ability of dynamic Attributes, you may do so using the Zento\Kernel\Booster\Database\Eloquent\DynamicAttribute\DynamicAttributeAbility trait. This trait is imported by default on hasOneDyn, hasManyDyns functions and they work with Zento\Kernel\Booster\Database\Eloquent\DynamicAttribute\Builder to provide withDynamicSingleAttribute and withDynamicOptionAttribute:

2). Config extends

Zento\Kernel package extends the original Laravel config feature. The original config only load config from config's folder. With this extends, we create a "config_items" table in the database, and "Zento\Kernel\Booster\Config\ConfigInDB\ConfigRepository" as the default database config repository.

When try to get a config value, it will try to use default config(which get from config folder), if there's not configuration item then it will try to get from the table.

It also provides an interface for you to customize the config repository. That means you can define your own config logic instead of the default one which store in the database.

You can define yourself config repository in config/zento.php

extra_repository is your own config repository grouping_provider by providing this you will be able support different segment config groups.

3). Event And Sequence Listener

Laravel provides a very good event and listener system. But for an event it's listeners are called base on when the listener is registered to the system. If a package are registered early and the listener maybe called earlier.

alphazento/zento extends Laravel Event and Listener, you just need to configure your listener in your composer.json, and each listener with it's sequence defined, then these listener will be called by your defined sequence.

If a package defined a listener for an event "EVENT-CLASS-NAME":

And another package defined a listener for the same event "EVENT-CLASS-NAME":

Then the call sequence will be: OBSERVER-CLASS-NAME2, OBSERVER-CLASS-NAME1

Base Event Class and Base Listener Class

Zento\Kernel\Booster\Events\BaseEvent Zento\Kernel\Booster\Events\BaseListener

Please extends these base classes that we will gather the event will be handled by which listeners and their call sequence details.

    // DanamicAttributeFactory::createRelationShipORM(\Zento\Kernel\Booster\Config\ConfigInDB\ORMModel\ConfigItem::class, 
    //     'tcol', ['char', 32], true);
    // // $collection = DanamicAttributeFactory::withDynamicSingleAttribute(\Zento\Kernel\Booster\Config\ConfigInDB\ORMModel\ConfigItem::where('key', 'test'),
    // //     'new_column')->get();
    // DanamicAttributeFactory::createRelationShipORM(\Zento\Kernel\TestModel::class, 
    //     'new_column', ['char', 32], true);
    // DanamicAttributeFactory::createRelationShipORM(\Zento\Kernel\TestModel::class, 
    //     'new_column1', ['char', 32], false);

    // \Zento\Kernel\TestModel::listDynamicAttributes();
    // $collection = \Zento\Kernel\TestModel::where('id', 1)->withDynamicSingleAttribute('new_column')->withDynamicOptionAttribute('new_column1')->first();
    // // $collection = \Zento\Kernel\TestModel::where('id', 2)->withDynamicSingleAttribute('new_column')->first();
    // // echo '<pre>';
    // DanamicAttributeFactory::single($collection, 'new_column')->new('OKOK');
    // DanamicAttributeFactory::option($collection, 'new_column1')->new('this is a test');
    // DanamicAttributeFactory::option($collection, 'new_column1')->setValues(['this is a test', 'newvalue']);

    // $collection = \Zento\Kernel\TestModel::where('id', 1)->withDynamicOptionAttributeet()->first();
    // var_dump($collection->attributesets->attributes);die;

All versions of zento with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
mobiledetect/mobiledetectlib Version ^2.8
jaybizzle/crawler-detect Version ^1.2
illuminate/routing Version 5.7.x|5.8.x|6.0.x|7.x.x
illuminate/session Version 5.7.x|5.8.x|6.0.x|7.x.x
illuminate/support Version 5.7.x|5.8.x|6.0.x|7.x.x
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 alphazento/zento contains the following files

Loading the files please wait ....