creators.php

These are a collection of functions that return an object of the appropriate type based on certain parameters.  The purpose of this is to allow for a plugin-like configuration mechanism.  The idea is that we can use these functions to automagically determine the system configuration and do things like swap between implementations, e.g.  the NativeFS vs. FTPFS problem.  Because these functions take care of the detection (possibly including reading query strings?) and include the class files, much of the "include() hell" I've been experiencing will now go away.

Note that this should really be a factory class, but PHP 4 doesn't allow static methods, so it's more convenient just to make them functions.

Functions
NewFS
function NewFS()

Creates a new filesystem access object.

NewLogger
function NewLogger()

Create a new PSR logger object.

NewPage
function NewPage(
$reffalse
)

Creates a new page object.

NewBlog
function NewBlog(
$paramfalse
)

Creates a new blog object

NewBlogEntry
function NewBlogEntry(
$paramfalse
)

Creates a new blog entry object.

NewBlogComment
function NewBlogComment(
$paramfalse
)

Creates a new BlogComment on an entry or article.

NewTemplate
function NewTemplate(
$tpl"",
$pagenull
)

Creates a new template object.

NewUser
function NewUser(
$usrfalse
)

Creates a new user object.

Parameters
usr

The optional username of the user represented by this object.

NewFileUpload
function NewFileUpload(
$field,
$dirfalse,
$indexfalse
)

Creates a new file uploader object.

Parameters
field

The form field that this object represents.

dir

Thfile:///home/Tallgeese/pageer/www/LnBlog/lib/creators.phpe optional target directory.

index

The optional index of this upload for file upload arrays.

NewTrackback
function NewTrackback(
$paramfalse
)

Creates a new trackback object.

NewPingback
function NewPingback(
$paramfalse
)

Creates a new pingback object.

NewIniParser
function NewIniParser(
$filefalse
)

Creates a new INI file parser object.

NewConfigFile
function NewConfigFile(
$filefalse
)

Creates an XML config file parser object.

NewReply
function NewReply(
$id
)

Creates a new object based on a reply identifier.  The object is a BlogComment, Trackback, or Pinback.  The type of object is based on the parameter passed, which can be either an anchor name as displayed on the page or a local file path.