• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP unknown_type类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中unknown_type的典型用法代码示例。如果您正苦于以下问题:PHP unknown_type类的具体用法?PHP unknown_type怎么用?PHP unknown_type使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了unknown_type类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: smarty_function_sugar_replace_vars

/**
 * This function will replace fields taken from the fields variable
 * and insert them into the passed string replacing [variableName] 
 * tokens where found.
 *
 * @param unknown_type $params
 * @param unknown_type $smarty
 * @return unknown
 */
function smarty_function_sugar_replace_vars($params, &$smarty)
{
    if (empty($params['subject'])) {
        $smarty->trigger_error("sugarvar: missing 'subject' parameter");
        return;
    }
    $fields = $smarty->get_template_vars('fields');
    $subject = $params['subject'];
    $matches = array();
    $count = preg_match_all('/\\[([^\\]]*)\\]/', $subject, $matches);
    for ($i = 0; $i < $count; $i++) {
        $match = $matches[1][$i];
        if (!empty($fields[$match]) && isset($fields[$match]['value'])) {
            $value = $fields[$match]['value'];
            if (isset($fields[$match]['type']) && $fields[$match]['type'] == 'enum' && isset($fields[$match]['options']) && isset($fields[$match]['options'][$value])) {
                $subject = str_replace($matches[0][$i], $fields[$match]['options'][$value], $subject);
            } else {
                $subject = str_replace($matches[0][$i], $value, $subject);
            }
        }
    }
    if (!empty($params['assign'])) {
        $smarty->assign($params['assign'], $subject);
        return '';
    }
    return $subject;
}
开发者ID:klr2003,项目名称:sourceread,代码行数:36,代码来源:function.sugar_replace_vars.php


示例2: array

 /**
  * Generated all outputformats
  *
  * @param unknown_type $objectVersion
  * @return array
  */
 function getAllOutputFormatTextByContentObjectVersion($objectVersion, $forceSettingImageIncludeTo = -1)
 {
     $outputFormatTextArray = array();
     $dataMap = $objectVersion->attribute('data_map');
     $editionAttribute = $dataMap['newsletter_edition'];
     $editionAttributeContent = $editionAttribute->attribute('content');
     $listAttributeContent = $editionAttributeContent->attribute('list_attribute_content');
     $outputFormatArray = $listAttributeContent->attribute('output_format_array');
     $mainSiteAccess = $listAttributeContent->attribute('main_siteaccess');
     $skinName = $listAttributeContent->attribute('skin_name');
     $editionContentObjectId = $objectVersion->attribute('contentobject_id');
     $versionId = $objectVersion->attribute('version');
     $emailSender = $listAttributeContent->attribute('email_sender');
     $emailSenderName = $listAttributeContent->attribute('email_sender_name');
     $emailReplyTo = $listAttributeContent->attribute('email_reply_to');
     $emailReturnPath = $listAttributeContent->attribute('email_return_path');
     foreach ($outputFormatArray as $outputFormatId => $outputName) {
         $newsletterContentArray = CjwNewsletterEdition::getOutput($editionContentObjectId, $versionId, $outputFormatId, $mainSiteAccess, $skinName, $forceSettingImageIncludeTo);
         $newsletterContentArray['email_sender'] = $emailSender;
         $newsletterContentArray['email_sender_name'] = $emailSenderName;
         $newsletterContentArray['email_reply_to'] = $emailReplyTo;
         $newsletterContentArray['email_return_path'] = $emailReturnPath;
         $outputFormatTextArray[$outputName] = $newsletterContentArray;
     }
     return $outputFormatTextArray;
 }
开发者ID:hudri,项目名称:cjw_newsletter,代码行数:32,代码来源:cjwnewslettermail.php


