HTML_QuickForm2
[ class tree: HTML_QuickForm2 ] [ index: HTML_QuickForm2 ] [ all elements ]

Class: HTML_QuickForm2_DataSource_NullAware

Source Location: /HTML_QuickForm2-2.1.0/HTML/QuickForm2/DataSource/NullAware.php

Class Overview

HTML_QuickForm2_DataSource
   |
   --HTML_QuickForm2_DataSource_NullAware

Interface for data sources that may contain explicit null values


Author(s):

Version:

  • Release: 2.1.0

Methods


Inherited Variables

Inherited Methods

Class: HTML_QuickForm2_DataSource

HTML_QuickForm2_DataSource::getValue()
Returns value for the element with the given name

Class Details

[line 45]
Interface for data sources that may contain explicit null values

getValue() was designed to return null for missing values, unfortunately that led to bugs when data source contained values explicitly set to null, see http://pear.php.net/bugs/bug.php?id=20295. This interface defines a method that may be used by elements to check whether a value is available, even if that value is null.



[ Top ]


Method Detail

hasValue   [line 56]

bool hasValue( string $name)

Checks whether a value for the element with a given name is available

Will return true even if the value is null, similar to array_key_exists()

  • Access: public

Parameters:

string   $name   —  Element's name

[ Top ]


Documentation generated on Wed, 10 Apr 2019 08:56:10 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.