本文整理汇总了PHP中unknown::getName方法的典型用法代码示例。如果您正苦于以下问题:PHP unknown::getName方法的具体用法?PHP unknown::getName怎么用?PHP unknown::getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类unknown
的用法示例。
在下文中一共展示了unknown::getName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructs a new placeholder class and use the object to fill
* the placeholder with.
*
* @param unknown $object
*/
public function __construct($object, $begin = "<<", $end = ">>")
{
$replace = array();
if ($object instanceof Part) {
$replace = array('id' => $object->getId(), 'barcodeId' => $object->getId() * 10 + 1, 'name' => $object->getName(), 'internalNumber' => $object->getInternalPartNumber(), 'description' => $object->getDescription(), 'categoryFull' => $object->getCategory()->getCategoryPath(), 'categoryLast' => $object->getCategory()->getName(), 'footprintName' => $object->getFootprint() === null ? '' : $object->getFootprint()->getName(), 'storageLocationName' => $object->getStorageLocation() === null ? '' : $object->getStorageLocation()->getName());
} else {
if ($object instanceof StorageLocation) {
$replace = array('id' => $object->getId(), 'barcodeId' => $object->getId() * 10 + 2, 'name' => $object->getName());
}
}
$this->beginToken = $begin;
$this->endToken = $end;
$this->replacements = $replace;
}
示例2: hydrateObjectForm
/**
* Hydrate the update form for this object, before passing it to the update template
*
* @param unknown $object
*/
protected function hydrateObjectForm($object)
{
$data = array('name' => $object->getName());
return new AreaModificationForm($this->getRequest(), 'form', $data);
}
示例3: getProductItem
/**
*
* @param unknown $item
* @return Customweb_Payment_Authorization_IInvoiceItem
*/
public function getProductItem($item, $useBaseCurrency = false)
{
if ($item instanceof Mage_Sales_Model_Order_Item || $item instanceof Mage_Sales_Model_Quote_Item) {
$orderItem = $item;
} else {
$orderItem = $item->getOrderItem();
}
$sku = $item->getSku();
$name = $item->getName();
$taxRate = $orderItem->getTaxPercent();
$quantity = $item->getQty();
if (!$quantity) {
$quantity = $orderItem->getQtyOrdered();
}
if ($useBaseCurrency) {
$amountIncludingTax = $item->getBaseRowTotalInclTax();
} else {
$amountIncludingTax = $item->getRowTotalInclTax();
}
$type = Customweb_Payment_Authorization_IInvoiceItem::TYPE_PRODUCT;
$invoiceItem = new Customweb_Payment_Authorization_DefaultInvoiceItem($sku, $name, (double) $taxRate, (double) $amountIncludingTax, (double) $quantity, $type);
return $invoiceItem;
}
示例4: prepareIndexProgressMessage
/**
* Prepare index progress message
* @param unknown $store
* @param int $totalMagentoProductsByStore
* @param boolean $update
*/
public function prepareIndexProgressMessage($store, $totalMagentoProductsByStore, $update = false)
{
if ($update) {
$this->messages[] = Mage::helper('solrsearch')->__('Posted %s/%s/%s products to Solr', $this->totalFetchedProducts, $totalMagentoProductsByStore, $this->totalMagentoProducts);
} else {
$this->messages[] = Mage::helper('solrsearch')->__('Posted %s/%s products to Solr', $this->totalFetchedProducts, $this->totalMagentoProducts);
}
$this->messages[] = Mage::helper('solrsearch')->__('Current Solr indexed: %s documents/%s products', $this->totalSolrDocuments, $this->totalMagentoProducts);
$this->messages[] = Mage::helper('solrsearch')->__('Progress: %s', $this->percent . '%');
$this->messages[] = Mage::helper('solrsearch')->__('Current store: %s(%s/%s products)', $store->getName(), $this->totalFetchedProductsByStore, $totalMagentoProductsByStore);
$this->response['remaintime'] = $this->calculateRemainTime();
$this->messages[] = Mage::helper('solrsearch')->__('Continue...');
$this->messages[] = Mage::helper('solrsearch')->__('------------------------------------------------');
}