Download the PHP package mohamed-amine-sayagh/zec without Composer

On this page you can find all versions of the php package mohamed-amine-sayagh/zec. 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 zec

Zec: PHP Data Parsing Library

The Zec Data Parsing and schema declaration Library is designed to bring schema definition and validation capabilities to PHP applications.

Installation

Composer

Requirements

Usage Example

Here's an example of how to use the Zec library to define and validate a user profile schema:

Define a schema for user data validation

Parse user data and validate it

Expected Error Response

Current Version: v1.0.0, Release Date: 2024-10-01, Author: Mohamed Amine SAYAGH, Release Notes: Initial release of the Zec PHP Data Parsing Library., Release Link: [Zec 1.0.0](

Note: This library is currently in development. Official documentation and further resources will be available soon.

Author Information:

Table of Contents

Some other great aspects

Collaboration

We are fully open to collaboration! If you're interested in contributing to the PHP Data Parsing Library, we'd love to hear from you. Whether it's through code contributions, documentation improvements, or feature suggestions, your input is highly welcome.

How to Contribute

  1. Fork the Repository: Start by forking the repository to your own GitHub account.
  2. Clone Your Fork: Clone your fork to your local machine and set up the development environment.
  3. Create a New Branch: Make your changes in a new git branch.
  4. Commit Your Changes: Commit your modifications with clear and descriptive commit messages.
  5. Push Your Changes: Push your changes to your fork on GitHub.
  6. Submit a Pull Request: Open a pull request to the main branch of our repository. Please provide a clear description of the changes and any other information that will help us understand your contributions.

For more details, check our contribution guidelines (link to detailed contribution guidelines if available).

We look forward to building a powerful data parsing tool with a vibrant community of contributors!

Usage

Basic Parsing

Define and validate data types using simple schema definitions:

Validation

Quickly validate data after parsing:

Exception Handling with Parsing

Handle exceptions using parse_or_throw for critical data validation:

Parsing of an array of options

You can enhance the schema definition by incorporating additional validation options. This allows for more detailed control over data conformity based on specific requirements.

Advanced Parser Configuration

The library provides extensive Configurability for data validation, allowing users to define complex validation rules with custom messages and conditions. Below is an example of how to configure a detailed schema for an email field with specific validation rules:

Complex Example: User Data Validation

This example demonstrates validating a user data structure that includes nested arrays, optional fields, and union types, showcasing the library's capability to handle complex and realistic data models.

Creating Custom Parser Methods

To enhance flexibility and cater to specific validation needs, our library allows users to define custom parser methods. This section demonstrates how to create a size parser method, which validates that the size of an array, length of a string, or value of a number meets a specific requirement.

The size method checks if:

Here is how you can implement this custom parser:

You can now use the custom size parser method in your schema definitions:

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

MIT License

Copyright (c) 2024 Mohamed Amine SAYAGH

All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


All versions of zec with dependencies

PHP Build Version
Package Version
Requires php Version >=8
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 mohamed-amine-sayagh/zec contains the following files

Loading the files please wait ....