Download the PHP package almhdy/json-shelter without Composer

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

πŸ—„οΈ JsonShelter - Your Friendly PHP JSON Manager

Welcome to JsonShelter! This is a nifty PHP library designed to help you store and manage your JSON data with ease. Let's dive into the installation and usage instructions! πŸš€

Installation βš™οΈ

You can bring JsonShelter into your project using one of the methods below:

Method 1: Install via Composer 🎡

Use Composer to include the package seamlessly in your project:

Method 2: Clone the Repository πŸ₯³

Prefer to have a local copy? Clone the repository directly from GitHub:

Method 3: Download as Archive πŸ“¦

You can also download a release archive from GitHub. Simply visit the releases page and grab the latest version as a ZIP file. Extract it to your project directory.

Usage πŸ“–

Using JsonShelter in your project is easy-peasy! Include the class by using Composer or directly. Let’s walk through it!

Option 1: Using Composer πŸ₯‡

If you used Composer, just include the autoload file and get started! Here’s an example:

Option 2: Directly Including the File 🌟

If you cloned the repo or downloaded the archive, include the JsonShelter.php file directly. Adjust the path as needed!

Encryption πŸ›‘οΈ

You can easily enable or disable encryption for your records. This is a handy feature to keep your data secure!

Record Operations πŸ“‹

You can perform CRUD operations (Create, Read, Update, Delete) with the following methods:

Model Class

The Model class provides an ORM-like interface to interact with the JsonShelter class.

Initialization

First, initialize a Model for a specific table:

Inserting Data

Inserting data using the Model:

Reading Data

Reading all records:

Reading a specific record by ID:

Updating Data

Updating a record:

Deleting Data

Deleting a record:

Querying Data

Filtering records:

Searching within a field:

Ordering and limiting data:

JsonEncryptor Class

The JsonEncryptor class handles encryption and decryption of data.

Initialization

Initialize the JsonEncryptor class with a secret key and initialization vector:

Encrypting Data

Encrypting data:

Decrypting Data

Decrypting data:

Handling Large Datasets

Encrypting a large file using streams:

Decrypting a large file using streams:

Additional Methods Overview

Our database manager 🌈, now affectionately called "db," comes packed with handy extra methods πŸŽ‰ that make managing JSON files and checking their directory status a breeze! Let’s explore them.

Check Directory Status

Before diving into the JSON realm, make sure your directory is in tip-top shape! This method checks if it’s readable and writable:

Get Size and Permissions of JSON Files

Curious about your JSON files? This method gives you the lowdown on their size and permissions:

Set Best Permissions for JSON Files

Let’s tighten up security! This method automatically sets the best permissions for your JSON files:

Conclusion πŸŽ‰

And that's a wrap! 🎊 You've now unlocked the power of JsonShelter, making it super simple to integrate into your PHP applications! πŸš€ With just a few easy steps, you're ready to harness the power of file-based JSON data management, complete with encryption and ORM-like capabilities.

Remember, every line of code brings you closer to your goals. Embrace the journey and happy coding! πŸ˜„πŸ’»βœ¨


All versions of json-shelter with dependencies

PHP Build Version
Package Version
Requires psr/log Version ^3.0
monolog/monolog Version ^3.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 almhdy/json-shelter contains the following files

Loading the files please wait ....