Torpor (PHP)
Encyclopedia
Torpor is free, open source (under the MIT License
) Object-relational mapping
framework for PHP 5.1 and above. It is written entirely in PHP with limited reliance on standard XML extensions (and selected databases) and is independent of (and aims to be compatible with) any other PHP frameworks.
PHP CRUD operations, specifically the management of related object factories
, collections, and useful patterns such as object state maintenance for just-in-time fetch and publish.
Using a plug-in architecture for the management of DataStore and intermediate read- and write- through Cache allows for easy extension to support additional repository types in ways best suited to each.
MIT License
The MIT License is a free software license originating at the Massachusetts Institute of Technology . It is a permissive license, meaning that it permits reuse within proprietary software provided all copies of the licensed software include a copy of the MIT License terms...
) Object-relational mapping
Object-relational mapping
Object-relational mapping in computer software is a programming technique for converting data between incompatible type systems in object-oriented programming languages. This creates, in effect, a "virtual object database" that can be used from within the programming language...
framework for PHP 5.1 and above. It is written entirely in PHP with limited reliance on standard XML extensions (and selected databases) and is independent of (and aims to be compatible with) any other PHP frameworks.
History
Torpor was started as an independent project in July 2009 and reached its first major release (1.0) on October 31 2009. It was originally created to automate the tedium of Object OrientedObject-oriented programming
Object-oriented programming is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction,...
PHP CRUD operations, specifically the management of related object factories
Factory method pattern
The factory method pattern is an object-oriented design pattern to implement the concept of factories. Like other creational patterns, it deals with the problem of creating objects without specifying the exact class of object that will be created.The creation of an object often requires complex...
, collections, and useful patterns such as object state maintenance for just-in-time fetch and publish.
Concepts
Torpor uses an XML configuration file to control its features and options as well as describe the layout and relationships of the underlying repository. A generic "Grid" object type is used to represent any table (using database terminology) record instance, dynamically adapted to the contained Columns and relationship to other Grid types. This differs from many other PHP ORM implementations in that it does not generate any code, though it can be configured to represent different Grid types as dynamically-constructed classes (or as user-defined classes extending the base Grid class). This allows for central control and maintenance of all operations and adaptation to repository design changes.Using a plug-in architecture for the management of DataStore and intermediate read- and write- through Cache allows for easy extension to support additional repository types in ways best suited to each.
External links
- Torpor Project Page at Google CodeGoogle CodeGoogle Code is Google's site for developer tools, APIs and technical resources. The site contains documentation on using Google developer tools and APIs—including discussion groups and blogs for developers using Google's developer products....
- Usage Guide
- Developer Blog