blueshoes php application framework and cms            core_lang
[ class tree: core_lang ] [ index: core_lang ] [ all elements ]

Class: Bs_Object

Source Location: /core/Bs_Object.class.php

Class Overview


Emulate a JAVA object, sort of...


Author(s):

Version:

  • 4.3.$Revision: 1.3 $ $Date: 2003/10/29 17:47:48 $

Copyright:

  • blueshoes.org

Methods


Child classes:

Bs_Cms_BlockNewsRecord
Bs_Guard
Guard Class
Bs_Navigation
Navigation Class
Bs_Renderer
Renderer Class
Bs_XAtom
XAtom Class (Abstaract Class)
Bs_XClearingHouse
Clearing House Class
Bs_XRay
XRay Class
Bs_XStorage
XStorage class
Bs_Debedoo
Debedoo is the pronounced version of "DB Do", aka "Database do". So Debedoo does something with the database. it makes the content of a db table editable. a bit like phpMyAdmin but in a customized way for that particular table.
Bs_Faq
for an example of how to use this see applications/cms/Bs_Cms_BlockFaq.class.php.
Bs_FaqRecord
Bs_ImageArchive
Image Archive class.
Bs_IndexedListManager
Indexed List Manager. Frontend for a key=>value list (hashtable) coming from a db.
Bs_MailingList
Bs_SimpleQuiz
Simple Quiz Class.
Bs_Ss_Basket
SmartShop Basket Class
Bs_Ss_Customer
SmartShop Customer Class
Bs_Ss_XAtom
SmartShop XAtom Class (Abstaract Class)
Bs_Ss_XClearingHouse
Clearing House Class
Bs_Ss_XStorage
SmartShop XStorage Class
Bs_Wse_Profile
WebSearchEngine Profile class.
Bs_Wse_Searcher
dependencies: Bs_Url, Bs_StopWatch
Bs_Wse_Walker
todo: on windows machines compare url's case insensitive. in many peaces of the code.
Bs_Wse_WebSearchEngine
WebSearchEngine Class.
Bs_Password
Password class.
Bs_UserManagement
User and Group Management. EXPERIMENTAL!
Bs_Cug
Closed User Group (Cug) Class
Bs_MagicClass
Bs_Rc4Crypt
RC4 Class (Pure PHP. No libmcrypt 2.4.x needed.) Fairly fast, secure and symmetric en- and decryption algorithm.
Bs_Date
This static class provides many useful date and time methods.
Bs_DateUtil
Bs_ArrayDb
Array-DB class. makes it possible to execute sql queries on a array.
Bs_Db
abstract class Bs_Db.class.php
Bs_DbWrapper
DB Wrapper
Bs_ResultSet
This class implements a wrapper for a DB result set.
Bs_FileCache
File Cache Class.
Bs_FileSystem
FileSystem Basic filesystem class. gets extended by Bs_File and Bs_Dir.
Bs_FileUtil
file helper class. not sure if i should start another class or if i should throw this into bs_file.
Bs_FileConverter
Pseudostatic utility class to convert files from one format to another.
Bs_ColorCodes
ColorCodes class.
Bs_ImageUtil
ImageUtil class.
Bs_Chart
Chart Class.
Bs_IntervalChart
INTERVAL Chart Class.
Bs_TextType
TextType class.
Bs_HeadCollector
dependencies: none
Bs_HnXmlHandler
*********************************************************************** HtmlNavigation Xml Handler class.
Bs_HtmlEntities
dependencies: Bs_HtmlUtil
Bs_HtmlInfo
Bs_HtmlInfo class. can fetch information about an html page.
Bs_HtmlNavigation
HtmlNavigation class.
Bs_HtmlTag
Html Tag Class.
Bs_HtmlUtil
This static class provides many useful html methods.
Bs_JsCruncher
***********************************************************************
Bs_Form
Form Class
Bs_FormBuilder
Form Builder Class
Bs_FormElement
Form Element Class
Bs_FormHandler
Form Handler Class loads and persists html forms from/to the [mysql] database.
Bs_FormIniHandler
Form Ini Handler Class
Bs_FormItAble
we had a discussion about the name of this class. "FormItAble" means "form it", with this class you are ABLE to display classes as FORMS., it's about web forms, and the name comes from "formidable". we think this class deserves this name. :-) an alternative would have been "ClassFormHandler". it's a form handler that builds forms for classes.
Bs_HtmlTable
HtmlTable class Can manipulate content, attributes and style and then render the data to a nicely formed HTML table.
Bs_HtmlTableParser
Emulate a JAVA object, sort of...
Bs_HtmlTableStyle
HtmlTableStyle class
Bs_HtmlTableWindrose
HtmlTableWindrose class Has knowledge where to set attributes and styles at a RELATIVE position of a HTML table.
Bs_Exception
Emulate a Java exception, sort of...
Bs_TestFailure
Record failure of a single TestCase, associating it with the exception(s) that occurred
Bs_TestResult
Collect the results of running a set of TestCases.
Bs_TestSuite
Compose a set of Tests (instances of TestCase or TestSuite), and run them all.
Bs_DomainInfo
Bs_NetApplication
Helper Class for net applications which may extend this one.
Bs_NetUtil
This static class provides some useful net methods.
Bs_SocketClient
Generalized SocketClient class.
Bs_Url
Url (and email) utility class.
Bs_EmailParser
Parses email files into arrays.
Bs_EmailUtil
General pseudo-static email utility class.
Bs_HtmlMime
Html/Mime class is used to send emails with html/text combinations and attachements.
Bs_SpamBuster
Treats Spam (unwanted emails).
Bs_FtpClient
Abstract Ftp client class. needs to be subclassed.
Bs_FtpClientFactory
Ftp client factory class.
Bs_Browscap
Browser Capture Class.
Bs_IntruderBuster
Bs_IntruderBuster class
Bs_LittleSister
Little Sister Class.
Bs_UrlCache
URL Cache Class
Bs_Session
!!! deprecated, use Bs_SimpleSession instead !!!
Bs_SimpleSession
Simple-Session extends PHP's standard session handling making it more usable.
Bs_ObjPersister
A B S T R A C T [*1] Object Bs_ObjPersister.class.php
Bs_SimpleObjPersister
Bs_SimpleObjPersister.class.php is able to store and load an Object to a DB.
Bs_OoDbBasics
Basic function library for Bs_OoDb.class.php OoDb is the abriviation for "Object Oriented Database" For details on how to use ooDb see Bs_OoDb.class.php (or Bs_OoDbForMySql.class.php) The folling text will discribe details and concepts of the implementation.
Bs_DailyText
EXPERIMENTAL!
Bs_LanguageDetector
detects the language of a text (not meant for single words).
Bs_LanguageHandler
This class provides methods to work with different languages.
Bs_Ocr
dependencies: imagemagick http://www.imagemagick.com/ gocr http://jocr.sourceforge.net/ Bs_Dir,
Bs_TextUtil
dependencies: Bs_String, Bs_Array
Bs_Array
This static class provides many useful array methods that don't come with php.
Bs_CsvUtil
csv util class. csv = comma separated value.
Bs_Finance
This static class provides some useful finance functions.
Bs_FormatConverter
Pseudostatic utility class to convert formats.
Bs_IniHandler
This class provides methods to work with ini-style files.
Bs_Number
This static class provides many useful number methods.
Bs_String
This static class provides many useful string methods.
Bs_Stripper
This class provides some functions to strip php code.
Bs_System
This static class provides system functions.
Bs_UnitConverter
Pseudostatic utility class to convert units.
Bs_XmlParser
XML Parser Class.
Bs_GeoServer
terms used:
Bs_Is_ConverterExcel
dependencies: Bs_FileConverterExcel
Bs_Is_ConverterHtml
dependencies: Bs_HtmlInfo
Bs_Is_ConverterPdf
dependencies: Bs_FileConverterPdf
Bs_Is_ConverterWord
dependencies: Bs_FileConverter
Bs_Is_Index
the names of indexes are used case sensitive. but if you try to create one that already exists with different case that will fail cause for that we check case insensitive to avoid problems.
Bs_Is_Indexer
Indexer of the IndexServer package.
Bs_Is_IndexServer
Index Server Class.
Bs_Is_Profile
Index Server Profile class.
Bs_Is_Searcher
searcher class.
Bs_Is_WebSearchEngine
todo: on windows machines compare url's case insensitive. in many peaces of the code.
Bs_IndexServer
stemming: normally if you search for 'printer' then 'printers' will not be found.
Bs_Ih_InstantHelp
dependencies:
Bs_Om_OnoGraph
Bs_Om_OnomasticsServer
problems we face: o) typo: simth instead of smith.
Emulate a JAVA object, sort of...
Bs_TableGenerator
Emulate a JAVA object, sort of...
Bs_LogAdmin
Emulate a JAVA object, sort of...
Bs_OoDbAble
Emulate a JAVA object, sort of...
Appication
Emulate a JAVA object, sort of...
MenuSheet
Emulate a JAVA object, sort of...
Bs_PhpPackager
Emulate a JAVA object, sort of...
EntryPoint
Emulate a JAVA object, sort of...
PackageCollector
Package Collector for automatic packageing of software.
Page
*************************************************************************************************** It only holds the repetetive stuff we would otherwise copy in each Page we want to render.

