本文整理汇总了PHP中unknown_type::getName方法的典型用法代码示例。如果您正苦于以下问题:PHP unknown_type::getName方法的具体用法?PHP unknown_type::getName怎么用?PHP unknown_type::getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类unknown_type
的用法示例。
在下文中一共展示了unknown_type::getName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _addActionsDisplayGroupElement
/**
*
* @param unknown_type $element
*/
private function _addActionsDisplayGroupElement($element)
{
$displayGroup = $this->getDisplayGroup("zfBootstrapFormActions");
if ($displayGroup === null) {
$displayGroup = $this->addDisplayGroup(array($element->getName()), "zfBootstrapFormActions", array("decorators" => array("FormElements", array("HtmlTag", array("tag" => "div", "class" => "actions")))));
} else {
$displayGroup->addElement($element);
}
return $displayGroup;
}
示例2: getCategoryPath
/**
* Get category path
* @param unknown_type $category
*/
public function getCategoryPath($category, $store)
{
$categoryPath = str_replace('/', '_._._', $category->getName()) . '/' . $category->getId();
while ($category->getParentId() > 0) {
$parentCategory = $category->getParentCategory();
$category = Mage::getModel('catalog/category')->setStoreId($store->getId())->load($parentCategory->getId());
if (in_array($category->getId(), $this->allowCategoryIds[$store->getId()])) {
if ($category && $category->getIsActive() && $category->getIncludeInMenu()) {
$categoryPath = str_replace('/', '_._._', $category->getName()) . '/' . $category->getId() . '/' . $categoryPath;
}
}
}
return trim($categoryPath, '/');
}
示例3: getCategoryPath
/**
* Get category path
* @param unknown_type $category
*/
public function getCategoryPath($category, $store)
{
$currentCategory = $category;
$categoryPath = str_replace('/', '_._._', $category->getName()) . '/' . $category->getId();
while ($category->getParentId() > 0) {
$category = $category->getParentCategory();
if (in_array($category->getId(), $this->allowCategoryIds[$store->getId()])) {
$category->setStoreId($store->getId());
$categoryPath = str_replace('/', '_._._', $category->getName()) . '/' . $category->getId() . '/' . $categoryPath;
}
}
return trim($categoryPath, '/');
}
示例4: renderEditFieldFile
/**
* TODO PHPDoc
* Enter description here ...
* @param unknown_type $field
* @param unknown_type $is_multiple
* @param unknown_type $object
* @param unknown_type $template
*/
public function renderEditFieldFile($field, $is_multiple, $object, $template)
{
list($template_block) = def_module::loadTemplates("data/reflection/{$template}", "reflection_field_file");
$regexp = "|^" . CURRENT_WORKING_DIR . "|";
$block_arr = array();
if ($is_multiple) {
//TODO
} else {
$field_name = $field->getName();
$block_arr['attribute:name'] = $field_name;
$block_arr['attribute:title'] = $field->getTitle();
$block_arr['attribute:tip'] = $field->getTip();
$block_arr['attribute:maxsize'] = $this->getAllowedMaxFileSize();
$block_arr['attribute:field_id'] = $field->getId();
$value = $object ? $object->getValue($field->getName()) : "";
if ($value) {
$block_arr['attribute:relative-path'] = $value->getFilePath(true);
$block_arr['node:value'] = $value->getFilePath();
} else {
$block_arr['node:value'] = "";
}
if ($object) {
$block_arr['void:object_id'] = $object->getId();
}
$block_arr['attribute:input_name'] = $object ? "data[" . $object->getId() . "][{$field_name}]" : "data[new][{$field_name}]";
$folder_name = $field_name . '/';
$general_name = "./files/";
if ($value instanceof umiFile) {
if ($value->getIsBroken() == false) {
$value = false;
}
}
if ($value) {
$destination_folder = "." . preg_replace($regexp, "", $value->getDirName());
} else {
$destination_folder = $general_name . (is_dir($general_name . $folder_name) ? $folder_name : '');
}
$block_arr['attribute:destination-folder'] = $destination_folder;
}
return def_module::parseTemplate($template_block, $block_arr);
}
示例5: _getObject
/**
*
* @param unknown_type $rs
*/
private static function _getObject($rs)
{
$ret = new User();
$ret->setAvatar($rs->getAvatar());
$ret->setCos($rs->getCos());
$ret->setCreationDate($rs->getCreationDate());
$ret->setEmail($rs->getEmail());
$ret->setEnabled($rs->getEnabled());
$ret->setId($rs->getId());
$ret->setName($rs->getName());
$ret->setUsername($rs->getUsername());
//
// The following is a workaround on the fact that the translation of this
// serialized object to the database gets all broken, due to the fact of PHP
// introducing NULL bytes around the '*' that is prepended before protected
// variable members, in the serialized mode. This method replaces those
// problematic NULL bytes with an identifier string '~~NULL_BYTE~~',
// rendering serialization and unserialization of these specific kinds of
// object safe. Credits to travis@travishegner.com on:
// http://pt.php.net/manual/en/function.serialize.php#96504
//
$unsafeSerializedNotifications = str_replace(CINTIENT_NULL_BYTE_TOKEN, "", $rs->getNotifications());
if (($notifications = unserialize($unsafeSerializedNotifications)) === false) {
$notifications = array();
}
$ret->setNotifications($notifications);
$ret->resetSignature();
return $ret;
}