示例3: createFacebookLikePoints

 /**
  * Creates customer points transfers
  *
  * @param unknown_type $customer
  * @param unknown_type $like_id
  * @param unknown_type $rule
  * @return unknown
  */
 public function createFacebookLikePoints($customer, $like_id, $rule)
 {
     $num_points = $rule->getPointsAmount();
     $currency_id = $rule->getPointsCurrencyId();
     $rule_id = $rule->getId();
     $transfer = $this->initTransfer($num_points, $currency_id, $rule_id);
     $store = $customer->getStore();
     if (!$transfer) {
         return false;
     }
     //get On-Hold initial status override
     if ($rule->getOnholdDuration() > 0) {
         $transfer->setEffectiveStart(date('Y-m-d H:i:s', strtotime("+{$rule->getOnholdDuration()} days")))->setStatus(null, TBT_Rewards_Model_Transfer_Status::STATUS_PENDING_TIME);
     } else {
         //get the default starting status
         $initial_status = Mage::getStoreConfig('rewards/InitialTransferStatus/AfterFacebookLike', $store);
         if (!$transfer->setStatus(null, $initial_status)) {
             return false;
         }
     }
     // Translate the message through the core translation engine (nto the store view system) in case people want to use that instead
     // This is not normal, but we found that a lot of people preferred to use the standard translation system insteaed of the
     // store view system so this lets them use both.
     $initial_transfer_msg = Mage::getStoreConfig('rewards/transferComments/facebookLike', $store);
     $comments = Mage::helper('rewards')->__($initial_transfer_msg);
     $this->setFacebookLikeId($like_id)->setComments($comments)->setCustomerId($customer->getId())->save();
     return true;
 }
开发者ID:rajarshc,项目名称:Rooja,代码行数:36,代码来源:Transfer.php


