Chirpy! 0.3 API Documentation
Chirpy::Util - Static utility class
Returns whether or not the given username is valid. A username is valid if it is minimally 2, maximally 32 characters long. The characters can be letters, numbers, underscores or dashes.
Returns whether or not the given password is valid. A password is valid if it is minimally 4, maximally 256 characters long. The characters can be letters, numbers, underscores or dashes.
Performs various cleanup operations on the given string, which is assumed to be filled in by the user somewhere. The operations include removal of leading and trailing whitespaces, and trimming down sequences of more than 2 line feeds.
Parses the string
$tagsinto an array of valid tags and returns a reference to it. The array may be empty.
Encrypts the given string using the MD5 algorithm. This function is used for password encryption.
Returns a string representation of the given rating, i.e. the number prepended with the Unicode representation of its sign.
- format_date_time($timestamp, $format, $gmt)
$timestampusing the POSIX module's
$formatas the format. Returns Greenwich Mean Time if
$stringwith the character entities defined in XML encoded. The entities and their respective codes are:
Character Entity ========= ====== & & " " < < > >
Returns the given string with UTF-8 characters decoded.
Attempts to make the directory specified by
$pathwritable, creating it if it does not exist. If, upon completion,
$pathdoes represent a writable directory, execution is aborted.
Aborts execution immediately, stating that the method is abstract and must be implemented. Hence, if you have an abstract method
my_abstract_method(), you may define it as follows:
*my_abstract_method = \&Chirpy::Util::abstract_method;
Invoking it will then cause a fatal error unless it is overridden in the module implementation.
Tim De Pauw <firstname.lastname@example.org>
Copyright 2005-2007 Tim De Pauw. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 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 General Public License for more details.