Inherited Variables

Inherited Methods


Class Details

[line 38]
Emulate a JAVA object, sort of...

no dependencies here.




Tags:

pattern:  singleton: (pseudostatic)
access:  public
version:  4.3.$Revision: 1.3 $ $Date: 2003/10/29 17:47:48 $
copyright:  blueshoes.org
author:  Sam Blum <at blueshoes dot org>, andrej arn <andrej at blueshoes dot org>


[ Top ]


Class Methods


constructor Bs_Object [line 39]

Bs_Object Bs_Object( )



[ Top ]

method getErrors [line 154]

array getErrors( )

Basic error handling: Get *all* errors as string array from the global Bs_Error-error stack.

See setError() for more details.




Tags:



[ Top ]

method getLastError [line 129]

string getLastError( )

Basic error handling: Get last error string from the global Bs_Error-error stack.

See setError() for more details.




Tags:

return:  Formated error string. The last error inserted by setError()
static:  
see:  Bs_Object::setError(), Bs_Object::getLastError(), Bs_Object::getLastErrors(), Bs_Object::getErrors(), Bs_Error.class.php


[ Top ]

method getLastErrors [line 144]

array getLastErrors( )

Basic error handling: Get last errors string array from the global Bs_Error-error stack sinc last call of getLastErrors().

