當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。