PEAR_Validate::validState

PEAR_Validate::validState() – Determine whether $state represents a valid stability level

Synopsis

require_once '/Validate.php';

bool PEAR_Validate::validState ( string $state )

Description

This utility method can be used to determine whether a string is a valid state. Currently, states must be one of snapshot, devel, alpha, beta, and stable.

Parameter

string $state

State string to validate.

Throws

throws no exceptions thrown

Final

final - this method should not be overridden.

Note

This function should be called statically.

utility method to validate a package name string (Previous) Determine whether a version is a properly formatted version number that can be used by version_compare (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.