Download the PHP package danog/magicalserializer without Composer

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

MagicalSerializer

Licensed under AGLPV3, created by Daniil Gentili (https://daniil.it).

This library allows you to serialize classes that extend pthreads's Volatile or Threaded classes, or any other internal class with a custom serializer.

It also provides reverse and forward compatibility between old serializations, where your objects do not yet extend Threaded/Volatile, and new serializations, where they do extend them.

Install it using composer, the package name is danog/magicalserializer.

Usage of this library is extremely simple, here are a few examples (see a.php and b.php for more):

As you can see, here a does not extend any class, and we are serializing an instance of it to the file test. This example also prints Constructed!, since the constructor function, __magic_construct, is called.

Here we must simply include the trait \danog\Serializable to make the class serializable.
This will deserialize correctly the contents of test, recreating the instance of a, with the only difference that now it will be thread safe.
Of course, the wakeup function will be called, so pony will be printed.
You may have noticed that the construct function is now called __magic_construct instead of __construct: this is a required change, or else this library will not work.
Of course, when a will be instantiated, the constructor function will be called anyway (and you'll see the message Constructed! pop up).

If you try to serialize (using \danog\Serialization::serialize) either $a or $othera and deserialize it from the first script (where a does not extend any other class), you will find that it will be deserialized correctly.


All versions of magicalserializer with dependencies

PHP Build Version
Package Version
No informations.
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 danog/magicalserializer contains the following files

Loading the files please wait ....