QuidPHP/Main is a PHP library that provides a set of base objects and collections that can be extended to build something more specific.

Related tags

Miscellaneous main
Overview

QuidPHP/Main

Release License PHP Version Style CI Code Size

About

QuidPHP/Main is a PHP library that provides a set of base objects and collections that can be extended to build something more specific. It is part of the QuidPHP package and can also be used standalone.

License

QuidPHP/Main is available as an open-source software under the MIT license.

Documentation

QuidPHP/Main documentation is available at QuidPHP/Docs.

Installation

QuidPHP/Main can be easily installed with Composer. It is available on Packagist.

$ composer require quidphp/main

Once installed, the Quid\Main namespace will be available within your PHP application.

Requirement

QuidPHP/Main requires the following:

Dependency

QuidPHP/Main has the following dependency:

  • quidphp/base - Quid\Base - PHP library that provides a set of low-level static methods

The dependency will be resolved by using the Composer installation process.

Comment

QuidPHP/Main code is commented and all methods are explained (in French).

Convention

QuidPHP/Main is built on the following conventions:

  • Coding: No curly braces are used in a IF statement if the condition can be resolved in only one statement.
  • Config: A special $config static property exists in all classes. This property gets recursively merged with the parents' property on initialization.
  • Dynamic: Classes are dynamic and objects need to be instantiated, very few static methods
  • Interfaces: Interfaces are stored within the Contract subdirectory.
  • Traits: Traits filenames start with an underscore (_).
  • Type: Files, function arguments and return types are strict typed.

Overview

