Download the PHP package akawalko/zfext without Composer

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

ZFExt

ZFExt is a library extending components of the Zend Framework 1.12. I have several projects build on top of ZF1, so I decided to share my tips and tricks with you.

ZFExt_Db_Table

This class is derived from Zend_Db_Table. It provide clean, almost transparent cache layer.

Usage

First we have to create class that inherits from ZFExt_Db_Table. Here we declare two standard methods, get() & getAll(), which will fetch record from database table called users by ID and fetch all records respectively. By passing argument called $useCache we can control when retrieve data from the database and when from the buffer.

Now we can initialize our class and fetch some data form database.

Using $userModel->getAll () fetch all active users and saves the results in buffer under the identifier:

Available methods

Brief description of the methods

setCache() Sets or overrides the cache object. Method is used internally by the constructor, if we passed an associative array with the index named cache as in the example above.

getCache() Returns the cache object.

setOptions() Sets or overrides options. Method is used internally by the constructor, if we passed an associative array.

createCacheId() Generate descriptive cache ID based on two arguments. Method is used internally by methods loadOne() & loadAll(). $methodName is pretty self-explanatory. It is also mandatory. Second argument called $methodArguments is an array of values that will be used during the execution of the query.

removeByPartialId() Removes cache entry by partial ID. It's useful to remove entries from specific model class without removing all entries.

loadOne() & loadAll() are only the proxy methods, providing an intuitive API (first 3 arguments are the same as in the methods fetchRow () & fetchAll () in class Zend_Db_Adapter. They internally use method _loadFromCacheIfPossible().

Let's look at the argment list. $sql may be raw SQL query or Zend_Db_Select object. $bind is an array of values that will be used during the execution of the query. It is best when the parameters are named, because it will be used to generate descriptive cache ID. For the same reason, the last argument, $calleeMethodName is the name of the function that uses the loadOne () / loadAll () to fech data. $fetchMode controls the way in which the Zend_Db returns query results. Specify the fetch mode using Zend_Db class constants FETCH_ASSOC, FETCH_NUM, FETCH_BOTH, FETCH_COLUMN, and FETCH_OBJ. To learn more, see the online documentation for Zend, chapter Zend_Db_Statement. $useCache is boolean flag that control when retrieve data from the database and when from the buffer.

_loadFromCacheIfPossible() Used internally by methods loadOne() & loadAll(). It takes two arguments. $fetchMethod is a string which may take 2 values: fetchRow, fetchAll respectively. They are the names of methods from class Zend_Db_Adapter that will be used to retrieve data from database (in case no data found in buffer). $args is an array containing all arguments passed to methods loadOne() & loadAll().


All versions of zfext with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
zf1/zend-db Version 1.12.6
zf1/zend-cache Version 1.12.6
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 akawalko/zfext contains the following files

Loading the files please wait ....