本文整理汇总了PHP中Resource::loadMessage方法的典型用法代码示例。如果您正苦于以下问题:PHP Resource::loadMessage方法的具体用法?PHP Resource::loadMessage怎么用?PHP Resource::loadMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Resource
的用法示例。
在下文中一共展示了Resource::loadMessage方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: readMetadata
/**
* Read Metadata from xml array
*
* @param array $xmlArr
* @return void
*/
protected function readMetadata(&$xmlArr)
{
parent::readMetaData($xmlArr);
$this->m_Name = $this->prefixPackage($this->m_Name);
$this->m_Title = isset($xmlArr["EASYVIEW"]["ATTRIBUTES"]["TITLE"]) ? $xmlArr["EASYVIEW"]["ATTRIBUTES"]["TITLE"] : null;
$this->m_Keywords = isset($xmlArr["EASYVIEW"]["ATTRIBUTES"]["KEYWORDS"]) ? $xmlArr["EASYVIEW"]["ATTRIBUTES"]["KEYWORDS"] : null;
$this->m_TemplateEngine = isset($xmlArr["EASYVIEW"]["ATTRIBUTES"]["TEMPLATEENGINE"]) ? $xmlArr["EASYVIEW"]["ATTRIBUTES"]["TEMPLATEENGINE"] : null;
$this->m_TemplateFile = isset($xmlArr["EASYVIEW"]["ATTRIBUTES"]["TEMPLATEFILE"]) ? $xmlArr["EASYVIEW"]["ATTRIBUTES"]["TEMPLATEFILE"] : null;
$this->m_ViewSet = isset($xmlArr["EASYVIEW"]["ATTRIBUTES"]["VIEWSET"]) ? $xmlArr["EASYVIEW"]["ATTRIBUTES"]["VIEWSET"] : null;
$this->m_Tab = isset($xmlArr["EASYVIEW"]["ATTRIBUTES"]["TAB"]) ? $xmlArr["EASYVIEW"]["ATTRIBUTES"]["TAB"] : null;
$this->m_FormRefs = new MetaIterator($xmlArr["EASYVIEW"]["FORMREFERENCES"]["REFERENCE"], "FormReference", $this);
if ($xmlArr["EASYVIEW"]["FORMREFERENCELIBS"]) {
$this->m_FormRefLibs = new MetaIterator($xmlArr["EASYVIEW"]["FORMREFERENCELIBS"]["REFERENCE"], "FormReference", $this);
}
$this->m_MessageFile = isset($xmlArr["EASYVIEW"]["ATTRIBUTES"]["MESSAGEFILE"]) ? $xmlArr["EASYVIEW"]["ATTRIBUTES"]["MESSAGEFILE"] : null;
$this->m_Messages = Resource::loadMessage($this->m_MessageFile);
$this->m_CacheLifeTime = isset($xmlArr["EASYVIEW"]["ATTRIBUTES"]["CACHELIFETIME"]) ? $xmlArr["EASYVIEW"]["ATTRIBUTES"]["CACHELIFETIME"] : "0";
$this->readTile($xmlArr);
// TODO: is this needed as title supports expression?
if (empty($this->m_Title)) {
$this->m_Title = $this->m_Description;
}
$this->translate();
// translate for multi-language support
}
示例2: readMetaData
protected function readMetaData($xmlArr)
{
$this->m_RequireAuth = isset($xmlArr["PLUGINSERVICE"]["ATTRIBUTES"]["REQUIREAUTH"]) ? $xmlArr["PLUGINSERVICE"]["ATTRIBUTES"]["REQUIREAUTH"] : 'N';
$this->m_RequireAuth = strtoupper($this->m_RequireAuth);
$this->m_PublicMethods = new MetaIterator($xmlArr["PLUGINSERVICE"]["PUBLICMETHOD"], "PublicMethod", $this);
$this->m_MessageFile = isset($xmlArr["PLUGINSERVICE"]["ATTRIBUTES"]["MESSAGEFILE"]) ? $xmlArr["PLUGINSERVICE"]["ATTRIBUTES"]["MESSAGEFILE"] : null;
$this->m_Messages = Resource::loadMessage($this->m_MessageFile);
}
示例3: readMetadata
/**
* Read Metadata from xml array
*
* @param array $xmlArr
* @return void
*/
protected function readMetadata(&$xmlArr)
{
parent::readMetaData($xmlArr);
$this->m_InheritFrom = isset($xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["INHERITFROM"]) ? $xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["INHERITFROM"] : null;
$this->m_SearchRule = isset($xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["SEARCHRULE"]) ? $xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["SEARCHRULE"] : null;
$this->m_BaseSearchRule = $this->m_SearchRule;
$this->m_SortRule = isset($xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["SORTRULE"]) ? $xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["SORTRULE"] : null;
$this->m_BaseSortRule = $this->m_SortRule;
$this->m_OtherSQLRule = isset($xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["OTHERSQLRULE"]) ? $xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["OTHERSQLRULE"] : null;
$this->m_BaseOtherSQLRule = $this->m_OtherSQLRule;
$this->m_AccessRule = isset($xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["ACCESSRULE"]) ? $xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["ACCESSRULE"] : null;
$this->m_UpdateCondition = isset($xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["UPDATECONDITION"]) ? $xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["UPDATECONDITION"] : null;
$this->m_DeleteCondition = isset($xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["DELETECONDITION"]) ? $xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["DELETECONDITION"] : null;
$this->m_Database = isset($xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["DBNAME"]) ? $xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["DBNAME"] : null;
if ($this->m_Database == null) {
$this->m_Database = "Default";
}
$this->m_MainTable = isset($xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["TABLE"]) ? $xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["TABLE"] : null;
$this->m_IdGeneration = isset($xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["IDGENERATION"]) ? $xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["IDGENERATION"] : null;
$this->m_Stateless = isset($xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["STATELESS"]) ? $xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["STATELESS"] : null;
// read in uniqueness attribute
$this->m_Uniqueness = isset($xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["UNIQUENESS"]) ? $xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["UNIQUENESS"] : null;
$this->m_CacheLifeTime = isset($xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["CACHELIFETIME"]) ? $xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["CACHELIFETIME"] : "0";
$this->m_Name = $this->prefixPackage($this->m_Name);
$this->m_InheritFrom = $this->prefixPackage($this->m_InheritFrom);
// build BizRecord
$this->m_BizRecord = new BizRecord($xmlArr["BIZDATAOBJ"]["BIZFIELDLIST"]["BIZFIELD"], "BizField", $this);
// build TableJoins
$this->m_TableJoins = new MetaIterator($xmlArr["BIZDATAOBJ"]["TABLEJOINS"]["JOIN"], "TableJoin", $this);
// build ObjReferences
$this->m_ObjReferences = new MetaIterator($xmlArr["BIZDATAOBJ"]["OBJREFERENCES"]["OBJECT"], "ObjReference", $this);
// read in parameters
$this->m_Parameters = new MetaIterator($xmlArr["BIZDATAOBJ"]["PARAMETERS"]["PARAMETER"], "Parameter");
$this->m_MessageFile = isset($xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["MESSAGEFILE"]) ? $xmlArr["BIZDATAOBJ"]["ATTRIBUTES"]["MESSAGEFILE"] : null;
$this->m_Messages = Resource::loadMessage($this->m_MessageFile, $this->m_Package);
}
示例4: inheritParentObj
/**
* Inherit from parent object. Name, Package, Class cannot be inherited
*
* @return void
*/
protected function inheritParentObj()
{
if (!$this->m_InheritFrom) {
return;
}
$parentObj = BizSystem::getObject($this->m_InheritFrom);
$this->m_Title = $this->m_Title ? $this->m_Title : $parentObj->m_Title;
$this->m_Icon = $this->m_Icon ? $this->m_Icon : $parentObj->m_Icon;
$this->m_Description = $this->m_Description ? $this->m_Description : $parentObj->m_Description;
$this->m_jsClass = $this->m_jsClass ? $this->m_jsClass : $parentObj->m_jsClass;
$this->m_Height = $this->m_Height ? $this->m_Height : $parentObj->m_Height;
$this->m_Width = $this->m_Width ? $this->m_Width : $parentObj->m_Width;
$this->m_DefaultForm = $this->m_DefaultForm ? $this->m_DefaultForm : $parentObj->m_DefaultForm;
$this->m_TemplateEngine = $this->m_TemplateEngine ? $this->m_TemplateEngine : $parentObj->m_TemplateEngine;
$this->m_TemplateFile = $this->m_TemplateFile ? $this->m_TemplateFile : $parentObj->m_TemplateFile;
$this->m_FormType = $this->m_FormType ? $this->m_FormType : $parentObj->m_FormType;
$this->m_Range = $this->m_Range ? $this->m_Range : $parentObj->m_Range;
$this->m_FixSearchRule = $this->m_FixSearchRule ? $this->m_FixSearchRule : $parentObj->m_FixSearchRule;
$this->m_DefaultFixSearchRule = $this->m_DefaultFixSearchRule ? $this->m_DefaultFixSearchRule : $parentObj->m_DefaultFixSearchRule;
$this->m_DataObjName = $this->m_DataObjName ? $this->m_DataObjName : $parentObj->m_DataObjName;
$this->m_DirectMethodList = $this->m_DirectMethodList ? $this->m_DirectMethodList : $parentObj->m_DirectMethodList;
$this->m_EventName = $this->m_EventName ? $this->m_EventName : $parentObj->m_EventName;
$this->m_MessageFile = $this->m_MessageFile ? $this->m_MessageFile : $parentObj->m_MessageFile;
$this->m_Messages = Resource::loadMessage($this->m_MessageFile, $this->m_Package);
$this->m_CacheLifeTime = $this->m_CacheLifeTime ? $this->m_CacheLifeTime : $parentObj->m_CacheLifeTime;
$this->m_CurrentPage = $this->m_CurrentPage ? $this->m_CurrentPage : $parentObj->m_CurrentPage;
$this->m_StartItem = $this->m_StartItem ? $this->m_StartItem : $parentObj->m_StartItem;
$this->m_DataPanel->merge($parentObj->m_DataPanel);
$this->m_ActionPanel->merge($parentObj->m_ActionPanel);
$this->m_NavPanel->merge($parentObj->m_NavPanel);
$this->m_SearchPanel->merge($parentObj->m_SearchPanel);
if ($this->m_DataPanel->current()) {
foreach ($this->m_DataPanel as $elem) {
$elem->adjustFormName($this->m_Name);
}
}
if ($this->m_ActionPanel->current()) {
foreach ($this->m_ActionPanel as $elem) {
$elem->adjustFormName($this->m_Name);
}
}
if ($this->m_NavPanel->current()) {
foreach ($this->m_NavPanel as $elem) {
$elem->adjustFormName($this->m_Name);
}
}
if ($this->m_SearchPanel->current()) {
foreach ($this->m_SearchPanel as $elem) {
$elem->adjustFormName($this->m_Name);
}
}
$this->m_Panels = array($this->m_DataPanel, $this->m_ActionPanel, $this->m_NavPanel, $this->m_SearchPanel);
}
示例5: readMetaData
protected function readMetaData($xmlArr)
{
$this->m_logDataObj = $xmlArr["PLUGINSERVICE"]["ATTRIBUTES"]["BIZDATAOBJ"];
$this->m_MessageFile = isset($xmlArr["PLUGINSERVICE"]["ATTRIBUTES"]["MESSAGEFILE"]) ? $xmlArr["PLUGINSERVICE"]["ATTRIBUTES"]["MESSAGEFILE"] : null;
$this->m_Messages = Resource::loadMessage($this->m_MessageFile, "eventlog.");
}
示例6: readMetadata
/**
* Read array meta data, and store to meta object
*
* @param array $xmlArr
* @return void
*/
protected function readMetadata(&$xmlArr)
{
parent::readMetaData($xmlArr);
$this->m_Title = isset($xmlArr["EASYFORM"]["ATTRIBUTES"]["TITLE"]) ? $xmlArr["EASYFORM"]["ATTRIBUTES"]["TITLE"] : null;
$this->m_Title = Expression::evaluateExpression($this->m_Title, $this);
$this->m_Icon = isset($xmlArr["EASYFORM"]["ATTRIBUTES"]["ICON"]) ? $xmlArr["EASYFORM"]["ATTRIBUTES"]["ICON"] : null;
$this->m_Description = isset($xmlArr["EASYFORM"]["ATTRIBUTES"]["DESCRIPTION"]) ? $xmlArr["EASYFORM"]["ATTRIBUTES"]["DESCRIPTION"] : null;
$this->m_jsClass = isset($xmlArr["EASYFORM"]["ATTRIBUTES"]["JSCLASS"]) ? $xmlArr["EASYFORM"]["ATTRIBUTES"]["JSCLASS"] : null;
$this->m_Height = isset($xmlArr["EASYFORM"]["ATTRIBUTES"]["HEIGHT"]) ? $xmlArr["EASYFORM"]["ATTRIBUTES"]["HEIGHT"] : null;
$this->m_Width = isset($xmlArr["EASYFORM"]["ATTRIBUTES"]["WIDTH"]) ? $xmlArr["EASYFORM"]["ATTRIBUTES"]["WIDTH"] : null;
$this->m_DefaultForm = isset($xmlArr["EASYFORM"]["ATTRIBUTES"]["DEFAULTFORM"]) ? $xmlArr["EASYFORM"]["ATTRIBUTES"]["DEFAULTFORM"] : null;
$this->m_TemplateEngine = isset($xmlArr["EASYFORM"]["ATTRIBUTES"]["TEMPLATEENGINE"]) ? $xmlArr["EASYFORM"]["ATTRIBUTES"]["TEMPLATEENGINE"] : null;
$this->m_TemplateFile = isset($xmlArr["EASYFORM"]["ATTRIBUTES"]["TEMPLATEFILE"]) ? $xmlArr["EASYFORM"]["ATTRIBUTES"]["TEMPLATEFILE"] : null;
$this->m_FormType = isset($xmlArr["EASYFORM"]["ATTRIBUTES"]["FORMTYPE"]) ? $xmlArr["EASYFORM"]["ATTRIBUTES"]["FORMTYPE"] : null;
$this->m_Range = isset($xmlArr["EASYFORM"]["ATTRIBUTES"]["PAGESIZE"]) ? $xmlArr["EASYFORM"]["ATTRIBUTES"]["PAGESIZE"] : $this->m_Range;
$this->m_FixSearchRule = isset($xmlArr["EASYFORM"]["ATTRIBUTES"]["SEARCHRULE"]) ? $xmlArr["EASYFORM"]["ATTRIBUTES"]["SEARCHRULE"] : null;
$this->m_DefaultFixSearchRule = isset($xmlArr["EASYFORM"]["ATTRIBUTES"]["SEARCHRULE"]) ? $xmlArr["EASYFORM"]["ATTRIBUTES"]["SEARCHRULE"] : null;
$this->m_Name = $this->prefixPackage($this->m_Name);
$this->m_DataObjName = $this->prefixPackage($xmlArr["EASYFORM"]["ATTRIBUTES"]["BIZDATAOBJ"]);
if (isset($xmlArr["EASYFORM"]["ATTRIBUTES"]["DIRECTMETHOD"])) {
$this->m_DirectMethodList = explode(",", strtolower(str_replace(" ", "", $xmlArr["EASYFORM"]["ATTRIBUTES"]["DIRECTMETHOD"])));
}
$this->m_DataPanel = new Panel($xmlArr["EASYFORM"]["DATAPANEL"]["ELEMENT"], "", $this);
$this->m_ActionPanel = new Panel($xmlArr["EASYFORM"]["ACTIONPANEL"]["ELEMENT"], "", $this);
$this->m_NavPanel = new Panel($xmlArr["EASYFORM"]["NAVPANEL"]["ELEMENT"], "", $this);
$this->m_SearchPanel = new Panel($xmlArr["EASYFORM"]["SEARCHPANEL"]["ELEMENT"], "", $this);
$this->m_Panels = array($this->m_DataPanel, $this->m_ActionPanel, $this->m_NavPanel, $this->m_SearchPanel);
$this->m_FormType = strtoupper($this->m_FormType);
$this->m_EventName = isset($xmlArr["EASYFORM"]["ATTRIBUTES"]["EVENTNAME"]) ? $xmlArr["EASYFORM"]["ATTRIBUTES"]["EVENTNAME"] : null;
$this->m_MessageFile = isset($xmlArr["EASYFORM"]["ATTRIBUTES"]["MESSAGEFILE"]) ? $xmlArr["EASYFORM"]["ATTRIBUTES"]["MESSAGEFILE"] : null;
$this->m_Messages = Resource::loadMessage($this->m_MessageFile, $this->m_Package);
$this->m_CacheLifeTime = isset($xmlArr["EASYFORM"]["ATTRIBUTES"]["CACHELIFETIME"]) ? $xmlArr["EASYFORM"]["ATTRIBUTES"]["CACHELIFETIME"] : "0";
$this->m_CurrentPage = isset($xmlArr["EASYFORM"]["ATTRIBUTES"]["STARTPAGE"]) ? $xmlArr["EASYFORM"]["ATTRIBUTES"]["STARTPAGE"] : 1;
$this->m_StartItem = isset($xmlArr["EASYFORM"]["ATTRIBUTES"]["STARTITEM"]) ? $xmlArr["EASYFORM"]["ATTRIBUTES"]["STARTITEM"] : 1;
// parse access
if ($this->m_Access) {
$arr = explode(".", $this->m_Access);
$this->m_Resource = $arr[0];
}
if ($this->m_jsClass == "jbForm" && $this->m_FormType == "LIST") {
$this->m_jsClass = "Openbiz.TableForm";
}
if ($this->m_jsClass == "jbForm") {
$this->m_jsClass = "Openbiz.Form";
}
$this->translate();
// translate for multi-language support
}