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

Class: Bs_MagicClass

Source Location: /core/Bs_MagicClass.class.php

Class Overview

Bs_Object
   |
   --Bs_MagicClass



Author(s):

Version:

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

Copyright:

  • blueshoes.org

Variables

Methods


Child classes:

Bs_ContactForm
Contact Form Class.
Bs_Ml_User
Bs_Group
Group Class for the User Management. EXPERIMENTAL!
Bs_User
User Class for the User Management. EXPERIMENTAL!

Inherited Variables

Inherited Methods

Class: Bs_Object

Bs_Object::Bs_Object()
Bs_Object::getErrors()
Basic error handling: Get *all* errors as string array from the global Bs_Error-error stack.
Bs_Object::getLastError()
Basic error handling: Get last error string from the global Bs_Error-error stack.
Bs_Object::getLastErrors()
Basic error handling: Get last errors string array from the global Bs_Error-error stack sinc last call of getLastErrors().
Bs_Object::persist()
Persists this object by serializing it and saving it to a file with unique name.
Bs_Object::setError()
Basic error handling: Push an error string on the global Bs_Error-error stack.
Bs_Object::toHtml()
Dumps the content of this object to a string using PHP's var_dump().
Bs_Object::toString()
Dumps the content of this object to a string using PHP's var_dump().
Bs_Object::unpersist()
Fetches an object that was persisted with persist()

Class Details

[line 7]


Tags:

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


[ Top ]


Class Variables

$formFields =

[line 23]


Type:   mixed


[ Top ]

$formFieldsUsed =

[line 34]


Type:   mixed


[ Top ]

$formGroups =

[line 24]


Type:   mixed


[ Top ]

$formProps = array(
    'internalName' => 'form', 
    'name'         => 'form', 
    'mode'         => 'add', 
    'language'     => 'en', 
    'buttons'      => 'default', 
    'user'         => '', 
  )

[line 25]


Type:   mixed


[ Top ]

$persistFields =

[line 18]



Tags:

var:  (hash, see above)
access:  public

Type:   array


[ Top ]

$persistFieldsUsed =

[line 20]


Type:   mixed


[ Top ]

$persistPrimary = array(
    'uniqueKey' => array('name'=>'ID', 'type'=>'auto_increment'),)

[line 10]


Type:   mixed


[ Top ]

$uniqueKey =  0

[line 37]


Type:   mixed


[ Top ]



Class Methods


constructor Bs_MagicClass [line 46]

Bs_MagicClass Bs_MagicClass( [bool $loadPersistHints = TRUE], [bool $loadFormHints = FALSE])

constructor



Tags:

see:  $this->loadPersistHints(), $this->loadFormHints()


Parameters:

bool   $loadPersistHints   (default is TRUE)
bool   $loadFormHints   (default is FALSE)

[ Top ]

method activateField [line 63]

void activateField( string $fieldName)

activates a predefined field that is not activated by default.

list of possible fields: todo

note: if you want to modify the order you can modify $this->fieldsUsed directly.




Tags:

see:  $this->addField(), $this->removeField(), var $this->fieldsUsed
access:  public


Parameters:

string   $fieldName  

[ Top ]

method addField [line 92]

void addField( string $fieldName, array $storageFields, array $formFields)

adds (and activates) the given field.

example: $storageFields = array('name'=>'hobbies', 'metaType'=>'text', 'size'=>'5000'); $formFields = array( 'group' => 'grpFoo', 'fieldType' => 'Bs_FormFieldTextarea', 'must' => TRUE, 'caption' => array('en'=>'Hobbies', 'de'=>'Hobbys'), 'editability' => 'always', 'valueDefault' => '', 'bsDataType' => 'blob', ); $user->addField('hobbies', $storageFields, $formFields);

note: if you want to modify the order you can modify $this->fieldsUsed directly.




Tags:

see:  $this->activateField(), $this->removeField(), var $this->fieldsUsed
access:  public


Parameters:

string   $fieldName  
array   $storageFields   (hash)
array   $formFields   (hash)

[ Top ]

method bs_fia_getHints [line 148]

array bs_fia_getHints( object &$fia)



Tags:

return:  (hash with the keys 'props', 'groups' and 'props'.)
throws:  bool FALSE
access:  public


Parameters:

object   &$fia   (reference to the bs_FormItAble singleton.)

[ Top ]

method bs_sop_getHints [line 130]

array bs_sop_getHints( object &$sop)



Tags:

return:  (hash with the keys 'primary' and 'fields'.)
access:  public


Parameters:

object   &$sop   (reference to the Bs_SimpleObjPersister singleton.)

[ Top ]

method loadFormHints [line 121]


method loadPersistHints [line 115]

void loadPersistHints( )



Overridden in child classes as:

Bs_Ml_User::loadPersistHints()
Bs_Group::loadPersistHints()
Bs_User::loadPersistHints()

[ Top ]

method removeField [line 106]

void removeField( string $fieldName)

deactivates an active field.



Tags:

see:  $this->activateField(), $this->addField()
access:  public


Parameters:

string   $fieldName  

[ Top ]


Documentation generated on Mon, 29 Dec 2003 21:11:45 +0100 by phpDocumentor 1.2.3