php-PhpOption-1.4.0-1.el5.remi.noarch.rpm


Advertisement

Description

php-PhpOption - Option type for PHP

Property Value
Distribution CentOS 5
Repository Les RPM de Remi i386
Package name php-PhpOption
Package version 1.4.0
Package release 1.el5.remi
Package architecture noarch
Package type rpm
Installed size 33.37 KB
Download size 13.39 KB
Official Mirror rpms.remirepo.net
This package adds an Option type for PHP.
The Option type is intended for cases where you sometimes might return a value
(typically an object), and sometimes you might return no value (typically null)
depending on arguments, or other runtime factors.
Often times, you forget to handle the case where no value is returned. Not
intentionally of course, but maybe you did not account for all possible states
of the system; or maybe you indeed covered all cases, then time goes on, code
is refactored, some of these your checks might become invalid, or incomplete.
Suddenly, without noticing, the no value case is not handled anymore. As a
result, you might sometimes get fatal PHP errors telling you that you called a
method on a non-object; users might see blank pages, or worse.
On one hand, the Option type forces a developer to consciously think about both
cases (returning a value, or returning no value). That in itself will already
make your code more robust. On the other hand, the Option type also allows the
API developer to provide more concise API methods, and empowers the API user in
how he consumes these methods.

Alternatives

Package Version Architecture Repository
php-PhpOption-1.4.0-4.el5.remi.noarch.rpm 1.4.0 noarch Les RPM de Remi
php-PhpOption-1.4.0-4.el5.remi.noarch.rpm 1.4.0 noarch Les RPM de Remi
php-PhpOption-1.4.0-1.el5.remi.noarch.rpm 1.4.0 noarch Les RPM de Remi
php-PhpOption - - -

Requires

Name Value
php(language) >= 5.3.0
php-spl -

Provides

Name Value
php-PhpOption = 1.4.0-1.el5.remi

Download

Type URL
Binary Package php-PhpOption-1.4.0-1.el5.remi.noarch.rpm
Source Package php-PhpOption-1.4.0-1.el5.remi.src.rpm

Install Howto

  1. Download latest remi-release rpm from
    http://rpms.remirepo.net/enterprise/5/remi/i386/
  2. Install remi-release rpm:
    # rpm -Uvh remi-release*rpm
  3. Install php-PhpOption rpm package:
    # yum --enablerepo=remi install php-PhpOption

Files

Path
/usr/share/doc/php-PhpOption-1.4.0/LICENSE
/usr/share/doc/php-PhpOption-1.4.0/README.md
/usr/share/doc/php-PhpOption-1.4.0/composer.json
/usr/share/php/PhpOption/LazyOption.php
/usr/share/php/PhpOption/None.php
/usr/share/php/PhpOption/Option.php
/usr/share/php/PhpOption/Some.php

Changelog

2014-02-17 - Remi Collet <RPMS@famillecollet.com> 1.4.0-1
- backport 1.4.0 for remi repo
2014-02-12 - Shawn Iwinski <shawn.iwinski@gmail.com> 1.4.0-1
- Updated to 1.4.0 (BZ #1055299)
2013-09-29 - Remi Collet <RPMS@famillecollet.com> 1.3.0-1
- backport 1.3.0 for remi repo
2013-09-28 - Shawn Iwinski <shawn.iwinski@gmail.com> 1.3.0-1
- Updated to 1.3.0
- Other minor updates
2013-04-02 - Remi Collet <RPMS@famillecollet.com> 1.2.0-1
- backport 1.2.0 for remi repo
2013-03-30 - Shawn Iwinski <shawn.iwinski@gmail.com> 1.2.0-1
- Updated to version 1.2.0
- Removed tests sub-package
2013-01-25 - Remi Collet <RPMS@famillecollet.com> 1.1.0-1
- backport 1.1.0 for remi repo
2013-01-22 - Shawn Iwinski <shawn.iwinski@gmail.com> 1.1.0-1
- Initial package

See Also

Package Description
php-PhpOption-tests-1.1.0-1.el5.remi.noarch.rpm Test suite for php-PhpOption
php-Pimple-1.1.1-1.el5.remi.noarch.rpm A simple dependency injection container for PHP
php-Pimple-3.0.0-1.el5.remi.noarch.rpm A simple dependency injection container for PHP
php-PsrLog-1.0.2-1.el5.remi.noarch.rpm Common interface for logging libraries
php-PsrLog-1.0.2-2.el5.remi.noarch.rpm Common interface for logging libraries
php-Raven-0.13.0-1.el5.remi.1.noarch.rpm A PHP client for Sentry
php-Raven-0.13.0-1.el5.remi.noarch.rpm A PHP client for Sentry
php-Raven-tests-0.4.0-2.el5.remi.noarch.rpm Test suite for php-Raven
php-Raven-tests-0.5.1-1.el5.remi.noarch.rpm Test suite for php-Raven
php-Slim-2.6.2-2.el5.remi.noarch.rpm PHP micro framework
php-Slim-2.6.3-1.el5.remi.noarch.rpm PHP micro framework
php-Slim-tests-2.6.2-2.el5.remi.noarch.rpm Test for the PHP Slim Micro Framework
php-Slim-tests-2.6.3-1.el5.remi.noarch.rpm Test for the PHP Slim Micro Framework
php-Smarty-3.1.30-1.el5.remi.noarch.rpm Template/Presentation Framework for PHP
php-Smarty-3.1.31-1.el5.remi.noarch.rpm Template/Presentation Framework for PHP
Advertisement
Advertisement