3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.3 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2013 |
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-2013
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 title for page
51 * @paqram string $pageTitle
56 function setTitle($title, $pageTitle) {
61 * given a permission string, check for access requirements
63 * @param string $str the permission to check
65 * @return boolean true if yes, else false
69 function checkPermission($str) {
74 * Append an additional breadcrumb tag to the existing breadcrumb
76 * @param string $title
82 function appendBreadCrumb($title, $url) {
87 * Append a string to the head of the html file
89 * @param string $head the new string to be appended
94 function addHTMLHead($head) {
99 * Generate an internal CiviCRM URL
101 * @param $path string The path being linked to, such as "civicrm/add"
102 * @param $query string A query string to append to the link.
103 * @param $absolute boolean Whether to force the output to be an absolute link (beginning with http:).
104 * Useful for links that will be displayed outside the site, such as in an
106 * @param $fragment string A fragment identifier (named anchor) to append to the link.
108 * @return string an HTML string containing a link to the given path.
112 function url($path = NULL, $query = NULL, $absolute = TRUE, $fragment = NULL) {
113 if (isset(self
::$ufClass)) {
114 eval('$url = ' . self
::$ufClass . '::url($path, $query, $absolute, $fragment);');
123 * figure out the post url for the form
125 * @param the default action if one is pre-specified
127 * @return string the url to post the form
130 function postURL($action) {
135 * Function to set the email address of the user
137 * @param object $user handle to the user object
142 function setEmail(&$user) {}
145 * Authenticate a user against the real UF
147 * @param string $name Login name
148 * @param string $pass Login password
150 * @return array Result array
153 function &authenticate($name, $pass) {
154 if (isset(self
::$ufClass)) {
155 eval('$result =& ' . self
::$ufClass . '::authenticate($name, $pass);');
164 * Swap the current UF for soap
168 public function swapUF() {
169 $config = CRM_Core_Config
::singleton();
171 self
::$uf = $config->userFramework
;
172 $config->userFramework
= 'Soap';
174 self
::$ufClass = $config->userFrameworkClass
;
175 $config->userFrameworkClass
= 'CRM_Utils_System_Soap';
179 * Get the locale set in the hosting CMS
181 * @return null as the language is set elsewhere
183 function getUFLocale() {
188 * Get user login URL for hosting CMS (method declared in each CMS system class)
190 * @param string $destination - if present, add destination to querystring (works for Drupal only)
192 * @return string - loginURL for the current CMS
195 public function getLoginURL($destination = '') {
196 throw new Exception("Method not implemented: getLoginURL");