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


PHP Library::create方法代码示例

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


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

示例1: send

 /**
  * 	Send email $to with using the $template file in the
  * 	/app/view/email/ directory otherwise you changed {@link $viewDir}
  * 	@param $to
  * 	@param string			$template	Filename of template to use
  * 	@param string			$subject		Optional alternate subject that should be used
  * 	@param array(string)	$data		optional additional associated array data to render in the view
  * 	@return boolean	true if mail was successfully send, otherwise false
  */
 public function send($to, $template, $subject = null, $data = array())
 {
     // use user logged in email for reply adress
     if ($this->controller->UserLogin->loggedin()) {
         $this->headers->set('Reply-To', $this->controller->UserLogin->User->get('email'));
         $this->headers->set('From', $this->controller->UserLogin->User->get('email'));
     }
     // render content
     $view = Library::create('ephFrame.lib.view.View', array($this->viewDir, $template, array_merge($this->controller->data->toArray(), $data)));
     $view->theme = $this->controller->theme;
     // send mail and return result
     return @mail($to, $subject == null ? $this->subject : $subject, $view->render(), $this->headers->implodef(RTLF, '%s: %s'));
 }
开发者ID:Ephigenia,项目名称:harrison,代码行数:22,代码来源:ViewMailer.php

示例2: dirname

<?php

/**
 * This is the application main script
 * 
 * This is were everything about the application and the ephFrame Framework
 * is created. From the Request a dispatcher is initialized that creates
 * a controller from the url (if matched), that will create a view after
 * running the action that is requested and outputs this view as response.
 * 
 * @package ephFrame
 * @author Marcel Eichner // Ephigenia <love@ephigenia.de
 * @since 03.12.2007
 */
/**
 * load ephFrame
 */
require dirname(__FILE__) . '/ephFrame.php';
/**
 * Create the dispatcher that creates the controller ... which will
 * start the hole ephFrame MVC-Pattern.
 */
$dispatcher = Library::create('app.lib.AppDispatcher');
$dispatcher->dispatch(new HTTPRequest(true));
exit;
开发者ID:Ephigenia,项目名称:harrison,代码行数:25,代码来源:index.php


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