示例4: notify

 /**
  * Notify Event Handler
  *
  * @param 	unknown_type $event
  * @access 	public
  */
 function notify($event)
 {
     if ($event->get('source')) {
         $s = owa_coreAPI::entityFactory('base.source_dim');
         $new_id = $s->generateId(trim(strtolower($event->get('source'))));
         $s->getByPk('id', $new_id);
         $id = $s->get('id');
         if (!$id) {
             $s->set('id', $new_id);
             $s->set('source_domain', $event->get('source'));
             $ret = $s->create();
             if ($ret) {
                 return OWA_EHS_EVENT_HANDLED;
             } else {
                 return OWA_EHS_EVENT_FAILED;
             }
         } else {
             owa_coreAPI::debug('Not Persisting. Source already exists.');
             return OWA_EHS_EVENT_HANDLED;
         }
     } else {
         owa_coreAPI::debug('Noting to handle. No source properties found on event.');
         return OWA_EHS_EVENT_HANDLED;
     }
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:31,代码来源:sourceHandlers.php


示例5: filterCheckAdmin

 /**
  *
  * 过滤器
  * @param unknown_type $filterChain
  */
 public function filterCheckAdmin($filterChain)
 {
     //未登录,跳转
     if (!($uid = $this->isAdmin())) {
         $this->redirect(Yii::app()->baseUrl . "/");
     }
     //获取用户详细资料
     $adminModel = new AdminModel();
     $this->_userInfo = $adminModel->getInfoByUid($uid);
     $this->username = $this->_userInfo['username'];
     $this->hospital = $this->_userInfo['hospital'];
     $this->role = $this->_userInfo['role'];
     //账号错误
     if (!$this->_userInfo) {
         $this->_output("302", 'access deny', 'text');
     }
     $roleModel = new RoleModel();
     $role = $roleModel->getInfoByCode($this->_userInfo['role']);
     if ($role && $role['permission']) {
         $permission = explode(',', $role['permission']);
         //生成菜单
         $menuModel = new MenuModel();
         $this->menus = $menuModel->getInfoByGroup($permission);
         foreach ($this->menus as $key => $value) {
             $this->menuGroup[$value['group']] = $value['group'];
         }
     } else {
         header("HTTP/1.1 401");
         exit;
     }
     $filterChain->run();
 }
开发者ID:FlynnFang,项目名称:cyfyy,代码行数:37,代码来源:Admin.php


示例6: payForShippingWithPoints

 /**
  * @deprecated unused
  * Enter description here ...
  * @param unknown_type $observer
  */
 public function payForShippingWithPoints($observer)
 {
     $this->setRequest($observer->getControllerAction()->getRequest());
     $pay_for_shipping_with_points = $this->getRequest()->getParam('pay_for_shipping_with_points', '');
     if ($pay_for_shipping_with_points) {
         $quote = Mage::getSingleton('rewards/session')->getQuote();
         $shipaddr = $quote->getShippingAddress();
         $total_shipping_value = $shipaddr->getShippingAmount();
         $current_points_spending = Mage::getSingleton('rewards/session')->getPointsSpending();
         Mage::log("Paying for shipping with points...");
         $rule_ids = explode(',', $quote->getAppliedRedemptions());
         foreach ($rule_ids as $rid) {
             $salesrule = Mage::helper('rewards/transfer')->getSalesRule($rid);
             if ($salesrule->getPointsAction() != 'discount_by_points_spent') {
                 continue;
             }
             if (!$salesrule->getDiscountAmount()) {
                 continue;
             }
             // discount amount should not be empty (so we dont divide by zero)
             Mage::log("Points step according to quote is {$quote->getPointsStep()}");
             if ($salesrule->getPointsAmount() == $quote->getPointsStep()) {
                 $uses_to_zero_shipping = ceil($total_shipping_value / $salesrule->getDiscountAmount());
                 Mage::getSingleton('rewards/session')->setPointsSpending($uses_to_zero_shipping + $current_points_spending);
                 Mage::log("Added {$uses_to_zero_shipping} to existing points uage of {$current_points_spending}");
                 break;
             }
         }
     }
     return $this;
 }
开发者ID:rajarshc,项目名称:Rooja,代码行数:36,代码来源:Onepage.php


示例7: notify

 /**
  * Notify Event Handler
  *
  * @param 	unknown_type $event
  * @access 	public
  */
 function notify($event)
 {
     if ($event->get('ad')) {
         $d = owa_coreAPI::entityFactory('base.ad_dim');
         $new_id = $d->generateId(trim(strtolower($event->get('ad'))));
         $d->getByPk('id', $new_id);
         $id = $d->get('id');
         if (!$id) {
             $d->set('id', $new_id);
             $d->set('name', trim(strtolower($event->get('ad'))));
             $d->set('type', trim(strtolower($event->get('ad_type'))));
             $ret = $d->create();
             if ($ret) {
                 return OWA_EHS_EVENT_HANDLED;
             } else {
                 return OWA_EHS_EVENT_FAILED;
             }
         } else {
             owa_coreAPI::debug('Not Persisting. Ad already exists.');
             return OWA_EHS_EVENT_HANDLED;
         }
     } else {
         owa_coreAPI::debug('Noting to handle. No Ad properties found on event.');
         return OWA_EHS_EVENT_HANDLED;
     }
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:32,代码来源:adHandlers.php


示例8: getSyntenyRegionIDs

/**
 * 
 * Enter description here ...
 * @param unknown_type $db
 * @param array $bp start ende chr ens_species 
 */
function getSyntenyRegionIDs($db, $bp)
{
    $species = strtolower($bp[3]);
    if ($species == 'mus_musculus') {
        $genome_db_id = 57;
    } elseif ($species == 'rattus_norvegicus') {
        $genome_db_id = 3;
    } elseif ($species == 'homo_sapiens') {
        $genome_db_id = 90;
    }
    $sqlDnafrag = 'SELECT dfr.synteny_region_id FROM dnafrag_region as dfr INNER JOIN 
	dnafrag as df ON (dfr.dnafrag_start <= ' . $bp[1] . ' AND 
	dfr.dnafrag_end >= ' . $bp[0] . ' AND 
	dfr.dnafrag_id = df.dnafrag_id AND 
	df.name = "' . $bp[2] . '" AND 
	df.genome_db_id = ' . $genome_db_id . ');';
    $fragQuery = $db->query($sqlDnafrag) or fatal_error('Query failed: ' . $db->error);
    //$frag_table = $fragQuery->fetch_all();
    $str = "";
    $first = true;
    while ($row = $fragQuery->fetch_assoc()) {
        if ($first) {
            $str .= $row['synteny_region_id'];
            $first = false;
        } else {
            $str .= "," . $row['synteny_region_id'];
        }
    }
    $fragQuery->close();
    return $str;
}
开发者ID:BackupTheBerlios,项目名称:eqtl,代码行数:37,代码来源:func_analysis.php


示例9: addLesson

 /**
  * 添加一个lesson
  * @param unknown_type $lesson
  */
 public function addLesson($lesson)
 {
     $owner = $this->getOwner();
     $lesson->userId = Yii::app()->user->id;
     $lesson->courseId = $owner->id;
     $lesson->addTime = time();
     //处理外链类型的视频
     if ($lesson->mediaSource && $lesson->mediaSource != "self" && $lesson->mediaSource != "cloud" && $lesson->mediaType != "text") {
         if (strpos($lesson->mediaUri, 'http://') !== 0) {
             $lesson->mediaUri = 'http://' . $lesson->mediaUri;
         }
         if (strpos($lesson->mediaUri, '.swf') === false) {
             Yii::import('ext.videolink.VideoLink');
             $video = new VideoLink();
             $result = $video->parse($lesson->mediaUri);
             if ($result) {
                 $lesson->mediaUri = $result['swf'];
                 $lesson->mediaSource = $result['source'];
                 $lesson->mediaName = $result['title'];
                 $lesson->mediaType = "video";
             }
         }
     }
     if (!$lesson->title) {
         $lesson->title = $lesson->mediaName;
     }
     $lesson->status = Lesson::STATUS_HIDDEN;
     return $lesson->save();
 }
开发者ID:stan5621,项目名称:jp_edu_online,代码行数:33,代码来源:CourseHelperBehavior.php


示例10: notify

 /**
  * Notify Event Handler
  *
  * @param 	unknown_type $event
  * @access 	public
  */
 function notify($event)
 {
     $terms = trim(strtolower($event->get('search_terms')));
     if ($terms) {
         $st = owa_coreAPI::entityFactory('base.search_term_dim');
         $st_id = owa_lib::setStringGuid($terms);
         $st->getByPk('id', $st_id);
         $id = $st->get('id');
         if (!$id) {
             $st->set('id', $st_id);
             $st->set('terms', $terms);
             $ret = str_replace("", "", $terms, $count);
             $st->set('term_count', $count);
             $ret = $st->create();
             if ($ret) {
                 return OWA_EHS_EVENT_HANDLED;
             } else {
                 return OWA_EHS_EVENT_FAILED;
             }
         } else {
             owa_coreAPI::debug('Not Logging. Search term already exists.');
             return OWA_EHS_EVENT_HANDLED;
         }
     } else {
         return OWA_EHS_EVENT_HANDLED;
     }
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:33,代码来源:searchTermHandlers.php


示例11: getRealShippedQtyForItem

 /**
  * Return real shipped qty for an item
  * Welcome in magento.....
  *
  * @param unknown_type $item
  */
 public function getRealShippedQtyForItem($item)
 {
     //init vars
     $qty = $item->getQty();
     $orderItem = $item->getOrderItem();
     $orderItemParentId = $orderItem->getparent_item_id();
     //define if we have to multiply qty by parent qty
     $mustMultiplyByParentQty = false;
     if ($orderItemParentId > 0) {
         $parentOrderItem = mage::getmodel('sales/order_item')->load($orderItemParentId);
         if ($parentOrderItem->getId()) {
             //if shipped together
             if ($parentOrderItem->getproduct_type() == 'bundle' && !$parentOrderItem->isShipSeparately()) {
                 $mustMultiplyByParentQty = true;
                 $qty = $orderItem->getqty_ordered() / $parentOrderItem->getqty_ordered();
             }
         }
     }
     //if multiply by parent qty
     if ($mustMultiplyByParentQty) {
         $parentShipmentItem = null;
         foreach ($item->getShipment()->getAllItems() as $ShipmentItem) {
             if ($ShipmentItem->getorder_item_id() == $orderItemParentId) {
                 $parentShipmentItem = $ShipmentItem;
             }
         }
         if ($parentShipmentItem) {
             $qty = $qty * $parentShipmentItem->getQty();
         }
     }
     return $qty;
 }
开发者ID:TrygveSkogsholm,项目名称:Magento-Patch,代码行数:38,代码来源:Shipment.php


示例12: initControllerRouters

 /**
  * Override?
  *
  * @param unknown_type $observer
  */
 public function initControllerRouters($observer)
 {
     $front = $observer->getEvent()->getFront();
     /** @var Mage_Core_Controller_Varien_Front $front * */
     $rewards = new TBT_Rewards_Controller_Router();
     //$front->addRouter('rewards', $rewards);
 }
开发者ID:rajarshc,项目名称:Rooja,代码行数:12,代码来源:Router.php


示例13: getObjectType

 /**
  * Return object type
  *
  * @param unknown_type $object
  */
 public function getObjectType($object)
 {
     $retour = '';
     $resourceName = $object->getResourceName();
     $resourceName = strtolower($resourceName);
     return strtolower($resourceName);
 }
开发者ID:xiaoguizhidao,项目名称:devfashion,代码行数:12,代码来源:Data.php


示例14: notify

 /**
  * Notify Event Handler
  *
  * @param 	unknown_type $event
  * @access 	public
  */
 function notify($event)
 {
     $v = owa_coreAPI::entityFactory('base.visitor');
     $v->load($event->get('visitor_id'));
     if (!$v->wasPersisted()) {
         $v->setProperties($event->getProperties());
         // Set Primary Key
         $v->set('id', $event->get('visitor_id'));
         $v->set('first_session_id', $event->get('session_id'));
         $v->set('first_session_year', $event->get('year'));
         $v->set('first_session_month', $event->get('month'));
         $v->set('first_session_day', $event->get('day'));
         $v->set('first_session_dayofyear', $event->get('dayofyear'));
         $v->set('first_session_timestamp', $event->get('timestamp'));
         $ret = $v->create();
         if ($ret) {
             return OWA_EHS_EVENT_HANDLED;
         } else {
             return OWA_EHS_EVENT_FAILED;
         }
     } else {
         owa_coreAPI::debug("Not persisting. Visitor already exists.");
         return OWA_EHS_EVENT_HANDLED;
     }
 }
开发者ID:nishantmendiratta,项目名称:Open-Web-Analytics,代码行数:31,代码来源:visitorHandlers.php


示例15: core_dimensions_after_update

/**
 * @author Ignacio Vazquez - elpepe.uy at gmail.com
 * @param unknown_type $object
 * @param unknown_type $ignored
 */
function core_dimensions_after_update($object, &$ignored)
{
    static $objectsProcessed = array();
    if ($object instanceof Contact && !array_var($objectsProcessed, $object->getId())) {
        $person_dim = Dimensions::findOne(array("conditions" => "`code` = 'feng_persons'"));
        $person_ot = ObjectTypes::findOne(array("conditions" => "`name` = 'person'"));
        $company_ot = ObjectTypes::findOne(array("conditions" => "`name` = 'company'"));
        $members = Members::findByObjectId($object->getId(), $person_dim->getId());
        if (count($members) == 1) {
            /* @var $member Member */
            $member = $members[0];
            $member->setName($object->getObjectName());
            $parent_member_id = $member->getParentMemberId();
            $depth = $member->getDepth();
            if ($object->getCompanyId() > 0) {
                $pmember = Members::findOne(array('conditions' => '`object_id` = ' . $object->getCompanyId() . ' AND `object_type_id` = ' . $company_ot->getId() . ' AND `dimension_id` = ' . $person_dim->getId()));
                $member->setParentMemberId($pmember->getId());
                $member->setDepth($pmember->getDepth() + 1);
            } else {
                //Is first level
                $member->setDepth(1);
                $member->setParentMemberId(0);
            }
            $object->modifyMemberValidations($member);
            $member->save();
            // reload only if not disabling or enabling user
            if (!(array_var($_REQUEST, 'c') == 'account' && (array_var($_REQUEST, 'a') == 'disable' || array_var($_REQUEST, 'a') == 'restore_user'))) {
                evt_add("reload dimension tree", $member->getDimensionId());
            }
            $objectsProcessed[$object->getId()] = true;
        }
    }
}
开发者ID:rorteg,项目名称:fengoffice,代码行数:38,代码来源:core_dimensions_hooks.php


示例16: bp_em_record_activity_event_save

/**
 * Records new events to the activity stream.
 * @param unknown_type $result
 * @param unknown_type $EM_Event
 * @return unknown
 */
function bp_em_record_activity_event_save($result, $EM_Event)
{
    if ($result && $EM_Event->status == 1 && ($EM_Event->previous_status == 0 || !empty($EM_Event->is_new))) {
        $user = get_userdata($EM_Event->owner);
        bp_em_record_activity(array('user_id' => $user->ID, 'action' => sprintf(__('%s added a the event %s', 'dbem'), "<a href='" . get_bloginfo('wpurl') . '/' . BP_MEMBERS_SLUG . '/' . $user->user_login . "/'>" . $user->display_name . "</a>", $EM_Event->output('#_EVENTLINK')), 'primary_link' => $EM_Event->output('#_EVENTURL'), 'type' => 'new_event', 'item_id' => $EM_Event->id));
    }
    return $result;
}
开发者ID:hypenotic,项目名称:slowfood,代码行数:14,代码来源:bp-em-activity.php


示例17: onBootstrap

 /**
  * Bootstrap listener
  *
  * @see \Zend\ModuleManager\FeatureBootstrapListenerInterface::onBootstrap()
  * @param unknown_type $e
  */
 public function onBootstrap($e)
 {
     // You may not need to do this if you're doing it elsewhere in your
     // application
     $eventManager = $e->getApplication()->getEventManager();
     $moduleRouteListener = new ModuleRouteListener();
     $moduleRouteListener->attach($eventManager);
 }
开发者ID:rlandas,项目名称:ZendSkeletonModule,代码行数:14,代码来源:Module.php


示例18: hydrateMongoCollectionToObjects

 /**
  * hydrate yiidactivities objects from the extracted collection and return an array
  *
  * @author Christian Schätzle
  * @param unknown_type $pCollection
  * @return array(SocialObject)
  */
 private static function hydrateMongoCollectionToObjects($pCollection)
 {
     $lObjects = array();
     while ($pCollection->hasNext()) {
         $lObjects[] = self::initializeObjectFromCollection($pCollection->getNext());
     }
     return $lObjects;
 }
开发者ID:42medien,项目名称:spreadly,代码行数:15,代码来源:VisitTable.class.php


示例19: notify

 /**
  * Notify Event Handler
  *
  * @param 	unknown_type $event
  * @access 	public
  */
 function notify($event)
 {
     if ($event->get('is_new_session')) {
         return $this->logSession($event);
     } else {
         return $this->logSessionUpdate($event);
     }
 }
开发者ID:ashutoshdev,项目名称:Open-Web-Analytics,代码行数:14,代码来源:sessionHandlers.php


示例20: addRuleToFilter

 /**
  * Add rule to filter
  *
  *
  * @param unknown_type $rule
  */
 public function addRuleToFilter($rule)
 {
     if ($rule instanceof Mage_SalesRule_Model_Rule) {
         $ruleId = $rule->getId();
     } else {
         $ruleId = (int) $rule;
     }
     $this->addFieldToFilter('rule_id', $ruleId);
 }
开发者ID:hirentricore,项目名称:devmagento,代码行数:15,代码来源:Collection.php



注:本文中的unknown_type类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP uom类代码示例发布时间:2022-05-23
下一篇:
PHP unknown类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap