# PrimitiveString Class Reference
[Base data types used in Form]

Inheritance diagram for PrimitiveString:
[legend]

List of all members.

## Public Member Functions

| setAllowedPattern ($pattern)
| import ($scope)

## Public Attributes

const | MAIL_PATTERN = '/^[a-zA-Z0-9\!\#\$\%\&\'\*\+\-\/\=\?\^\_\`\{\|\}\~]+(\.[a-zA-Z0-9\!\#\$\%\&\'\*\+\-\/\=\?\^\_\`\{\|\}\~]+)*@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/Ds'
const | URL_PATTERN = '/^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}((:[0-9]{1,5})?\/.*)?$/is'
const | SHA1_PATTERN = '/^[0-9a-f]{40}$/'
const | MD5_PATTERN = '/^[0-9a-f]{32}$/'

## Protected Attributes

| $pattern = null

## Detailed Description

Definition at line 15 of file PrimitiveString.class.php.

## Member Function Documentation

PrimitiveString::import | ( | $ | scope | ) |

Reimplemented from BasePrimitive.

Reimplemented in ExplodedPrimitive, PrimitiveClass, and PrimitiveHttpUrl.

Definition at line 35 of file PrimitiveString.class.php.

References BasePrimitive::import(), and FiltrablePrimitive::selfFilter().

Here is the call graph for this function:

PrimitiveString::setAllowedPattern | ( | $ | pattern | ) |

Returns:
  PrimitiveString

Definition at line 28 of file PrimitiveString.class.php.

References $pattern.

## Member Data Documentation

PrimitiveString::$pattern = null`[protected]`

Definition at line 23 of file PrimitiveString.class.php.

Referenced by setAllowedPattern().

const PrimitiveString::MAIL_PATTERN = '/^[a-zA-Z0-9\!\#\$\%\&\'\*\+\-\/\=\?\^\_\`\{\|\}\~]+(\.[a-zA-Z0-9\!\#\$\%\&\'\*\+\-\/\=\?\^\_\`\{\|\}\~]+)*@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/Ds'

Definition at line 18 of file PrimitiveString.class.php.

const PrimitiveString::MD5_PATTERN = '/^[0-9a-f]{32}$/'

Definition at line 21 of file PrimitiveString.class.php.

const PrimitiveString::SHA1_PATTERN = '/^[0-9a-f]{40}$/'

Definition at line 20 of file PrimitiveString.class.php.

const PrimitiveString::URL_PATTERN = '/^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}((:[0-9]{1,5})?\/.*)?$/is'

Definition at line 19 of file PrimitiveString.class.php.

The documentation for this class was generated from the following file:

- core/Form/Primitives/PrimitiveString.class.php