PHP Classes

Yii2 Active Record Explicit: Provide explicit behaviors to Yii2 ActiveRecord

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 20 All time: 11,291 This week: 455Up
Version License PHP version Categories
yii2-active-record-e 1.0MIT/X Consortium ...5PHP 5, Databases, Libraries, Data types, D...
Description 

Author

The package can provide explicit behaviors to Yii2 ActiveRecord.

It provides class extensions to the Yii2 framework ActiveRecord base classes to provide new behaviors using additional behavior implementation classes.

Currently, it implements behavior classes to:

- Make certain model attributes read-only so they cannot be changed

- Make an attribute be handled like a timestamp

- Add support for type-casting attributes

Innovation Award
PHP Programming Innovation award nominee
June 2023
Number 6
ActiveRecord is a common design pattern many software applications use to map objects containing the information of entities that the applications need to manipulate into database records.

There are ActiveRecord implementations in many programming languages that use different frameworks.

The package extends the ActiveRecord implementation of the PHP Yii2 framework to implement more explicit behaviors useful for many applications, such as specifying read-only attributes, timestamp attributes, and type casting.

Manuel Lemos
Picture of Smoren  Freelight
  Performance   Level  
Name: Smoren Freelight <contact>
Classes: 38 packages by
Country: Russian Federation Russian Federation
Age: 35
All time rank: 280778 in Russian Federation Russian Federation
Week rank: 10 Up1 in Russian Federation Russian Federation Up
Innovation award
Innovation award
Nominee: 16x

Details

yii2-active-record-explicit

Extended and more explicit behavior for ActiveRecord classes for Yii2

How to install to Yii2 project

composer require smoren/yii2-active-record-explicit

  Files folder image Files (34)  
File Role Description
Files folder imagesrc (10 directories)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (34)  /  src  
File Role Description
Files folder imagebehaviors (3 files)
Files folder imagecomponents (7 files)
Files folder imageexceptions (4 files)
Files folder imageforms (2 files)
Files folder imagehelpers (1 file)
Files folder imageinterfaces (3 files)
Files folder imagemodels (4 files)
Files folder imagerepository (3 files)
Files folder imagetraits (1 file)
Files folder imagewrappers (3 files)

  Files folder image Files (34)  /  src  /  behaviors  
File Role Description
  Plain text file AttributeTypecastBehavior.php Class Class source
  Plain text file ReadonlyBehavior.php Class Class source
  Plain text file TimestampBehavior.php Class Class source

  Files folder image Files (34)  /  src  /  components  
File Role Description
  Plain text file ActiveDataProvider.php Class Class source
  Plain text file ActiveRecordFieldAccessor.php Class Class source
  Plain text file ActiveRecordGenerator.php Class Class source
  Plain text file ActiveRecordQueueGenerator.php Class Class source
  Plain text file NestedPDO.php Class Class source
  Plain text file NestedTransactionManager.php Class Class source
  Plain text file TransactionManager.php Class Class source

  Files folder image Files (34)  /  src  /  exceptions  
File Role Description
  Plain text file AccessorException.php Class Class source
  Plain text file DbConnectionManagerException.php Class Class source
  Plain text file DbException.php Class Class source
  Plain text file TransactionLogicException.php Class Class source

  Files folder image Files (34)  /  src  /  forms  
File Role Description
  Plain text file CollectionForm.php Class Class source
  Plain text file ItemForm.php Class Class source

  Files folder image Files (34)  /  src  /  helpers  
File Role Description
  Plain text file FormValidator.php Class Class source

  Files folder image Files (34)  /  src  /  interfaces  
File Role Description
  Plain text file DbConnectionManagerInterface.php Class Class source
  Plain text file DbRepositoryInterface.php Class Class source
  Plain text file RepositoryInterface.php Class Class source

  Files folder image Files (34)  /  src  /  models  
File Role Description
  Plain text file ActiveQuery.php Class Class source
  Plain text file ActiveRecord.php Class Class source
  Plain text file Migration.php Class Class source
  Plain text file Model.php Class Class source

  Files folder image Files (34)  /  src  /  repository  
File Role Description
  Plain text file DbConnectionManager.php Class Class source
  Plain text file DbRepository.php Class Class source
  Plain text file TransactionalDbRepository.php Class Class source

  Files folder image Files (34)  /  src  /  traits  
File Role Description
  Plain text file ActiveRecordTransactionalTrait.php Class Class source

  Files folder image Files (34)  /  src  /  wrappers  
File Role Description
  Plain text file ActiveRecordWrapper.php Class Class source
  Plain text file BaseWrapper.php Class Class source
  Plain text file WrappableInterface.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:20
This week:0
All time:11,291
This week:455Up