QuidPHP/Main contains 118 classes, traits and interfaces. Here is an overview:

  • ArrMap - Abstract class that provides base methods to make a collection
  • ArrObj - Abstract class that implements the methods necessary for the ArrayAccess, Countable and Iterator interfaces
  • Arrs - Class for a collection containing a multidimensional array
  • Autoload - Class that provides custom autoloading logic, including alias autoloading and class within closures
  • Calendar - Class that provides logic for the calendar widget
  • Cart - Class used to to manage a cart containing different items
  • CatchableException - Class for a catchable exception
  • Com - Class that provides the logic to store positive, negative or neutral communication messages
  • Concatenator - Class used to concatenate the content of many files or directories
  • Contract
    • Cache - Interface to detail the methods required for implementing caching functionality to an object
    • Catchable - Interface to mark an exception as catchable
    • Email - Interface to describe methods of an objet containing an email
    • FileStorage - Interface to describe a file objet which has a defined storage folder
    • Hierarchy - Interface to describe the methods required to access the hierarchy of an objet
    • Import - Interface to precise the methods required for being able to import and export to an objet
    • Log - Interface to detail the methods required for implementing logging functionality to an object
    • Meta - Interface to describe methods making an objet a source of meta-data
    • Queue - Interface to detail the methods required for implementing queuing functionality to an object
    • Session - Interface to detail the methods required for an objet to be a session storage
  • Error - Class used as a basic error handler
  • Exception - Class for a default exception
  • Extender - Class for a collection containing a list of classes extending others
  • Extenders - Class for a collection containing many extender objects
  • File - Class for a basic file object
    • Audio - Class for an audio file (like mp3)
    • Binary - Abstract class for a binary file
    • Cache - Class for a cache storage file
    • Calendar - Class for a calendar file (like ics)
    • Css - Class for a css or scss file
    • Csv - Class for a csv file
    • Doc - Class for a doc file, like microsoft word
    • Dump - Class for file which contains an exported value (similar to var_export)
    • Email - Class for a file which is an email (in json format)
    • Error - Class for an error storage file
    • Font - Class for a font file (like ttf)
    • Html - Class for an html file
    • Image - Abstract class for an image file (raster or vector)
    • ImageRaster - Class for a pixelated image file
    • ImageVector - Class for a vector image file (like svg)
    • Js - Class for a js file
    • Json - Class for a json file
    • Log - Class for a log storage file
    • Pdf - Class for pdf file
    • Php - Class for a php file
    • Queue - Class for a queue storage file
    • Serialize - Class for a file with content that should be serialized
    • Session - Class for a session storage file, which is serialized
    • Text - Abstract class for a text file
    • Txt - Class for txt file (like txt)
    • Video - Class for a video file (like mp4)
    • Xml - Class for an xml file
    • Zip - Class for a zip file
    • _concatenate - Trait with methods to concatenate files and directories
    • _log - Trait that grants methods to allow a file object to do logging
    • _storage - Trait that provides methods to link a file object to a specific storage directory
  • Files - Class for a collection containing many file objects
  • Flash - Class for a collection containing flash-like data (delete on read)
  • Importer - Class providing the logic to export data from an objet and importing into another one
  • Insensitive - Class for a collection containing an insensitive array
  • Insert - Class for a collection containing an insert-only array (cannot update)
  • Lang - Class for a collection object containing language texts and translations
    • En - English language content used by this namespace
    • Fr - French language content used by this namespace
    • _overload - Trait which implements the overload logic for the lang classes
  • Localization - Class for storing localization data, like latitude and longitude
  • Map - Class that provides a set of methods for a collection
    • _arr - Trait that provides methods to allow advanced unidimensional array manipulation to a collection
    • _arrs - Trait that provides methods to allow advanced multidimensional array manipulation to a collection
    • _basic - Trait that provides simple boolean methods to analyze the type of array within the collection
    • _classe - Trait that grants methods to work with a collection containing fully qualified class name strings
    • _classeObj - Trait that gives methods to work with a collection containing fqcn strings or objects
    • _cloner - Trait that provides a method to make sure the collection is cloned on every update
    • _count - Trait that provides a method to limit the length of a collection
    • _filter - Trait that provides a method to filter a collection by providing a condition or callback
    • _flash - Trait that grants methods for the collection to delete an entry once it has been retrieved
    • _insensitive - Trait that transforms the collection from case sensitive to insensitive
    • _map - Trait that provides a method to recursively change the entries (map) by providing a callback
    • _nav - Trait that provides methods to a collection in order to work with pagination
    • _obj - Trait that grants methods to work with a collection containing instantiated objects
    • _prepend - Trait that replaces methods to make the collection prepend per default (add at the beginning)
    • _readOnly - Trait that provides a simple readOnly lock to a collection
    • _reference - Trait that permits the collection to work from a reference array source
    • _sequential - Trait that makes sure the keys of the collection are always sequential
    • _sort - Trait that provides methods to change the order of entries within the collection
  • MapObj - Class for a collection containing objects
  • Request - Class with methods to manage an HTTP request
  • RequestHistory - Class for a collection containing an history of requests
  • Res - Class with methods to manage a resource
  • Response - Class with methods to manage an HTTP response
  • ResponseCurrent - Class for an object that acts as representation of current response
  • Role - Class that provides basic logic for a role
  • Roles - Class for a collection containing many roles
  • Root - Abstract class extended by all others
  • Service - Abstract class that provides basic methods to manage a third-party service
  • ServiceMailer - Abstract class with basic methods that needs to be extended by a mailing service
  • ServiceRequest - Abstract class with basic methods for a service that works with HTTP request
  • ServiceVideo - Abstract class with basic methods for a service that provides a video object after an HTTP request
  • Services - Class for a collection containing many service objects
  • Session - Class that implements the methods necessary for the SessionHandlerInterface interface
  • Std - Class for a collection with a complete set of methods
  • Timeout - Class for a collection containing timeout data (to deny an action if it already has happened too much)
  • Update - Class for a collection containing an update-only array (cannot insert after initialization)
  • Video - Class for an object representing a video with some meta-data
  • Widget - Abstract class that provides basic methods for a widget
  • Xml - Class that provides basic methods to make an XML sitemap
  • _arrObj - Trait that provides methods to respect the ArrayAccess, Countable and Iterator native interfaces
  • _attr - Trait that grants methods to work with the dynamic property attr
  • _attrPermission - Trait that provides methods to work with permissions in attr
  • _cache - Trait that provides methods to get or set a cached value from an object
  • _email - Trait that provides methods to use the object as an email
  • _inst - Trait that provides methods to store an instantiated objet within a static property
  • _log - Trait that provides a required method to allow logging with the object
  • _overload - Trait that allows a class to retrieve its overloaded version - higher up in the class hierarchy
  • _queue - Trait that provides methods required for implementing queuing functionality to an object
  • _root - Trait that provides basic object methods and magic methods
  • _rootClone - Trait that provides a default __clone magic function
  • _serialize - Trait that provides methods for serializing and unserializing object
  • _throw - Trait that provides static methods to throw exception from an object

Testing

QuidPHP/Main contains 34 test classes:

  • Arrs - Class for testing Quid\Main\Arrs
  • Autoload - Class for testing Quid\Main\Autoload
  • Calendar - Class for testing Quid\Main\Calendar
  • Cart - Class for testing Quid\Main\Cart
  • CatchableException - Class for testing Quid\Main\CatchableException
  • Com - Class for testing Quid\Main\Com
  • Concatenator - Class for testing Quid\Main\Concatenator
  • Error - Class for testing Quid\Main\Error
  • Exception - Class for testing Quid\Main\Exception
  • Extender - Class for testing Quid\Main\Extender
  • Extenders - Class for testing Quid\Main\Extenders
  • File - Class for testing Quid\Main\File
  • Files - Class for testing Quid\Main\Files
  • Flash - Class for testing Quid\Main\Flash
  • Importer - Class for testing Quid\Main\Importer
  • Insensitive - Class for testing Quid\Main\Insensitive
  • Insert - Class for testing Quid\Main\Insert
  • Lang - Class for testing Quid\Main\Lang
  • Localization - Class for testing Quid\Main\Localization
  • Map - Class for testing Quid\Main\Map
  • MapObj - Class for testing Quid\Main\MapObj
  • Request - Class for testing Quid\Main\Request
  • RequestHistory - Class for testing Quid\Main\RequestHistory
  • Res - Class for testing Quid\Main\Res
  • Response - Class for testing Quid\Main\Response
  • ResponseCurrent - Class for testing Quid\Main\ResponseCurrent
  • Role - Class for testing Quid\Main\Role
  • Roles - Class for testing Quid\Main\Roles
  • Session - Class for testing Quid\Main\Session
  • Std - Class for testing Quid\Main\Std
  • Timeout - Class for testing Quid\Main\Timeout
  • Update - Class for testing Quid\Main\Update
  • Video - Class for testing Quid\Main\Video
  • Xml - Class for testing Quid\Main\Xml

