当前位置: 首页>>代码示例>>PHP>>正文


PHP JFactory::mailer方法代码示例

本文整理汇总了PHP中JFactory::mailer方法的典型用法代码示例。如果您正苦于以下问题:PHP JFactory::mailer方法的具体用法?PHP JFactory::mailer怎么用?PHP JFactory::mailer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JFactory的用法示例。


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

示例1: restoreFactoryState

 /**
  * Sets the Factory pointers
  *
  * @return  void
  */
 protected function restoreFactoryState()
 {
     \JFactory::$application = $this->savedFactoryState['application'];
     \JFactory::$config = $this->savedFactoryState['config'];
     \JFactory::$dates = $this->savedFactoryState['dates'];
     \JFactory::$session = $this->savedFactoryState['session'];
     \JFactory::$language = $this->savedFactoryState['language'];
     \JFactory::$document = $this->savedFactoryState['document'];
     \JFactory::$acl = $this->savedFactoryState['acl'];
     \JFactory::$database = $this->savedFactoryState['database'];
     \JFactory::$mailer = $this->savedFactoryState['mailer'];
 }
开发者ID:Joal01,项目名称:fof,代码行数:17,代码来源:FOFTestCase.php

示例2: getMailer

 /**
  * Get a mailer object.
  *
  * Returns the global {@link JMail} object, only creating it if it doesn't already exist.
  *
  * @return  JMail object
  *
  * @see     JMail
  * @since   11.1
  */
 public static function getMailer()
 {
     if (!self::$mailer) {
         self::$mailer = self::createMailer();
     }
     $copy = clone self::$mailer;
     return $copy;
 }
开发者ID:renzhewk,项目名称:joomla-platform,代码行数:18,代码来源:factory.php

示例3: getMailer

 /**
  * Get a mailer object
  *
  * Returns the global {@link JMail} object, only creating it
  * if it doesn't already exist
  *
  * @return object JMail
  */
 public static function getMailer()
 {
     if (!is_object(JFactory::$mailer)) {
         JFactory::$mailer = JFactory::_createMailer();
     }
     $copy = clone JFactory::$mailer;
     return $copy;
 }
开发者ID:joebushi,项目名称:joomla,代码行数:16,代码来源:factory.php

示例4: testSendAdminMail

 /**
  * Testing sendAdminMail().
  *
  * @param   array	Arguments for method call
  * @param   array	Arguments received by method
  * @param   bool	Expected return from call
  *
  * @return void
  *
  * @dataProvider casesSendAdminMail
  */
 public function testSendAdminMail($args, $expectedArgs, $expResult)
 {
     $mockMailer = $this->getMock('JMail', array('sendAdminMail'));
     $mockMailer->expects($this->once())->method('sendAdminMail')->with($this->equalTo($expectedArgs['adminName']), $this->equalTo($expectedArgs['adminEmail']), $this->equalTo($expectedArgs['email']), $this->equalTo($expectedArgs['type']), $this->equalTo($expectedArgs['title']), $this->equalTo($expectedArgs['author']), $this->equalTo($expectedArgs['url']))->will($this->returnValue($expResult));
     JFactory::$mailer = $mockMailer;
     $this->assertThat(JUtility::sendAdminMail($args['adminName'], $args['adminEmail'], $args['email'], $args['type'], $args['title'], $args['author'], $args['url']), $this->equalTo($expResult));
 }
开发者ID:GMaup,项目名称:joomla-platform,代码行数:18,代码来源:JUtilityTest.php


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