3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.6 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2014 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
31 * @copyright CiviCRM LLC (c) 2004-2014
37 * Soap specific stuff goes here
39 class CRM_Utils_System_Soap
extends CRM_Utils_System_Base
{
42 * UF container variables
45 static $ufClass = NULL;
48 * Sets the title of the page
50 * @param string $title
54 * @paqram string $pageTitle
58 public function setTitle($title, $pageTitle) {
63 * Given a permission string, check for access requirements
66 * The permission to check.
69 * true if yes, else false
71 public function checkPermission($str) {
76 * Append an additional breadcrumb tag to the existing breadcrumb
78 * @param string $title
83 public function appendBreadCrumb($title, $url) {
88 * Append a string to the head of the html file
91 * The new string to be appended.
95 public function addHTMLHead($head) {
100 * Generate an internal CiviCRM URL
102 * @param string $path
103 * The path being linked to, such as "civicrm/add".
104 * @param string $query
105 * A query string to append to the link.
106 * @param bool $absolute
107 * Whether to force the output to be an absolute link (beginning with http:).
108 * Useful for links that will be displayed outside the site, such as in an
110 * @param string $fragment
111 * A fragment identifier (named anchor) to append to the link.
114 * an HTML string containing a link to the given path.
116 public function url($path = NULL, $query = NULL, $absolute = TRUE, $fragment = NULL) {
117 if (isset(self
::$ufClass)) {
118 $className = self
::$ufClass;
119 $url = $className::url($path, $query, $absolute, $fragment);
128 * Figure out the post url for the form
130 * @param the default action if one is pre-specified
133 * the url to post the form
135 public function postURL($action) {
140 * Set the email address of the user
142 * @param object $user
143 * Handle to the user object.
147 public function setEmail(&$user) {
151 * Authenticate a user against the real UF
153 * @param string $name
155 * @param string $pass
161 public function &authenticate($name, $pass) {
162 if (isset(self
::$ufClass)) {
163 $className = self
::$ufClass;
164 $result =& $className::authenticate($name, $pass);
173 * Swap the current UF for soap
175 public function swapUF() {
176 $config = CRM_Core_Config
::singleton();
178 self
::$uf = $config->userFramework
;
179 $config->userFramework
= 'Soap';
181 self
::$ufClass = $config->userFrameworkClass
;
182 $config->userFrameworkClass
= 'CRM_Utils_System_Soap';
186 * Get the locale set in the hosting CMS
189 * as the language is set elsewhere
191 public function getUFLocale() {
196 * Get user login URL for hosting CMS (method declared in each CMS system class)
198 * @param string $destination
199 * If present, add destination to querystring (works for Drupal only).
203 * loginURL for the current CMS
205 public function getLoginURL($destination = '') {
206 throw new Exception("Method not implemented: getLoginURL");