Download the PHP package openbuildings/jam-freezable without Composer

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

Freezable Behavior

Build Status Scrutinizer Quality Score Code Coverage Latest Stable Version

Freezable is a Jam ORM behavior for freezing dynamically computed values in the database.


Often one would have a method in the model which computes and returns a value. It could be a price, time or anything else. The computation could be a heavy one or time sensitive (based on time, currency exchange rates and other). Then you would need to save the value in a database column (a.k.a freezing) and in the future read the value from the field rather than the method.

The Freezable behavior allows you to do exactly that in an easy way. The freeze(), unfreeze() and is_frozen() methos give you the convenience to easily get either the dynamically computed or the frozen value when needed.

Usage

It has 3 parameters associations, parent and fields

That means that whenever the model is frozen then the field named price will be assigned the value of the method price(). And all the associations will be also frozen. The associations themselves have to be freezable (have the Freezable behavior attached) in order for this to work. And the price() method, as well as any other fields, have to take into account the value of the field. E.g.

The parent association is used in order to find the value of is_frozen, so that only one model holds the value of the flag. So that if you call is_frozen() on a freezable that has a parent, then it will get that value from the parent.

Details

TODO: add note about validation TODO: add more examples

License

Copyright (c) 2013 OpenBuildings, Inc. Developed by Ivan Kerin as part of clippings.com.

Under BSD-3-Clause license, read LICENSE file.


All versions of jam-freezable with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
composer/installers Version *
openbuildings/jam Version 0.4.*
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 openbuildings/jam-freezable contains the following files

Loading the files please wait ....