QuidPHP/Main testsuite can be run by creating a new QuidPHP/Assert project.

You might also like...
Creating data transfer objects with the power of php objects. No php attributes, no reflection api, and no other under the hook work.

Super Simple DTO Creating data transfer objects with the power of php objects. No php attributes, no reflection api, and no other under the hook work.

An object store for specific objects.

Object Storage A simple object storage class that will only allow "supported" objects. class MyObjectStorage extends Herrera\Util\ObjectStorage {

Provides an object-oriented API to query in-memory collections in a SQL-style.

POQ - PHP Object Query Install composer require alexandre-daubois/poq 1.0.0-beta2 That's it, ready to go! 🎉 Usage Here is the set of data we're going

Library download currency rate and save in database, It's designed to be extended by any available data source.

Library download currency rate and save in database, It's designed to be extended by any available data source.

A set of classes to create and manipulate HTML objects abstractions

HTMLObject HTMLObject is a set of classes to create and manipulate HTML objects abstractions. Static calls to the classes echo Element::p('text')-cla

php String Objects Chains like length,forEach,filter,replace,repalcAll much More.... Module

php String Objects Chains like length,forEach,filter,replace,repalcAll much More.... Module

Naive Bayes works by looking at a training set and making a guess based on that set.

Naive Bayes Naive Bayes works by looking at a training set and making a guess based on that set. It uses simple statistics and a bit of math to calcul

This plugin can be embedded in PHP application to give the web application specific routes/href

Routes Plugin PHP This plugin can be embedded in PHP application to give the web application specific routes/href location and for entering specific/l

Json-normalizer: Provides generic and vendor-specific normalizers for normalizing JSON documents

json-normalizer Provides generic and vendor-specific normalizers for normalizing JSON documents. Installation Run $ composer require ergebnis/json-nor

Releases(5.31.0)
Owner
QuidPHP
QuidPHP - A PHP framework
QuidPHP
JSONFinder - a library that can find json values in a mixed text or html documents, can filter and search the json tree, and converts php objects to json without 'ext-json' extension.

JSONFinder - a library that can find json values in a mixed text or html documents, can filter and search the json tree, and converts php objects to json without 'ext-json' extension.

Eboubaker Eboubaker 2 Jul 31, 2022
FFCMS 3 version core MVC architecture. Build-on use with ffcms main architecture builder.

FFCMS 3 version core MVC architecture. Build-on use with ffcms main architecture builder.

FFCMS 0 Feb 25, 2022
UpDown is an uptime monitor, We send out notifications when something's wrong.

About UpDown Updown is an uptime monitor, We send out notifications when something's wrong. Be the first to know that your website is down! Reliable m

Hussam Adil 4 May 8, 2022
Magento 2 module to automatically flush the cache whenever you save something in the System Configuration

Yireo AutoFlushCache Magento 2 module to automatically flush the cache whenever you save something in the System Configuration. Do NOT use this in pro

Yireo 21 May 14, 2022
A tidy conditional Blade directive for checking if something is in an array

A tidy conditional Blade directive for checking if something is in an array. This package provides a small @in directive that allows you to simplify i

Ryan Chandler 0 Oct 7, 2022
Deeper is a easy way to compare if 2 objects is equal based on values in these objects. This library is heavily inspired in Golang's reflect.DeepEqual().

Deeper Deeper is a easy way to compare if 2 objects is equal based on values in these objects. This library is heavily inspired in Golang's reflect.De

Joubert RedRat 4 Feb 12, 2022
[READ-ONLY] CakePHP Utility classes such as Inflector, Text, Hash, Security and Xml. This repo is a split of the main code that can be found in https://github.com/cakephp/cakephp

CakePHP Utility Classes This library provides a range of utility classes that are used throughout the CakePHP framework What's in the toolbox? Hash A

CakePHP 112 Feb 15, 2022
Dobren Dragojević 6 Jun 11, 2023
PHP library with basic objects and more for working with Facebook/Metas Conversions API

PHP library with basic objects and more for working with Facebook/Metas Conversions API Installation The easiest way to install this library is by ins

null 5 Dec 5, 2022
The Cache component provides an extended PSR-6 implementation for adding cache to your applications.

Symfony PSR-6 implementation for caching The Cache component provides an extended PSR-6 implementation for adding cache to your applications. It is de

Symfony 3.8k Jan 3, 2023