{"id":18637974,"url":"https://github.com/imponeer/properties","last_synced_at":"2025-04-16T02:05:21.613Z","repository":{"id":13899870,"uuid":"75197214","full_name":"imponeer/properties","owner":"imponeer","description":"PHP library for handling strict type class variables (not yet working)","archived":false,"fork":false,"pushed_at":"2025-02-21T09:43:46.000Z","size":169,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-16T02:04:54.922Z","etag":null,"topics":["php-library","properties"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imponeer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-30T14:56:06.000Z","updated_at":"2025-02-21T09:43:48.000Z","dependencies_parsed_at":"2023-02-16T12:30:35.719Z","dependency_job_id":"c298d8e0-4e45-4943-8b61-729275f7d618","html_url":"https://github.com/imponeer/properties","commit_stats":{"total_commits":119,"total_committers":6,"mean_commits":"19.833333333333332","dds":"0.10924369747899154","last_synced_commit":"4017cba526564ef686702267800ebbc30cf81285"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imponeer%2Fproperties","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imponeer%2Fproperties/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imponeer%2Fproperties/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imponeer%2Fproperties/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imponeer","download_url":"https://codeload.github.com/imponeer/properties/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249183103,"owners_count":21226141,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php-library","properties"],"created_at":"2024-11-07T05:38:31.339Z","updated_at":"2025-04-16T02:05:21.594Z","avatar_url":"https://github.com/imponeer.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License](https://img.shields.io/github/license/imponeer/properties.svg?maxAge=2592000)](License.txt) [![GitHub release](https://img.shields.io/github/release/imponeer/properties.svg?maxAge=2592000)](https://github.com/imponeer/properties/releases) [![Build Status](https://travis-ci.org/imponeer/properties.svg?branch=master)](https://travis-ci.org/imponeer/properties) [![Packagist](https://img.shields.io/packagist/dm/imponeer/properties.svg)](https://packagist.org/packages/imponeer/properties) [![Maintainability](https://api.codeclimate.com/v1/badges/0555227870650dcaa3f2/maintainability)](https://codeclimate.com/github/imponeer/properties/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/0555227870650dcaa3f2/test_coverage)](https://codeclimate.com/github/imponeer/properties/test_coverage)\n\n# Properties\n\nPHP library for handling strict type class variables. This package can be used only for adding functionality for other classes.\n\n## Installation\n\n`composer require imponeer/properties`\n\n## Usage\n\nTo add some custom properties support to a class first you need to extend that class. Here is example how to do it:\n```php5\nuse Imponeer\\Properties;\n\nclass Base extends Properties {\n\n}\n```\nNext thing what you need is to define variables in class constructor. Here an example how to do:\n```php5\nuse Imponeer\\Properties;\n\nclass Base extends Properties {\n\n  public function __construct() {\n    $this-\u003einitVar('varA', self::DTYPE_INTEGER, null, false);\n    $this-\u003einitVar('varB', self::DTYPE_STRING, null, true, 150);\n    $this-\u003einitVar('varC', self::DTYPE_INTEGER, 100, false);\n  }\n}\n```\nThan is possible to use such vars. This would work for previous example in such way:\n```php5\n\n// Creates instance\n$obj = new Base();\n\n// Print current objects vars\nvar_dump($obj-\u003etoArray());\n\n// Modify vars with some integer values and prints\n$obj-\u003evarA = 57;\n$obj-\u003evarB = 58;\n$obj-\u003evarC = 59;\nvar_dump($obj-\u003etoArray());\n\n// Modify vars with some string values and prints\n$obj-\u003evarA = \"A\";\n$obj-\u003evarB = \"B\";\n$obj-\u003evarC = \"C\";\nvar_dump($obj-\u003etoArray());\n\n```\n\n## How to contribute?\n\nIf you want to add some functionality or fix bugs, you can fork, change and create pull request. If you not sure how this works, try[interactive GitHub tutorial](https://skills.github.com).\n\nIf you found any bug or have some questions, use [issues tab](https://github.com/imponeer/properties/issues) and write there your questions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimponeer%2Fproperties","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimponeer%2Fproperties","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimponeer%2Fproperties/lists"}