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.

Summary
creators.phpThese are a collection of functions that return an object of the appropriate type based on certain parameters.
Functions
NewFSCreates a new filesystem access object.
NewPageCreates a new page object.
NewBlogCreates a new blog object
NewBlogEntryCreates a new blog entry object.
NewArticleCreates a new article object
NewBlogCommentCreates a new BlogComment on an entry or article.
NewTemplateCreates a new template object.
NewUserCreates a new user object.
NewFileUploadCreates a new file uploader object.
NewTrackbackCreates a new trackback object.
NewPingbackCreates a new pingback object.
NewIniParserCreates a new INI file parser object.
NewConfigFileCreates an XML config file parser object.
NewReplyCreates a new object based on a reply identifier.

Functions

NewFS

function NewFS()

Creates a new filesystem access object.

NewPage

function NewPage($ref = false)

Creates a new page object.

NewBlog

function NewBlog($param = false)

Creates a new blog object

NewBlogEntry

function NewBlogEntry($param = false)

Creates a new blog entry object.

NewArticle

function NewArticle($param = false)

Creates a new article object

NewBlogComment

function NewBlogComment($param = false)

Creates a new BlogComment on an entry or article.

NewTemplate

function NewTemplate($tpl = "")

Creates a new template object.

NewUser

function NewUser($usr = false,
$pwd = false)

Creates a new user object.

Parameters

usrThe optional username of the user represented by this object.
pwdThe optional associated password.

NewFileUpload

function NewFileUpload($field,  
$dir = false,
$index = false)

Creates a new file uploader object.

Parameters

fieldThe form field that this object represents.
dirThfile:///home/Tallgeese/pageer/www/LnBlog/lib/creators.phpe optional target directory.
indexThe optional index of this upload for file upload arrays.

NewTrackback

function NewTrackback($param = false)

Creates a new trackback object.

NewPingback

function NewPingback($param = false)

Creates a new pingback object.

NewIniParser

function NewIniParser($file = false)

Creates a new INI file parser object.

NewConfigFile

function NewConfigFile($file = false)

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.

function NewFS()
Creates a new filesystem access object.
function NewPage($ref = false)
Creates a new page object.
function NewBlog($param = false)
Creates a new blog object
function NewBlogEntry($param = false)
Creates a new blog entry object.
function NewArticle($param = false)
Creates a new article object
function NewBlogComment($param = false)
Creates a new BlogComment on an entry or article.
function NewTemplate($tpl = "")
Creates a new template object.
function NewUser($usr = false,
$pwd = false)
Creates a new user object.
function NewFileUpload($field,  
$dir = false,
$index = false)
Creates a new file uploader object.
function NewTrackback($param = false)
Creates a new trackback object.
function NewPingback($param = false)
Creates a new pingback object.
function NewIniParser($file = false)
Creates a new INI file parser object.
function NewConfigFile($file = false)
Creates an XML config file parser object.
function NewReply($id)
Creates a new object based on a reply identifier.
Close