Download the PHP package formula21/php-core without Composer

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

Introduction

As a project PHP-Core is a package which includes the most needed functionalities to be used and extended by other APIs. These core features can be used form time to time, so as to make the execution of a problem easier. The library contains many exciting features, and is made in such a way enabling it to be extended by other developers from core.

Features:

  1. A HTTP Headers library
    • [X] Response Headers and API
      • Full legacy cache (with ETAG and Expires) Headers.
      • Easy to implement API Runner.
    • [ ] Request Headers and API
      • [X] Decoding and Re-sending same ETAG and Expires Header from If-None-Match.
    • [X] Request & Response Interfaces & Abstract Classes help other HTTP Responses to be implemented.
    • [X] Closely interlaced Response Codes, with Response Constants.
  2. Filesystem Library:
    • [X] Platform Independent Build.
    • [X] A Base Interface to extend features, and is the parent interface of all components. It is recommended for a developer to do this the same way. For eg:
    • [X] Contains three components:
      • Directory System a.k.a Directory
      • A DirectoryInterface defines the methods and its documentation to include a directory.
      • All basic functions (limited to the permission set by the OS) can be performed on any resource within the directory.
      • We can even write a stream or file, at any path relative to a directory, at a non existent path, which will be made by the code itself. Appropriate fallbacks are also there.
      • Stream System a.k.a Stream
      • A StreamInterface defines a stream which is basically a handler in the memory to temporarily store data.
      • A Stream can be written to a directory, while a file can be converted to a stream from it's path.
      • A Stream may act like a pseudo-file whenever required (i.e. it may or may not have a path, but contains all properties of the FileInterface )
      • File System a.k.a File
      • A FileInterface defines a file, which I think need not be explained.
      • Well a File and Stream are interconvertible, while both can be written to a directory.
    • [X] All components are wrapped by an interface, FilesystemInterface.
    • [X] A Stream can be only be considered a file if it at least has a filename or extension or both.
    • [X] Timestamps are auto calculated and are as follows:
      • Last Modified Timestamp
      • Last Accessed Timestamp
      • Created Timestamp
    • [X] Mime is auto-detected based on battle-tested ralouphie\mimey.
    • [X] Content Length is also auto calculated.
    • [X] Exceptions:
      • All exceptions of DirectoryInterface are wrapped under DirectoryException, except InvalidArgumentException.

      • All exception of FileInterface and StreamInterface are wrapped under FileException and StreamException respectively, except for InvalidArgumentException.
      • [X] Hash:
      • [ ] Hashing a directory
      • [X] Hashing a file and/or a stream.
        • Hashes are of two categories:
          1. Hashing the file (or resource). [Stream are only implemented if they have a file path, filename or file extension]
            • hash_file
            • hash_hmac_file
          2. Hashing the contents of file (or resource).
            • hash
            • hash_hmac
          3. Hashes for an instance are IMMUTABLE, unless otherwise a LOCK_EX is obtained on the said resource. If there aren't any locks (by default), then the hash won't change even if the content changes. However such check can be done, post implementation.

      • [X] Size:
        • [ ] Size of a directory.
        • [X] Size of a file & stream are calculated and immutable.

          NOTE: Because PHP's integer type is signed and many platforms use 32bit integers, some filesystem functions may return unexpected results for files which are larger than 2GB.

  3. Utility:

    • Argument Utility:

      The class wraps up most magic methods available in PHP. It helps us to define unknown properties, wherever required and later getting them. Other extensive features can be done.

      • To get the properties defined into the class:
    • Browser Utility:
      • All browser related functions.
    • Util Class:
      • Removing the single query parameter from the url.
      • Combing all query parameter to a url.
      • SantizePath - Sanitizes the path to a resource by removing invalid and excess characters.
      • makePath - Makes a path
      • makeURL - Makes a URL.
      • trim - Implements the trim PHP native function, but the 2nd parameter can be any numbers of characters.
      • makeDirectory - Makes a directory.
      • makeDateTime - Makes a proper datetime instance from a datetime
      • rmdir - Removes the directory and it's contents recursively. The native rmdir does not work on non-empty directories. Has a fallback if any exception occurs.
      • random_bytes: If you are missing random_bytes or openssl_random_bytes, we use this one.
  4. A Database System (Abstraction Layer)
    • It is a library that implements an abstraction layer over the PDO extension, by providing a powerful query builder along with an easy to use schema builder. The aim of the library is to provide an unified way of interacting with databases, no matter of the underlying relational database management system.
    • Currently, we are officially supporting MySQL, PostgreSQL, Microsoft SQL, and SQLite. We also provide experimental support - without any commitment regarding bug fixes and updates - for Firebird, IBM DB2, Oracle, and NuoDB query builder.
    • A DOCUMENTATION WILL SOON FOLLOW
  5. Image Manipulation System:
    • The system is described in detail below as "I.M.S".

IMS ~ Image Manipulation System

To manipulate images we use the many features from the popular library Leauge\Glide, however improving several tiny bits which gives the project a makeover. We forward our thanks to the battle tested library Intervention\Image.

Extra documentation to follow soon

Installation:

If you have composer in your system and the location of the same in the %PATH% variable, then you can continue with the lower block.

OR, You can always use php CLI and composer.phar, to execute all composer commands in the CLI.

Then,

Please check all packages & repositories are extracted from the archive and installed correctly. Raise an issue if there is an error.

That hopefully installs the latest version of php-core as vendor for your project.

Manipulate it?

If you want to manipulate images place in the directory at path/to/dir/of/images (Can be both full or relative path), you can use our manipulation parameter according to the documentation. You can now see how we manipulate images in examples\image.php file.

Extending the Options

The options as stated above are just limited as is my imagination. You can freely expand the project as you like. Some extensions include:

  1. Using Imagick as a driver, the user could extend this to document manipulation, like PDF "preview" generation, and post manipulation, with cache to store the same for further use.

  2. Manipulations can be done on Cascading Stylesheet CSS and JavaScript JS, files like minifying them, getting Sub-Resource Integrity, Caching, etc.

  3. Manipulations of multi-media files, likes generating a preview image, thumbnails [based on the n-th second cut] for video files, caching sections of both video and audio files, bytes implementation etc.

  4. Manipulations and assembling of Documents, Spreadsheets, Presentations, and other popular file types can be added.

In short:

License

The project is licensed with the MIT License. A copy of the license must be attached with repository. The license is evaluated below:


All versions of php-core with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
intervention/image Version ^2.7.1
ralouphie/mimey Version ^2.1.0
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 formula21/php-core contains the following files

Loading the files please wait ....