| Home About phpAddDict Screenshots Demo Buy/Order FAQ Documentation Support Service |
п»їphpAddDict APIClasses
Classphpadddict_Container - Controls business logicPublic Methods
Descriptionfactory($name,$conf)Returns instance of container@param string $name Class name @param array $conf Configuration hash @return object phpadddict_Container Example: $rc = phpadddict_Container::factory($contName,$contConf); @throws object phpadddict_Error @access public getReferences($refNames=array(),$lang='en')Returns indicated dictionaries @param array $refNames Dictionary IDs to return $refs = $rc->getReferences(array('job_function'),'en'); Returns: array(1) { getLanguages()Returns available languages @return array The list of languages. $langs = $rc->getLanguages(); Returns: array(2) { registerReference($refName,$refID)Registers a new dictionary @param string $refName Dictionary name Example: $err = $rc->registerReference('Business type','biz_type'); @throws object phpadddict_Error registerValue($valName,$valID='',$lang='en',$refID)Registers a new dictionary's value @param string $valName New value's name Example: $err = $rc->registerValue('Manufacturer','mnf','','biz_type'); @throws object phpadddict_Error registerLanguage($langID)Registers a new language @param string $langID New language ID @return void Example: $err = $rc->registerLanguage('de');@throws object phpadddict_Error isValueExist($valID,$langID='en')Checks if dictionary's value already registered @param string $valID Value ID to check @return boolean Example: $exists = $rc->isValueExist('mnf'); @throws object phpadddict_Error isReferenceExist($refID)Checks if dictionary already registered @param string $refID Dictionary ID to check Example: $exists = $rc->isReferenceExist('biz_type'); @throws object phpadddict_Error isLanguageExist($langID)Checks if language already registered @param string $langID Language ID to check Example: $exists = $rc->isLanguageExist('de'); @throws object phpadddict_Error getReferenceList()Returns list of dictionaries @return array The hash of dictionaries. $refs = $rc->getReferenceList(); Returns: array(2) { ["biz_type"]=> "Business Type" } deleteReference($refID)Deletes indicated dictionary with its values @param string $refID Dictionary ID to delete @return void Example: $err = $rc->deleteReference('biz_type'); @throws object phpadddict_Error getReferenceName($refID)Returns indicated dictionary name @param string $refID Dictionary ID Example: $refName = $rc->getReferenceName('biz_type');
Returns: string(13) "Business type" @throws object phpadddict_Error updateReference($oldRefID,$newRefID,$newName)Updates dictionary's name and id. Correctly moves all related dictionary's values. @param string $oldRefID Old Dictionary ID Example: $err = $rc->updateReference('biz_type','biz_field','Business Field'); @return void deleteReferenceValue($valID,$langID = 'en')Delete indicated dictionary value @param string $valID Value ID to delete Example: $err = $rc->deleteReferenceValue('mnf'); @throws object phpadddict_Error getValueName($valID,$langID='en')Returns indicated value name @param string $valID Value ID Example: $vName = $rc->getValueName('mnf','en'); Returns: string(13) "Manufacturer" @throws object phpadddict_Error updateReferenceValue($oldValID,$newValID,$newName,$langID='en')Updates indicated dictionary's value @param string $oldValID Old Value ID Example: $err = $rc->updateReferenceValue('mnf','agn','Agent'); @throws object phpadddict_Error deleteLanguage($langID)Delete indicated language @param string $langID Language ID to delete @return voidExample: $err = $rc->deleteLanguage('de'); @throws object phpadddict_Error updateLanguage($oldLangID,$newLangID)Updates language id @param string $oldLangID Old Language ID @return void Example: $err = $rc->updateLanguage('de','fr');@throws object phpadddict_Error Classphpadddict_Error - Handles package errorsExtends PEAR::Error Public Methods
DescriptiongetMessage()Returns error message@return string Error message Example: $errMsg = $err->getMessage(); @access public |
| Home About phpAddDict Screenshots Demo Buy/Order FAQ Documentation Support Service Contact Us Press Center |