Download the PHP package florianwolters/component-core-cloneable without Composer
On this page you can find all versions of the php package florianwolters/component-core-cloneable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download florianwolters/component-core-cloneable
More information about florianwolters/component-core-cloneable
Files in florianwolters/component-core-cloneable
Package component-core-cloneable
Short Description Allows and disallows the cloning of objects as a PHP component.
License LGPL-3.0+
Homepage http://github.com/FlorianWolters/PHP-Component-Core-Cloneable
Informations about the package component-core-cloneable
Component\Core\Cloneable
FlorianWolters\Component\Core\Cloneable is a simple-to-use PHP component that allows and disallows the cloning of objects.
Table of Contents (ToC)
- Introduction
- Features
- Requirements
- Usage
- Installation
- As A Dependency On Your Component
- Contributing
- Credits
- License
Introduction
This component is inspired by the the Java programming language.
FlorianWolters\Component\Core\Cloneable consists of six artifacts:
- The interface
__clone
method of a class that it is legal for that method to make a field-for-field copy of instances of that class. - The exception class
CloneableInterface
. - The trait
__clone
method of a class that it is illegal for that method to make a field-for-field copy of instances of that class. - The trait
__clone
method of a class that it is legal for that method to make a shallow field-for-field copy of instances of that class. - The trait
__clone
method of a class that it is legal for that method to make a deep field-for-field copy of instances of that class. - The static class
FlorianWolters\Component\Core\CloneUtils
: Offers operations to clone objects.
Features
- Disallows cloning via the magic method
__clone
by using the traitCloneNotSupportedException
is thrown. - Allows (type safe) cloning via the magic method
__clone
by implementing the interfaceDeepCloneTrait
to make a deep copy of an instance of the class. - Allows creating deep copies of any object via the method
copyDeep
of the classCloneUtils
. - Artifacts tested with both static and dynamic test procedures:
- Dynamic component tests (unit and integration tests) implemented with PHPUnit.
- Static code analysis performed using the following tools:
- PHP_CodeSniffer: Style Checker
- PHP Mess Detector (PHPMD): Code Analyzer
- PHP Depend: Code Metrics
- phpcpd: Copy/Paste Detector (CPD)
- phpdcd: Dead Code Detector (DCD)
- SensioLabs Security Checker: Security Checker
- Continuous Integration (CI) using the following web services:
- Provides a Packagist package which can be installed using the dependency manager Composer. Click here for the package on Packagist.
- Provides a complete Application Programming Interface (API) documentation generated with the documentation generator phpDocumentor. Click here for the API documentation.
-
Follows the following "standards" from the PHP Framework Interoperability Group (FIG). PSR stands for PHP Standards Recommendation:
-
PSR-0: Autoloading Standards
Aims to provide a standard file, class and namespace convention to allow plug-and-play code.
-
PSR-1: Basic Coding Standard
Aims to ensure a high level of technical interoperability between shared PHP code.
-
PSR-2: Coding Style Guide
Provides a Coding Style Guide for projects looking to standardize their code.
-
A more modern take on autoloading reflecting advances in the ecosystem.
-
- Follows the Semantic Versioning (SemVer) specification version 2.0.0.
Requirements
Production
Development
- PHPUnit
- phpcpd
- phpdcd
- PHP_CodeSniffer
- PHP Mess Detector (PHPMD)
- PDepend
- phpDocumentor
- SensioLabs Security Checker
- php-coveralls
Usage
The best documentation for FlorianWolters\Component\Core\Cloneable are the unit tests, which are shipped in the package.
Installation
FlorianWolters\Component\Core\Cloneable should be installed using the dependency manager Composer.
Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you.
The Composer installer can be downloaded with php
.
php -r "readfile('https://getcomposer.org/installer');" | php
This will just check a few PHP settings and then download
composer.phar
to your working directory. This file is the Composer binary. It is a PHAR (PHP archive), which is an archive format for PHP which can be run on the command line, amongst other things.To resolve and download dependencies, run the
install
command:
php composer.phar install
As A Dependency On Your Component
If you are creating a component that relies on FlorianWolters\Component\Core\Cloneable, please make sure that you add FlorianWolters\Component\Core\Cloneable to your component's composer.json
file:
Contributing
See CONTRIBUTING.md
.
Credits
License
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://gnu.org/licenses/lgpl.txt.
"PHP: Hypertext Preprocessor"
"Composer"
"Packagist"
"Semantic Versioning"
"FlorianWolters · GitHub"
"PHP-FIG — PHP Framework Interop Group"
"PSR-0 requirements for autoloader interoperability"
"PSR-1 basic coding style guide"
"PSR-2 coding style guide"
"PSR-4: Improved Autoloading"
"Travis CI"
"Scrutinizer CI"
"SensioLabsInsight"
"Coveralls"
"VersionEye"
"Depending"
"Waffle"
"HHVM Support in PHP Projects"
"PHP_CodeSniffer"
"PHPUnit"
"sebastianbergmann/phpcpd · GitHub"
"sebastianbergmann/phpdcd · GitHub"
"PHPMD - PHP Mess Detector"
"PHP Depend - Software Metrics for PHP"
"phpDocumentor"
"SensioLabs Security Checker"
"satooshi/php-coveralls · GitHub"
"Contributors to FlorianWolters/PHP-Component-Core-Cloneable"
"florianwolters/component-core-cloneable - Packagist"
"Application Programming Interface (API) documentation"
"PHP: Object Cloning"
"Java"
"FlorianWolters\Component\Core\CloneableInterface"
"FlorianWolters\Component\Core\CloneNotSupportedException"
"FlorianWolters\Component\Core\CloneNotSupportedTrait"
"FlorianWolters\Component\Core\ShallowCloneTrait"
"FlorianWolters\Component\Core\DeepCloneTrait"
"FlorianWolters\Component\Core\CloneUtils"