PHP Classes

How to Create a PHP Structure Class Using a Trait That Provides Setter and Getter Functions with the Package Struct: Trait that implements class getters and setters

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-08-03 (7 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 38 This week: 37All time: 10,919 This week: 1Up
Version License PHP version Categories
struct-trait 1.0MIT/X Consortium ...5Data types, Language
Description 

Author

This package provides a trait that implements class getters and setters.

The trait provides several __set, __get, __isset, and __unset functions that manage class variables using a private array variable to store the values of variables accessed by applications.

Developers may use this trait in classes to automatically provide class variable management.

This package also provides a Struct class that uses the trait and can be used in applications as a base class for structure data classes.

Picture of Chun-Sheng, Li
  Performance   Level  
Name: Chun-Sheng, Li <contact>
Classes: 36 packages by
Country: Taiwan Taiwan
Innovation award
Innovation award
Nominee: 16x

Winner: 1x

  Files folder image Files (14)  
File Role Description
Files folder imagesrc (1 directory)
Files folder imagetests (1 file, 1 directory)
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file .scrutinizer.yml Data Auxiliary data
Accessible without login Plain text file .styleci.yml Data Auxiliary data
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file build.xml Data Auxiliary data
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 phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (14)  /  src  
File Role Description
Files folder imageValueType (2 files, 1 directory)

  Files folder image Files (14)  /  src  /  ValueType  
File Role Description
Files folder imageException (1 file)
  Plain text file Struct.php Class Class source
  Plain text file StructTrait.php Class Class source

  Files folder image Files (14)  /  src  /  ValueType  /  Exception  
File Role Description
  Plain text file StructException.php Class Class source

  Files folder image Files (14)  /  tests  
File Role Description
Files folder imageStruct (1 file)
  Plain text file StructTest.php Class Class source

  Files folder image Files (14)  /  tests  /  Struct  
File Role Description
  Plain text file User.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:38
This week:37
All time:10,919
This week:1Up