The idea here: Get an array of all errors that may have accumulated since the last getLastError() OR getLastErrors() call. This happens then when multiple calls to setError() happen before you have the chance to get the last error. (Usually the first error is the most interesting, while the others are usually error of errors). See setError() for more details.




Tags:



[ Top ]

method persist [line 173]

string|bool persist( [string $objId = ''])

Persists this object by serializing it and saving it to a file with unique name.

To generate the file we use PHP's http://www.php.net/tempnam. It's very system dependent where the file is opened! See PHP doc. If you pass a full path (incl file name) the full path is used to store the serialized object.




Tags:

return:  On success the full path is returned; FALSE on failure. (Use getLastError()).
see:  Bs_Object::unpersist()
access:  public


Overridden in child classes as:

Bs_XAtom::persist()
Use the XStorage to persist any XAtom
Bs_XStorage::persist()
Persist the xAtom-element.
Bs_Ss_XAtom::persist()
Use the XStorage to persist any XAtom
Bs_Ss_XStorage::persist()
Persist the xAtom-element.
Bs_Form::persist()
persist the form settings (with the attached form elements by default).
Bs_FormContainer::persist()
persist the element settings.
Bs_ObjPersister::persist()
Persist the object that is handeled by this object.
Bs_ObjPersisterForFile::persist()
Persist the desired object data into the db table.
Bs_ObjPersisterForMySql::persist()
Persist the desired object data into the db table.
Bs_OoDb::persist()
Persist a object 1) Check if the object passed ($obj) has already been stored. If so, return ID.

Parameters:

string   $objId   (Optional) The full path (incl file name) to where the serialized object is written.

[ Top ]

method setError [line 111]

void setError( string $msg, string $msgType, [int $line = 0], [string $func = ''], [string $file = ''])

Basic error handling: Push an error string on the global Bs_Error-error stack.

Bs_Object uses the global error stack of Bs_Error and supplies wrappers for use. This makes the code look more natural. E.g.


1 class Obj extends Bs_Object {
2 function foo() {
3 $o->setError("Test Error", "WARNING");
4 return FALSE;
5 }
6 }
7 // class Obj in action
8 $o = new Obj();
9 if (FALSE === $o->foo()) {echo $o->getLastError();}




Tags:



Parameters:

string   $msg   Any string.
string   $msgType   Any string, usually something like 'ERROR' or 'WARNING'.
int   $line   omit in PHP 4.3+ otherwise use PHP's __LINE__ constant.
string   $func   omit in PHP 4.3+ otherwise pass function name or use PHP's __FUNCTION__ constant.
string   $file   omit in PHP 4.3+ otherwise pass function name or use PHP's __FILE__ constant.

[ Top ]

method toHtml [line 78]

string toHtml( )

Dumps the content of this object to a string using PHP's var_dump().

If not overwritten, just returns a dumps of the Object as HTML string.




Tags:

see:  Bs_Object::toString()
access:  public


Overridden in child classes as:

Bs_File::toHtml()
*
Bs_HtmlNavigation::toHtml()
returns the navigation as html output
Bs_HtmlTable::toHtml()
***********************************************************************
Bs_HtmlTableStyle::toHtml()
returns the table as html output

[ Top ]

method toString [line 61]

string toString( )

Dumps the content of this object to a string using PHP's var_dump().

If not overwritten, just returns a dumps of the Object as string.




Tags:

see:  Bs_Object::toHtml()
access:  public


Overridden in child classes as:

Bs_Node::toString()
************************************************************************
Bs_Db::toString()
Returns a string with information about the current state of this db object.
Bs_File::toString()
*
Bs_Exception::toString()
Prepares the stack to spit it out.
Bs_IniHandler::toString()
toString conversion as used in saveFile(), to export the values.

[ Top ]

method unpersist [line 205]

object|NULL unpersist( string $objId)

Fetches an object that was persisted with persist()



Tags:

return:  The object on success OR NULL on failier.
see:  Bs_Object::persist()
access:  public


Overridden in child classes as:

Bs_OoDb::unpersist()
Unpersist a object - Dramatic dynamic :-) 1) IF className is passed, instanceiate an object(suppressing any missing parameter warnings) ELSE use passed object assuming it's the right class (read on to see what is the *right* class).

Parameters:

string   $objId   The full path (incl file name) that you got from persist().

[ Top ]


Documentation generated on Mon, 29 Dec 2003 21:12:09 +0100 by phpDocumentor 1.2.3