push erp test
This commit is contained in:
parent
098996ca8f
commit
7965ab1f95
15
erp/config.php
Normal file
15
erp/config.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
// CONFIGURATION
|
||||
$url = 'http://roykin.julius.fr';
|
||||
$db = 'TestListePrix';
|
||||
$username = "admin";
|
||||
$password = 'adminroykin123';
|
||||
|
||||
// Load Demo Data
|
||||
// $info = ripcord::client('https://demo.odoo.com/start')->start();
|
||||
// list($url, $db, $username, $password) = array($info['host'], $info['database'], $info['user'], $info['password']);
|
||||
|
||||
$common = ripcord::client("$url/xmlrpc/2/common");
|
||||
$common->version();
|
||||
$uid = $common->authenticate($db, $username, $password, array());
|
||||
|
67
erp/erp_add_customer.php
Normal file
67
erp/erp_add_customer.php
Normal file
@ -0,0 +1,67 @@
|
||||
<?php
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', 1);
|
||||
|
||||
// Vendors
|
||||
require_once 'ripcord/ripcord.php';
|
||||
require '../config/config.inc.php';
|
||||
|
||||
// load config Odoo
|
||||
require 'config.php';
|
||||
|
||||
|
||||
// date de diff pour la création de client
|
||||
/*
|
||||
* $date_since_import = new DateTime();
|
||||
* $date_since_import->modify('-1 month');
|
||||
*/
|
||||
|
||||
|
||||
// Get All Customers with email and is customer to create if no exist or update info
|
||||
$models = ripcord::client("$url/xmlrpc/2/object");
|
||||
$ids_customer = $models->execute_kw($db, $uid, $password,
|
||||
'res.partner', 'search', array(
|
||||
array(
|
||||
array('email', '!=', ''),
|
||||
array('customer', '=', true)
|
||||
//array('create_date', '>=', $date_since_import->format('Y-m-d H:i:s')),
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
foreach ($ids_customer as $id_customer) {
|
||||
$record = $models->execute_kw($db, $uid, $password,
|
||||
'res.partner', 'read', array($id_customer));
|
||||
|
||||
if (!alreadyExists($record['id'])) {
|
||||
|
||||
// add Customer
|
||||
$customer = new Customer();
|
||||
$customer->lastname = $record['display_name'];
|
||||
$customer->firstname = $record['display_name'];
|
||||
$customer->active = (int) $record['active'];;
|
||||
$customer->email = $record['email'];
|
||||
$customer->passwd = Tools::encrypt('antadis78');
|
||||
$customer->company = $record['name'];
|
||||
$customer->id_erp = $record['id'];
|
||||
$customer->representant = $record['user_id'][1];
|
||||
|
||||
p($customer);
|
||||
|
||||
//var_dump($customer->add());
|
||||
// Link Address
|
||||
|
||||
|
||||
die('CREATE USER');
|
||||
}
|
||||
die;
|
||||
}
|
||||
|
||||
|
||||
function alreadyExists ($id_customer_erp) {
|
||||
return (boolean) Db::getInstance()->getValue('
|
||||
SELECT `id_customer`
|
||||
FROM `ps_customer`
|
||||
WHERE `id_erp` = ' . (int)$id_customer_erp
|
||||
);
|
||||
}
|
118
erp/ripcord/docs/Ripcord/Ripcord_BadMethodCallException.html
Normal file
118
erp/ripcord/docs/Ripcord/Ripcord_BadMethodCallException.html
Normal file
@ -0,0 +1,118 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Ripcord_BadMethodCallException</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Class Ripcord_BadMethodCallException</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-vars">Vars</a>
|
||||
| <a href="#sec-methods">Methods</a>
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<p class="implements">
|
||||
Implements interfaces:
|
||||
<ul>
|
||||
<li><a href="../Ripcord/Ripcord_Exception.html">Ripcord_Exception</a></li> </ul>
|
||||
</p>
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This class is used whenever an when a method passed to the server is invalid.</p>
|
||||
<p class="description"><p><ul><li>ripcord::methodNotFound (-1) Method {method} not found. - Thrown by the ripcord server when a requested method isn't found.</li></ul></p></p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_ripcord.php.html">/ripcord.php</a> (line <span class="field">319</span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre>BadMethodCallException
|
||||
|
|
||||
--Ripcord_BadMethodCallException</pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="sec-vars"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variables</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Vars</span>
|
||||
|
||||
|
||||
|
|
||||
<a href="#sec-methods">Methods</a>
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<h4>Inherited Variables</h4>
|
||||
<A NAME='inherited_vars'><!-- --></A>
|
||||
<p>Inherited from <span class="classname">BadMethodCallException (Internal Class)</span></p>
|
||||
<blockquote>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$code</span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$file</span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$line</span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$message</span><br>
|
||||
</span>
|
||||
</blockquote>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-vars">Vars</a>
|
||||
<span class="disabled">Methods</span>
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
|
||||
<h4>Inherited Methods</h4>
|
||||
<a name='inherited_methods'><!-- --></a>
|
||||
<!-- =========== Summary =========== -->
|
||||
<p>Inherited From <span class="classname">BadMethodCallException (Internal Class)</span></p>
|
||||
<blockquote>
|
||||
<span class="method-name">constructor __construct ( [$message = ], [$code = ] )</span><br>
|
||||
<span class="method-name">getCode ( )</span><br>
|
||||
<span class="method-name">getFile ( )</span><br>
|
||||
<span class="method-name">getLine ( )</span><br>
|
||||
<span class="method-name">getMessage ( )</span><br>
|
||||
<span class="method-name">getTrace ( )</span><br>
|
||||
<span class="method-name">getTraceAsString ( )</span><br>
|
||||
<span class="method-name">__clone ( )</span><br>
|
||||
<span class="method-name">__toString ( )</span><br>
|
||||
</blockquote>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Tue, 16 Nov 2010 16:20:16 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
435
erp/ripcord/docs/Ripcord/Ripcord_Client.html
Normal file
435
erp/ripcord/docs/Ripcord/Ripcord_Client.html
Normal file
@ -0,0 +1,435 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Ripcord_Client</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Class Ripcord_Client</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-descendents">Descendents</a>
|
||||
| <a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This class implements a simple RPC client, for XML-RPC, (simplified) SOAP 1.1 or Simple RPC. The client abstracts the entire RPC process behind native PHP methods. Any method defined by the rpc server can be called as if it was a native method of the rpc client.</p>
|
||||
<p class="description"><p>E.g. <div class="src-code"><ol><li><div class="src-line"> <span class="src-php"><?php</span></div></li>
|
||||
<li><div class="src-line"> <span class="src-var">$client </span>= <span class="src-id"><a href="../Ripcord/ripcord.html">ripcord</a></span><span class="src-sym">::</span><a href="../Ripcord/ripcord.html#methodclient">client</a><span class="src-sym">( </span><span class="src-str">'http://www.moviemeter.nl/ws' </span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"> <span class="src-var">$score </span>= <span class="src-var">$client</span><span class="src-sym">-></span><span class="src-id">film</span><span class="src-sym">-></span><span class="src-id">getScore</span><span class="src-sym">( </span><span class="src-str">'e3dee9d19a8c3af7c92f9067d2945b59'</span><span class="src-sym">, </span><span class="src-num">500 </span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"> <span class="src-php">?></span></div></li>
|
||||
</ol></div></p><p>The client has a simple interface for the system.multiCall method: <div class="src-code"><ol><li><div class="src-line"> <span class="src-php"><?php</span></div></li>
|
||||
<li><div class="src-line"> <span class="src-var">$client </span>= <span class="src-id"><a href="../Ripcord/ripcord.html">ripcord</a></span><span class="src-sym">::</span><a href="../Ripcord/ripcord.html#methodclient">client</a><span class="src-sym">( </span><span class="src-str">'http://ripcord.muze.nl/ripcord.php' </span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"> <span class="src-var">$client</span><span class="src-sym">-></span><a href="http://www.php.net/system">system</a><span class="src-sym">-></span><span class="src-id">multiCall</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-></span><span class="src-id">start</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"> <span class="src-id"><a href="../Ripcord/ripcord.html">ripcord</a></span><span class="src-sym">::</span><a href="../Ripcord/ripcord.html#methodbind">bind</a><span class="src-sym">( </span><span class="src-var">$methods</span><span class="src-sym">, </span><span class="src-var">$client</span><span class="src-sym">-></span><a href="http://www.php.net/system">system</a><span class="src-sym">-></span><span class="src-id">listMethods</span><span class="src-sym">(</span><span class="src-sym">) )</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"> <span class="src-id"><a href="../Ripcord/ripcord.html">ripcord</a></span><span class="src-sym">::</span><a href="../Ripcord/ripcord.html#methodbind">bind</a><span class="src-sym">( </span><span class="src-var">$foo</span><span class="src-sym">, </span><span class="src-var">$client</span><span class="src-sym">-></span><span class="src-id">getFoo</span><span class="src-sym">(</span><span class="src-sym">) )</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"> <span class="src-var">$client</span><span class="src-sym">-></span><a href="http://www.php.net/system">system</a><span class="src-sym">-></span><span class="src-id">multiCall</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-></span><span class="src-id">execute</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"> <span class="src-php">?></span></div></li>
|
||||
</ol></div></p><p>The soap client can only handle the basic php types and doesn't understand xml namespaces. Use PHP's SoapClient for complex soap calls. This client cannot parse wsdl. If you want to skip the ripcord::client factory method, you _must_ provide a transport object explicitly.</p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">link:</span> <a href="http://wiki.moviemeter.nl/index.php/API">Moviemeter API documentation</a></li>
|
||||
</ul>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_ripcord_client.php.html">/ripcord_client.php</a> (line <span class="field">47</span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-descendents"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Direct descendents</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Descendents</span>
|
||||
| <a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em"><a href="../Ripcord/Ripcord_Client_MultiCall.html">Ripcord_Client_MultiCall</a></td>
|
||||
<td>
|
||||
This class provides the fetch interface for system.multiCall. It is returned
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-var-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variable Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-descendents">Descendents</a> |
|
||||
<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="var-summary">
|
||||
<div class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<a href="#$_autoDecode" title="details" class="var-name">$_autoDecode</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<a href="#$_multiCall" title="details" class="var-name">$_multiCall</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<a href="#$_multiCallArgs" title="details" class="var-name">$_multiCallArgs</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<a href="#$_request" title="details" class="var-name">$_request</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<a href="#$_response" title="details" class="var-name">$_response</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<a href="#$_throwExceptions" title="details" class="var-name">$_throwExceptions</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-descendents">Descendents</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
|
||||
|
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">Ripcord_Client</span>
|
||||
<a href="#__construct" title="details" class="method-name">__construct</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$url</span>, [<span class="var-type"></span> <span class="var-name">$options</span> = <span class="var-default">null</span>], [<span class="var-type"></span> <span class="var-name">$transport</span> = <span class="var-default">null</span>], [<span class="var-type">object</span> <span class="var-name">$rootClient</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#__call" title="details" class="method-name">__call</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$name</span>, <span class="var-type"></span> <span class="var-name">$args</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<span class="method-result">object A</span>
|
||||
<a href="#__get" title="details" class="method-name">__get</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$name</span>)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-vars"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variables</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-descendents">Descendents</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
|
||||
|
||||
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="var$_autoDecode" id="$_autoDecode"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$_autoDecode</span>
|
||||
= <span class="var-default"> true</span> (line <span class="line-number">117</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Whether or not to decode the XML-RPC datetime and base64 types to unix timestamp and binary string respectively.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$_multiCall" id="$_multiCall"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$_multiCall</span>
|
||||
= <span class="var-default"> false</span> (line <span class="line-number">91</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">A flag to indicate if we are in a multiCall block. Start this with $client->system->multiCall()->start()</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> protected</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$_multiCallArgs" id="$_multiCallArgs"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$_multiCallArgs</span>
|
||||
= <span class="var-default">array()</span> (line <span class="line-number">96</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">A list of deferred encoded calls.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> protected</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$_request" id="$_request"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$_request</span>
|
||||
= <span class="var-default"> ''</span> (line <span class="line-number">106</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">The exact request from the client. For debugging purposes.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$_response" id="$_response"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$_response</span>
|
||||
= <span class="var-default"> ''</span> (line <span class="line-number">101</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">The exact response from the rpc server. For debugging purposes.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$_throwExceptions" id="$_throwExceptions"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$_throwExceptions</span>
|
||||
= <span class="var-default"> false</span> (line <span class="line-number">111</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Whether or not to throw exceptions when an xml-rpc fault is returned by the server. Default is false.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-descendents">Descendents</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
|
||||
<a name="method__construct" id="__construct"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">Constructor __construct</span> (line <span class="line-number">126</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">The constructor for the RPC client.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">throws:</span> Ripcord_ConfigurationException (ripcord::xmlrpcNotInstalled) when the xmlrpc extension is not available.</li>
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">Ripcord_Client</span>
|
||||
<span class="method-name">
|
||||
__construct
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$url</span>, [<span class="var-type"></span> <span class="var-name">$options</span> = <span class="var-default">null</span>], [<span class="var-type"></span> <span class="var-name">$transport</span> = <span class="var-default">null</span>], [<span class="var-type">object</span> <span class="var-name">$rootClient</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$url</span><span class="var-description">: The url of the rpc server</span> </li>
|
||||
<li>
|
||||
<span class="var-type">array</span>
|
||||
<span class="var-name">$options</span><span class="var-description">: Optional. A list of outputOptions. See <a href="../Ripcord/Ripcord_Server.html#methodsetOutputOption">Ripcord_Server::setOutputOption()</a></span> </li>
|
||||
<li>
|
||||
<span class="var-type">object</span>
|
||||
<span class="var-name">$rootClient</span><span class="var-description">: Optional. Used internally when using namespaces.</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$transport</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
<hr class="separator" />
|
||||
<div class="notes">Redefined in descendants as:</div>
|
||||
<ul class="redefinitions">
|
||||
<li>
|
||||
<a href="../Ripcord/Ripcord_Client_MultiCall.html#method__construct">Ripcord_Client_MultiCall::__construct()</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="method__call" id="__call"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">__call</span> (line <span class="line-number">165</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method catches any native method called on the client and calls it on the rpc server instead. It automatically parses the resulting xml and returns native php type results.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">throws:</span> Ripcord_RemoteException when _throwExceptions is true and the server returns an XML-RPC Fault.</li>
|
||||
<li><span class="field">throws:</span> Ripcord_InvalidArgumentException (ripcord::notRipcordCall) when handling a multiCall and the arguments passed do not have the correct method call information</li>
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
__call
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$name</span>, <span class="var-type"></span> <span class="var-name">$args</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$name</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$args</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="method__get" id="__get"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">__get</span> (line <span class="line-number">283</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method catches any reference to properties of the client and uses them as a namespace. The property is automatically created as a new instance of the rpc client, with the name of the property as a namespace.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> Ripcord Client with the given namespace set.</li>
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">object A</span>
|
||||
<span class="method-name">
|
||||
__get
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$name</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$name</span><span class="var-description">: The name of the namespace</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Tue, 16 Nov 2010 16:20:17 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
319
erp/ripcord/docs/Ripcord/Ripcord_Client_Call.html
Normal file
319
erp/ripcord/docs/Ripcord/Ripcord_Client_Call.html
Normal file
@ -0,0 +1,319 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Ripcord_Client_Call</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Class Ripcord_Client_Call</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This class is used with the Ripcord_Client when calling system.multiCall. Instead of immediately calling the method on the rpc server, a Ripcord_Client_Call object is created with all the information needed to call the method using the multicall parameters. The call object is returned immediately and is used as input parameter for the multiCall call. The result of the call can be bound to a php variable. This variable will be filled with the result of the call when it is available.</p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_ripcord_client.php.html">/ripcord_client.php</a> (line <span class="field">361</span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<a name="sec-var-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variable Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="var-summary">
|
||||
<div class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<a href="#$bound" title="details" class="var-name">$bound</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<a href="#$index" title="details" class="var-name">$index</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<a href="#$method" title="details" class="var-name">$method</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<a href="#$params" title="details" class="var-name">$params</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
|
||||
|
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">Ripcord_Client_Call</span>
|
||||
<a href="#__construct" title="details" class="method-name">__construct</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$method</span>, <span class="var-type">array</span> <span class="var-name">$params</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<span class="method-result">object Returns</span>
|
||||
<a href="#bind" title="details" class="method-name">bind</a>
|
||||
(<span class="var-type"></span> <span class="var-name">&$bound</span>, <span class="var-type">mixed</span> <span class="var-name">$bound</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<span class="method-result">array</span>
|
||||
<a href="#encode" title="details" class="method-name">encode</a>
|
||||
()
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-vars"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variables</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
|
||||
|
||||
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="var$bound" id="$bound"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$bound</span>
|
||||
= <span class="var-default"> null</span> (line <span class="line-number">381</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">A reference to the php variable to fill with the result of the call, if any.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$index" id="$index"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$index</span>
|
||||
= <span class="var-default"> null</span> (line <span class="line-number">376</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">The index in the multicall request array, if any.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$method" id="$method"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$method</span>
|
||||
= <span class="var-default"> null</span> (line <span class="line-number">366</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">The method to call on the rpc server</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$params" id="$params"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$params</span>
|
||||
= <span class="var-default">array()</span> (line <span class="line-number">371</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">The arguments to pass on to the method.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
|
||||
<a name="method__construct" id="__construct"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">Constructor __construct</span> (line <span class="line-number">388</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">The constructor for the Ripcord_Client_Call class.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">Ripcord_Client_Call</span>
|
||||
<span class="method-name">
|
||||
__construct
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$method</span>, <span class="var-type">array</span> <span class="var-name">$params</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$method</span><span class="var-description">: The name of the rpc method to call</span> </li>
|
||||
<li>
|
||||
<span class="var-type">array</span>
|
||||
<span class="var-name">$params</span><span class="var-description">: The parameters for the rpc method.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodbind" id="bind"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">bind</span> (line <span class="line-number">401</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method allows you to bind a php variable to the result of this method call.</p>
|
||||
<p class="description"><p>When the method call's result is available, the php variable will be filled with this result.</p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> this object for chaining.</li>
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">object Returns</span>
|
||||
<span class="method-name">
|
||||
bind
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">&$bound</span>, <span class="var-type">mixed</span> <span class="var-name">$bound</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$bound</span><span class="var-description">: The variable to bind the result from this call to.</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">&$bound</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodencode" id="encode"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">encode</span> (line <span class="line-number">411</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method returns the correct format for a multiCall argument.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> An array with the methodName and params</li>
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">array</span>
|
||||
<span class="method-name">
|
||||
encode
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Tue, 16 Nov 2010 16:20:18 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
227
erp/ripcord/docs/Ripcord/Ripcord_Client_MultiCall.html
Normal file
227
erp/ripcord/docs/Ripcord/Ripcord_Client_MultiCall.html
Normal file
@ -0,0 +1,227 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Ripcord_Client_MultiCall</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Class Ripcord_Client_MultiCall</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-vars">Vars</a>
|
||||
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This class provides the fetch interface for system.multiCall. It is returned</p>
|
||||
<p class="description"><p>when calling $client->system->multiCall() with no arguments. Upon construction it puts the originating client into multiCall deferred mode. The client will gather the requested method calls instead of executing them immediately. It will them execute all of them, in order, when calling $client->system->multiCall()->fetch(). This class extends Ripcord_Client only so it has access to its protected _multiCall property.</p></p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_ripcord_client.php.html">/ripcord_client.php</a> (line <span class="field">313</span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre><a href="../Ripcord/Ripcord_Client.html">Ripcord_Client</a>
|
||||
|
|
||||
--Ripcord_Client_MultiCall</pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-vars">Vars</a>
|
||||
|
||||
|
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">Ripcord_Client_MultiCall</span>
|
||||
<a href="#__construct" title="details" class="method-name">__construct</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$client</span>, [<span class="var-type"></span> <span class="var-name">$methodName</span> = <span class="var-default">'system.multiCall'</span>])
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#execute" title="details" class="method-name">execute</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#start" title="details" class="method-name">start</a>
|
||||
()
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-vars"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variables</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
|
||||
|
||||
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<h4>Inherited Variables</h4>
|
||||
<A NAME='inherited_vars'><!-- --></A>
|
||||
<p>Inherited from <span class="classname"><a href="../Ripcord/Ripcord_Client.html">Ripcord_Client</a></span></p>
|
||||
<blockquote>
|
||||
<span class="var-title">
|
||||
<span class="var-name"><a href="../Ripcord/Ripcord_Client.html#var$_autoDecode">Ripcord_Client::$_autoDecode</a></span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name"><a href="../Ripcord/Ripcord_Client.html#var$_multiCall">Ripcord_Client::$_multiCall</a></span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name"><a href="../Ripcord/Ripcord_Client.html#var$_multiCallArgs">Ripcord_Client::$_multiCallArgs</a></span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name"><a href="../Ripcord/Ripcord_Client.html#var$_request">Ripcord_Client::$_request</a></span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name"><a href="../Ripcord/Ripcord_Client.html#var$_response">Ripcord_Client::$_response</a></span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name"><a href="../Ripcord/Ripcord_Client.html#var$_throwExceptions">Ripcord_Client::$_throwExceptions</a></span><br>
|
||||
</span>
|
||||
</blockquote>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-vars">Vars</a>
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
|
||||
<a name="method__construct" id="__construct"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">Constructor __construct</span> (line <span class="line-number">324</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">Ripcord_Client_MultiCall</span>
|
||||
<span class="method-name">
|
||||
__construct
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$client</span>, [<span class="var-type"></span> <span class="var-name">$methodName</span> = <span class="var-default">'system.multiCall'</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$client</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$methodName</span> </li>
|
||||
</ul>
|
||||
|
||||
<hr class="separator" />
|
||||
<div class="notes">Redefinition of:</div>
|
||||
<dl>
|
||||
<dt><a href="../Ripcord/Ripcord_Client.html#method__construct">Ripcord_Client::__construct()</a></dt>
|
||||
<dd>The constructor for the RPC client.</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
<a name="methodexecute" id="execute"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">execute</span> (line <span class="line-number">343</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
execute
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodstart" id="start"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">start</span> (line <span class="line-number">334</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
start
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<h4>Inherited Methods</h4>
|
||||
<a name='inherited_methods'><!-- --></a>
|
||||
<!-- =========== Summary =========== -->
|
||||
<p>Inherited From <span class="classname"><a href="../Ripcord/Ripcord_Client.html">Ripcord_Client</a></span></p>
|
||||
<blockquote>
|
||||
<span class="method-name"><a href="../Ripcord/Ripcord_Client.html#method__construct">Ripcord_Client::__construct()</a></span><br>
|
||||
<span class="method-name"><a href="../Ripcord/Ripcord_Client.html#method__call">Ripcord_Client::__call()</a></span><br>
|
||||
<span class="method-name"><a href="../Ripcord/Ripcord_Client.html#method__get">Ripcord_Client::__get()</a></span><br>
|
||||
</blockquote>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Tue, 16 Nov 2010 16:20:18 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
124
erp/ripcord/docs/Ripcord/Ripcord_ConfigurationException.html
Normal file
124
erp/ripcord/docs/Ripcord/Ripcord_ConfigurationException.html
Normal file
@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Ripcord_ConfigurationException</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Class Ripcord_ConfigurationException</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-vars">Vars</a>
|
||||
| <a href="#sec-methods">Methods</a>
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<p class="implements">
|
||||
Implements interfaces:
|
||||
<ul>
|
||||
<li><a href="../Ripcord/Ripcord_Exception.html">Ripcord_Exception</a></li> </ul>
|
||||
</p>
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This class is used whenever prerequisite requirements are not met.</p>
|
||||
<p class="description"><p><ul><li>ripcord::xmlrpcNotInstalled (-5) PHP XMLRPC library is not installed - Thrown by the ripcord server and client when the xmlrpc library is not installed.</li></ul></p></p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_ripcord.php.html">/ripcord.php</a> (line <span class="field">326</span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre>Exception
|
||||
|
|
||||
--Ripcord_ConfigurationException</pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="sec-vars"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variables</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Vars</span>
|
||||
|
||||
|
||||
|
|
||||
<a href="#sec-methods">Methods</a>
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<h4>Inherited Variables</h4>
|
||||
<A NAME='inherited_vars'><!-- --></A>
|
||||
<p>Inherited from <span class="classname">Exception (Internal Class)</span></p>
|
||||
<blockquote>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$code</span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$file</span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$line</span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$message</span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$string</span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$trace</span><br>
|
||||
</span>
|
||||
</blockquote>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-vars">Vars</a>
|
||||
<span class="disabled">Methods</span>
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
|
||||
<h4>Inherited Methods</h4>
|
||||
<a name='inherited_methods'><!-- --></a>
|
||||
<!-- =========== Summary =========== -->
|
||||
<p>Inherited From <span class="classname">Exception (Internal Class)</span></p>
|
||||
<blockquote>
|
||||
<span class="method-name">constructor __construct ( [$message = ], [$code = ] )</span><br>
|
||||
<span class="method-name">getCode ( )</span><br>
|
||||
<span class="method-name">getFile ( )</span><br>
|
||||
<span class="method-name">getLine ( )</span><br>
|
||||
<span class="method-name">getMessage ( )</span><br>
|
||||
<span class="method-name">getTrace ( )</span><br>
|
||||
<span class="method-name">getTraceAsString ( )</span><br>
|
||||
<span class="method-name">__clone ( )</span><br>
|
||||
<span class="method-name">__toString ( )</span><br>
|
||||
</blockquote>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Tue, 16 Nov 2010 16:20:17 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
480
erp/ripcord/docs/Ripcord/Ripcord_Documentor.html
Normal file
480
erp/ripcord/docs/Ripcord/Ripcord_Documentor.html
Normal file
@ -0,0 +1,480 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Ripcord_Documentor</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Class Ripcord_Documentor</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<p class="implements">
|
||||
Implements interfaces:
|
||||
<ul>
|
||||
<li><a href="../Ripcord/Ripcord_Documentor_Interface.html">Ripcord_Documentor_Interface</a></li> </ul>
|
||||
</p>
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This class implements the default documentor for the ripcord server. Any request to the server without a request_xml is handled by the documentor.</p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_ripcord_documentor.php.html">/ripcord_documentor.php</a> (line <span class="field">28</span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<a name="sec-var-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variable Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="var-summary">
|
||||
<div class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<a href="#$css" title="details" class="var-name">$css</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<a href="#$footer" title="details" class="var-name">$footer</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<a href="#$header" title="details" class="var-name">$header</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<a href="#$name" title="details" class="var-name">$name</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<a href="#$root" title="details" class="var-name">$root</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<a href="#$version" title="details" class="var-name">$version</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<a href="#$wsdl" title="details" class="var-name">$wsdl</a>
|
||||
</div>
|
||||
<div class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<a href="#$wsdl2" title="details" class="var-name">$wsdl2</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
|
||||
|
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">Ripcord_Documentor</span>
|
||||
<a href="#__construct" title="details" class="method-name">__construct</a>
|
||||
([<span class="var-type"></span> <span class="var-name">$options</span> = <span class="var-default">null</span>], [<span class="var-type"></span> <span class="var-name">$docCommentParser</span> = <span class="var-default">null</span>], <span class="var-type">array</span> <span class="var-name">$options.</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<span class="method-result">string</span>
|
||||
<a href="#getIntrospectionXML" title="details" class="method-name">getIntrospectionXML</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#handle" title="details" class="method-name">handle</a>
|
||||
(<span class="var-type">object</span> <span class="var-name">$rpcServer</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#setMethodData" title="details" class="method-name">setMethodData</a>
|
||||
(<span class="var-type">array</span> <span class="var-name">$methodData</span>)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-vars"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variables</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
|
||||
|
||||
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="var$css" id="$css"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$css</span>
|
||||
= <span class="var-default"> "
<br /> html {
<br /> font-family: georgia, times, serif;
<br /> font-size: 79%;
<br /> background-color: #EEEEEE;
<br /> }
<br /> h1 {
<br /> font-family: 'arial black', helvetica, sans-serif;
<br /> font-size: 2em;
<br /> font-weight: normal;
<br /> margin: -20px -21px 0.4em -20px;
<br /> padding: 40px 20px 20px;
<br /> background: #01648E; /* for non-css3 browsers */
<br /> filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00486E', endColorstr='#09799E'); /* for IE */
<br /> background: -webkit-gradient(linear, left top, left bottom, from(#00486E), to(#09799E)); /* for webkit browsers */
<br /> background: -moz-linear-gradient(top, #00486E, #09799E); /* for firefox 3.6+ */
<br /> color: white;
<br /> border-bottom: 4px solid black;
<br /> text-shadow: black 0.1em 0.1em 0.2em;
<br /> }
<br /> h2 {
<br /> font-family: arial, helvetica, sans-serif;
<br /> font-weight: bold;
<br /> font-size: 1.4em;
<br /> color: #444444;
<br /> text-shadow: #AAAAAA 0.1em 0.1em 0.2em;
<br /> margin-top: 2.5em;
<br /> border-bottom: 1px solid #09799E;
<br /> }
<br /> h3 {
<br /> font-family: arial, helvetica, sans-serif;
<br /> font-weight: normal;
<br /> font-size: 1.4em;
<br /> color: #555555;
<br /> text-shadow: #AAAAAA 0.1em 0.1em 0.2em;
<br /> margin-bottom: 0px;
<br /> }
<br /> div.signature {
<br /> font-family: courier, monospace;
<br /> margin-bottom: 1.4em;
<br /> }
<br /> ul, ol, li {
<br /> margin: 0px;
<br /> padding: 0px;
<br /> }
<br /> ul, ol {
<br /> color: #09799E;
<br /> margin-bottom: 1.4em;
<br /> }
<br /> ul li {
<br /> list-style: square;
<br /> }
<br /> ul li, ol li {
<br /> margin-left: 20px;
<br /> }
<br /> li span, li label {
<br /> color: black;
<br /> }
<br /> li.param label {
<br /> font-family: courier, monospace;
<br /> padding-right: 1.4em;
<br /> }
<br /> a {
<br /> text-decoration: none;
<br /> }
<br /> a:hover {
<br /> text-decoration: underline;
<br /> }
<br /> body {
<br /> background-color: white;
<br /> width: 830px;
<br /> margin: 10px auto;
<br /> padding: 20px;
<br /> -moz-box-shadow: 5px 5px 5px #ccc;
<br /> -webkit-box-shadow: 5px 5px 5px #ccc;
<br /> box-shadow: 5px 5px 5px #ccc;
<br /> }
<br /> code {
<br /> display: block;
<br /> background-color: #999999;
<br /> padding: 10px;
<br /> margin: 0.4em 0px 1.4em 0px;
<br /> color: white;
<br /> white-space: pre;
<br /> font-family: courier, monospace;
<br /> font-size: 1.2em;
<br /> }
<br /> .tag, .argName, .argType {
<br /> margin-right: 10px;
<br /> }
<br /> .argument {
<br /> margin-left: 20px;
<br /> }
<br /> .footer {
<br /> font-family: helvetica, sans-serif;
<br /> font-size: 0.9em;
<br /> font-weight: normal;
<br /> margin: 0px -21px -20px -20px;
<br /> padding: 20px;
<br /> background: #01648E; /* for non-css3 browsers */
<br /> filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00486E', endColorstr='#09799E'); /* for IE */
<br /> background: -webkit-gradient(linear, left top, left bottom, from(#00486E), to(#09799E)); /* for webkit browsers */
<br /> background: -moz-linear-gradient(top, #00486E, #09799E); /* for firefox 3.6+ */
<br /> color: white;
<br /> }
<br /> .footer a {
<br /> color: white;
<br /> text-decoration: none;
<br /> }
<br /> "</span> (line <span class="line-number">43</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">A url to an optional css file or a css string for an inline stylesheet.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$footer" id="$footer"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$footer</span>
|
||||
= <span class="var-default"> ''</span> (line <span class="line-number">182</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Optional footer text for the online documentation.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$header" id="$header"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$header</span>
|
||||
= <span class="var-default"> ''</span> (line <span class="line-number">177</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Optional header text for the online documentation.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$name" id="$name"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$name</span>
|
||||
= <span class="var-default"> 'Ripcord: Simple RPC Server'</span> (line <span class="line-number">38</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">The name of the rpc server, used as the title and heading of the default HTML page.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$root" id="$root"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$root</span>
|
||||
= <span class="var-default"> ''</span> (line <span class="line-number">172</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">The root URL of the rpc server.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$version" id="$version"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$version</span>
|
||||
= <span class="var-default"> 'auto'</span> (line <span class="line-number">167</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Which version of the XML vocabulary the server implements. Either 'xmlrpc', 'soap 1.1', 'simple' or 'auto'.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$wsdl" id="$wsdl"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$wsdl</span>
|
||||
= <span class="var-default"> false</span> (line <span class="line-number">157</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">The wsdl 1.0 description.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="var$wsdl2" id="$wsdl2"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$wsdl2</span>
|
||||
= <span class="var-default"> false</span> (line <span class="line-number">162</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">The wsdl 2.0 description</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
|
||||
<a name="method__construct" id="__construct"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">Constructor __construct</span> (line <span class="line-number">193</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">The constructor for the Ripcord_Documentor class.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">Ripcord_Documentor</span>
|
||||
<span class="method-name">
|
||||
__construct
|
||||
</span>
|
||||
([<span class="var-type"></span> <span class="var-name">$options</span> = <span class="var-default">null</span>], [<span class="var-type"></span> <span class="var-name">$docCommentParser</span> = <span class="var-default">null</span>], <span class="var-type">array</span> <span class="var-name">$options.</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">array</span>
|
||||
<span class="var-name">$options.</span><span class="var-description">: Optional. Allows you to set the public properties of this class upon construction.</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$options</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$docCommentParser</span> </li>
|
||||
</ul>
|
||||
|
||||
<hr class="separator" />
|
||||
<div class="notes">Implementation of:</div>
|
||||
<dl>
|
||||
<dt><a href="../Ripcord/Ripcord_Documentor_Interface.html#method__construct">Ripcord_Documentor_Interface::__construct()</a></dt>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
<a name="methodgetIntrospectionXML" id="getIntrospectionXML"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">getIntrospectionXML</span> (line <span class="line-number">399</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method returns an XML document in the introspection format expected by xmlrpc_server_register_introspection_callback. It uses the php Reflection classes to gather information from the registered methods.</p>
|
||||
<p class="description"><p>Descriptions are added from phpdoc docblocks if found.</p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> XML string with the introspection data.</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">string</span>
|
||||
<span class="method-name">
|
||||
getIntrospectionXML
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
<hr class="separator" />
|
||||
<div class="notes">Implementation of:</div>
|
||||
<dl>
|
||||
<dt><a href="../Ripcord/Ripcord_Documentor_Interface.html#methodgetIntrospectionXML">Ripcord_Documentor_Interface::getIntrospectionXML()</a></dt>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
<a name="methodhandle" id="handle"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">handle</span> (line <span class="line-number">219</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method handles any request which isn't a valid rpc request.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
handle
|
||||
</span>
|
||||
(<span class="var-type">object</span> <span class="var-name">$rpcServer</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">object</span>
|
||||
<span class="var-name">$rpcServer</span><span class="var-description">: A reference to the active rpc server.</span> </li>
|
||||
</ul>
|
||||
|
||||
<hr class="separator" />
|
||||
<div class="notes">Implementation of:</div>
|
||||
<dl>
|
||||
<dt><a href="../Ripcord/Ripcord_Documentor_Interface.html#methodhandle">Ripcord_Documentor_Interface::handle()</a></dt>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
<a name="methodsetMethodData" id="setMethodData"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">setMethodData</span> (line <span class="line-number">210</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method fills the list of method data with all the user supplied methods of the rpc server.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
setMethodData
|
||||
</span>
|
||||
(<span class="var-type">array</span> <span class="var-name">$methodData</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">array</span>
|
||||
<span class="var-name">$methodData</span><span class="var-description">: A list of methods with name and callback information.</span> </li>
|
||||
</ul>
|
||||
|
||||
<hr class="separator" />
|
||||
<div class="notes">Implementation of:</div>
|
||||
<dl>
|
||||
<dt><a href="../Ripcord/Ripcord_Documentor_Interface.html#methodsetMethodData">Ripcord_Documentor_Interface::setMethodData()</a></dt>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Tue, 16 Nov 2010 16:20:18 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
200
erp/ripcord/docs/Ripcord/Ripcord_Documentor_Interface.html
Normal file
200
erp/ripcord/docs/Ripcord/Ripcord_Documentor_Interface.html
Normal file
@ -0,0 +1,200 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Ripcord_Documentor_Interface</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Interface Ripcord_Documentor_Interface</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This interface defines the minimum methods any documentor needs to implement.</p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_ripcord_documentor.php.html">/ripcord_documentor.php</a> (line <span class="field">15</span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">Ripcord_Documentor_Interface</span>
|
||||
<a href="#__construct" title="details" class="method-name">__construct</a>
|
||||
([<span class="var-type"></span> <span class="var-name">$options</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#getIntrospectionXML" title="details" class="method-name">getIntrospectionXML</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#handle" title="details" class="method-name">handle</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$rpcServer</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#setMethodData" title="details" class="method-name">setMethodData</a>
|
||||
(<span class="var-type"></span> <span class="var-name">$methods</span>)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
|
||||
<a name="method__construct" id="__construct"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">Constructor __construct</span> (line <span class="line-number">17</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">Ripcord_Documentor_Interface</span>
|
||||
<span class="method-name">
|
||||
__construct
|
||||
</span>
|
||||
([<span class="var-type"></span> <span class="var-name">$options</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$options</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodgetIntrospectionXML" id="getIntrospectionXML"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">getIntrospectionXML</span> (line <span class="line-number">20</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
getIntrospectionXML
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodhandle" id="handle"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">handle</span> (line <span class="line-number">19</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
handle
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$rpcServer</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$rpcServer</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodsetMethodData" id="setMethodData"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">setMethodData</span> (line <span class="line-number">18</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
setMethodData
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">$methods</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$methods</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Tue, 16 Nov 2010 16:20:18 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
109
erp/ripcord/docs/Ripcord/Ripcord_Documentor_Parser.html
Normal file
109
erp/ripcord/docs/Ripcord/Ripcord_Documentor_Parser.html
Normal file
@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Ripcord_Documentor_Parser</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Interface Ripcord_Documentor_Parser</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This interface describes the minimum interface needed for a comment parser object used by the</p>
|
||||
<p class="description"><p>Ripcord_Documentor</p></p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_ripcord_documentor.php.html">/ripcord_documentor.php</a> (line <span class="field">489</span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">array</span>
|
||||
<a href="#parse" title="details" class="method-name">parse</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$commentBlock</span>)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
|
||||
<a name="methodparse" id="parse"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">parse</span> (line <span class="line-number">496</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method parses a given docComment block and returns an array with information.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> The parsed information.</li>
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">array</span>
|
||||
<span class="method-name">
|
||||
parse
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$commentBlock</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$commentBlock</span><span class="var-description">: The docComment block.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Tue, 16 Nov 2010 16:20:19 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
119
erp/ripcord/docs/Ripcord/Ripcord_Documentor_Parser_phpdoc.html
Normal file
119
erp/ripcord/docs/Ripcord/Ripcord_Documentor_Parser_phpdoc.html
Normal file
@ -0,0 +1,119 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Ripcord_Documentor_Parser_phpdoc</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Class Ripcord_Documentor_Parser_phpdoc</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<p class="implements">
|
||||
Implements interfaces:
|
||||
<ul>
|
||||
<li><a href="../Ripcord/Ripcord_Documentor_Parser.html">Ripcord_Documentor_Parser</a></li> </ul>
|
||||
</p>
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This class implements the Ripcord_Documentor_Parser interface, parsing the docComment as a phpdoc style docComment.</p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_ripcord_documentor.php.html">/ripcord_documentor.php</a> (line <span class="field">504</span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">array</span>
|
||||
<a href="#parse" title="details" class="method-name">parse</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$commentBlock</span>)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
|
||||
<a name="methodparse" id="parse"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">parse</span> (line <span class="line-number">512</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method parses a given docComment block and returns an array with information.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> The parsed information.</li>
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">array</span>
|
||||
<span class="method-name">
|
||||
parse
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$commentBlock</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$commentBlock</span><span class="var-description">: The docComment block.</span> </li>
|
||||
</ul>
|
||||
|
||||
<hr class="separator" />
|
||||
<div class="notes">Implementation of:</div>
|
||||
<dl>
|
||||
<dt><a href="../Ripcord/Ripcord_Documentor_Parser.html#methodparse">Ripcord_Documentor_Parser::parse()</a></dt>
|
||||
<dd>This method parses a given docComment block and returns an array with information.</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Tue, 16 Nov 2010 16:20:19 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
43
erp/ripcord/docs/Ripcord/Ripcord_Exception.html
Normal file
43
erp/ripcord/docs/Ripcord/Ripcord_Exception.html
Normal file
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Ripcord_Exception</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Interface Ripcord_Exception</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This interface is implemented by all exceptions thrown by Ripcord.</p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_ripcord.php.html">/ripcord.php</a> (line <span class="field">312</span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Tue, 16 Nov 2010 16:20:17 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
118
erp/ripcord/docs/Ripcord/Ripcord_InvalidArgumentException.html
Normal file
118
erp/ripcord/docs/Ripcord/Ripcord_InvalidArgumentException.html
Normal file
@ -0,0 +1,118 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Ripcord_InvalidArgumentException</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Class Ripcord_InvalidArgumentException</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-vars">Vars</a>
|
||||
| <a href="#sec-methods">Methods</a>
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<p class="implements">
|
||||
Implements interfaces:
|
||||
<ul>
|
||||
<li><a href="../Ripcord/Ripcord_Exception.html">Ripcord_Exception</a></li> </ul>
|
||||
</p>
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This class is used whenever an argument passed to a Ripcord method is invalid for any reason. Possible exceptions thrown are: <ul><li>ripcord::notRipcordCall (-2) Argument {index} is not a valid Ripcord call - Thrown by the client when passing incorrect arguments to system.multiCall.</li></ul></p>
|
||||
<p class="description"><p><ul><li>ripcord::cannotRecurse (-3) Cannot recurse system.multiCall - Thrown by the ripcord server when system.multicall is called within itself.</li><li>ripcord::notDateTime (-6) Variable is not of type datetime - Thrown by the ripcord timestamp method.</li><li>ripcord::notBase64 (-7) Variable is not of type base64 - Thrown by the ripcord binary method.</li><li>ripcord::unknownServiceType (-8) Variable is not a classname or an object - Thrown by the ripcord server.</li></ul></p></p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_ripcord.php.html">/ripcord.php</a> (line <span class="field">337</span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre>InvalidArgumentException
|
||||
|
|
||||
--Ripcord_InvalidArgumentException</pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="sec-vars"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variables</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Vars</span>
|
||||
|
||||
|
||||
|
|
||||
<a href="#sec-methods">Methods</a>
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<h4>Inherited Variables</h4>
|
||||
<A NAME='inherited_vars'><!-- --></A>
|
||||
<p>Inherited from <span class="classname">InvalidArgumentException (Internal Class)</span></p>
|
||||
<blockquote>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$code</span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$file</span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$line</span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$message</span><br>
|
||||
</span>
|
||||
</blockquote>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-vars">Vars</a>
|
||||
<span class="disabled">Methods</span>
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
|
||||
<h4>Inherited Methods</h4>
|
||||
<a name='inherited_methods'><!-- --></a>
|
||||
<!-- =========== Summary =========== -->
|
||||
<p>Inherited From <span class="classname">InvalidArgumentException (Internal Class)</span></p>
|
||||
<blockquote>
|
||||
<span class="method-name">constructor __construct ( [$message = ], [$code = ] )</span><br>
|
||||
<span class="method-name">getCode ( )</span><br>
|
||||
<span class="method-name">getFile ( )</span><br>
|
||||
<span class="method-name">getLine ( )</span><br>
|
||||
<span class="method-name">getMessage ( )</span><br>
|
||||
<span class="method-name">getTrace ( )</span><br>
|
||||
<span class="method-name">getTraceAsString ( )</span><br>
|
||||
<span class="method-name">__clone ( )</span><br>
|
||||
<span class="method-name">__toString ( )</span><br>
|
||||
</blockquote>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Tue, 16 Nov 2010 16:20:17 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
123
erp/ripcord/docs/Ripcord/Ripcord_RemoteException.html
Normal file
123
erp/ripcord/docs/Ripcord/Ripcord_RemoteException.html
Normal file
@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Ripcord_RemoteException</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Class Ripcord_RemoteException</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-vars">Vars</a>
|
||||
| <a href="#sec-methods">Methods</a>
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<p class="implements">
|
||||
Implements interfaces:
|
||||
<ul>
|
||||
<li><a href="../Ripcord/Ripcord_Exception.html">Ripcord_Exception</a></li> </ul>
|
||||
</p>
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This class is used for exceptions generated from xmlrpc faults returned by the server. The code and message correspond to the code and message from the xmlrpc fault.</p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_ripcord.php.html">/ripcord.php</a> (line <span class="field">351</span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre>Exception
|
||||
|
|
||||
--Ripcord_RemoteException</pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="sec-vars"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variables</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Vars</span>
|
||||
|
||||
|
||||
|
|
||||
<a href="#sec-methods">Methods</a>
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<h4>Inherited Variables</h4>
|
||||
<A NAME='inherited_vars'><!-- --></A>
|
||||
<p>Inherited from <span class="classname">Exception (Internal Class)</span></p>
|
||||
<blockquote>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$code</span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$file</span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$line</span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$message</span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$string</span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$trace</span><br>
|
||||
</span>
|
||||
</blockquote>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-vars">Vars</a>
|
||||
<span class="disabled">Methods</span>
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
|
||||
<h4>Inherited Methods</h4>
|
||||
<a name='inherited_methods'><!-- --></a>
|
||||
<!-- =========== Summary =========== -->
|
||||
<p>Inherited From <span class="classname">Exception (Internal Class)</span></p>
|
||||
<blockquote>
|
||||
<span class="method-name">constructor __construct ( [$message = ], [$code = ] )</span><br>
|
||||
<span class="method-name">getCode ( )</span><br>
|
||||
<span class="method-name">getFile ( )</span><br>
|
||||
<span class="method-name">getLine ( )</span><br>
|
||||
<span class="method-name">getMessage ( )</span><br>
|
||||
<span class="method-name">getTrace ( )</span><br>
|
||||
<span class="method-name">getTraceAsString ( )</span><br>
|
||||
<span class="method-name">__clone ( )</span><br>
|
||||
<span class="method-name">__toString ( )</span><br>
|
||||
</blockquote>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Tue, 16 Nov 2010 16:20:17 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
356
erp/ripcord/docs/Ripcord/Ripcord_Server.html
Normal file
356
erp/ripcord/docs/Ripcord/Ripcord_Server.html
Normal file
@ -0,0 +1,356 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Ripcord_Server</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Class Ripcord_Server</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This class implements the Ripcord server. It is an OO wrapper around PHP's XML-RPC methods, with some added features.</p>
|
||||
<p class="description"><p>You can create an XML-RPC (or Simple RPC or a simple SOAP 1.1) server by defining a class with public methods and passing an object (or array of objects) of this class to the constructor of Ripcord_Server. Then simply call the run() method.</p><p>A basic example: <div class="src-code"><ol><li><div class="src-line"> <span class="src-php"><?php</span></div></li>
|
||||
<li><div class="src-line"> <span class="src-var">$myObject </span>= <span class="src-key">new </span><span class="src-id">MyClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"> <span class="src-var">$server </span>= <span class="src-id"><a href="../Ripcord/ripcord.html">ripcord</a></span><span class="src-sym">::</span><a href="../Ripcord/ripcord.html#methodserver">server</a><span class="src-sym">( </span><span class="src-var">$myObject </span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"> <span class="src-var">$server</span><span class="src-sym">-></span><a href="../Ripcord/Ripcord_Server.html#methodrun">run</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"> <span class="src-php">?></span></div></li>
|
||||
</ol></div></p><p>An example with namespaces in the method names and a static class as rpc service. <div class="src-code"><ol><li><div class="src-line"> <span class="src-php"><?php</span></div></li>
|
||||
<li><div class="src-line"> <span class="src-var">$myObject </span>= <span class="src-key">new </span><span class="src-id">MyClass</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"> <span class="src-var">$server </span>= <span class="src-id"><a href="../Ripcord/ripcord.html">ripcord</a></span><span class="src-sym">::</span><a href="../Ripcord/ripcord.html#methodserver">server</a><span class="src-sym">(</span></div></li>
|
||||
<li><div class="src-line"> <span class="src-key">array</span><span class="src-sym">(</span></div></li>
|
||||
<li><div class="src-line"> <span class="src-str">'namespace1' </span>=> <span class="src-var">$myObject</span><span class="src-sym">,</span></div></li>
|
||||
<li><div class="src-line"> <span class="src-str">'namespace2' </span>=> <span class="src-str">'myOtherClass'</span></div></li>
|
||||
<li><div class="src-line"> <span class="src-sym">)</span></div></li>
|
||||
<li><div class="src-line"> <span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"> <span class="src-var">$server</span><span class="src-sym">-></span><a href="../Ripcord/Ripcord_Server.html#methodrun">run</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
|
||||
<li><div class="src-line"> <span class="src-php">?></span></div></li>
|
||||
</ol></div></p><p>You don't need to instantiate a class to use it with Ripcord, in the above example 'myOtherClass' is the name of a PHP class to use. In addition you may also specify functions or methods directly, in any format that matches PHP's is_callable() criteria.</p></p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_ripcord_server.php.html">/ripcord_server.php</a> (line <span class="field">49</span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">Ripcord_Server</span>
|
||||
<a href="#__construct" title="details" class="method-name">__construct</a>
|
||||
([<span class="var-type"></span> <span class="var-name">$services</span> = <span class="var-default">null</span>], [<span class="var-type"></span> <span class="var-name">$options</span> = <span class="var-default">null</span>], [<span class="var-type"></span> <span class="var-name">$documentor</span> = <span class="var-default">null</span>], <span class="var-type">mixed</span> <span class="var-name">$services.</span>, <span class="var-type">array</span> <span class="var-name">$options.</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#addMethod" title="details" class="method-name">addMethod</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$name</span>, <span class="var-type">callback</span> <span class="var-name">$method</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#addService" title="details" class="method-name">addService</a>
|
||||
(<span class="var-type">object</span> <span class="var-name">$service</span>, [<span class="var-type">string</span> <span class="var-name">$serviceName</span> = <span class="var-default">0</span>])
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<span class="method-result">mixed</span>
|
||||
<a href="#call" title="details" class="method-name">call</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$method</span>, [<span class="var-type">array</span> <span class="var-name">$args</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<span class="method-result">string</span>
|
||||
<a href="#handle" title="details" class="method-name">handle</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$request_xml</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#run" title="details" class="method-name">run</a>
|
||||
()
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#setOutputOption" title="details" class="method-name">setOutputOption</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$option</span>, <span class="var-type">mixed</span> <span class="var-name">$value</span>)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
|
||||
<a name="method__construct" id="__construct"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">Constructor __construct</span> (line <span class="line-number">97</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Creates a new instance of the Ripcord server.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">see:</span> <a href="../Ripcord/Ripcord_Server.html#methodsetOutputOption">Ripcord_Server::setOutputOption()</a></li>
|
||||
<li><span class="field">throws:</span> Ripcord_InvalidArgumentException (ripcord::unknownServiceType) when passed an incorrect service</li>
|
||||
<li><span class="field">throws:</span> Ripcord_ConfigurationException (ripcord::xmlrpcNotInstalled) when the xmlrpc extension in not available.</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">Ripcord_Server</span>
|
||||
<span class="method-name">
|
||||
__construct
|
||||
</span>
|
||||
([<span class="var-type"></span> <span class="var-name">$services</span> = <span class="var-default">null</span>], [<span class="var-type"></span> <span class="var-name">$options</span> = <span class="var-default">null</span>], [<span class="var-type"></span> <span class="var-name">$documentor</span> = <span class="var-default">null</span>], <span class="var-type">mixed</span> <span class="var-name">$services.</span>, <span class="var-type">array</span> <span class="var-name">$options.</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$services.</span><span class="var-description">: Optional. An object or array of objects. The public methods in these objects will be exposed through the RPC server. If the services array has non-numeric keys, the key for each object will define its namespace.</span> </li>
|
||||
<li>
|
||||
<span class="var-type">array</span>
|
||||
<span class="var-name">$options.</span><span class="var-description">: Optional. Allows you to override the default server settings. Accepted key names are: <ul><li>'documentor': allows you to specify an alternative HTML documentor class, or if set to false, no HTML documentor.</li><li>'name' : The name of the server, used by the default HTML documentor.</li><li>'css' : An url of a css file to link to in the HTML documentation.</li><li>'wsdl' : The wsdl 1.0 description of this service (only usefull if you run the 'soap 1.1' version, or the 'auto' version</li><li>'wsdl2' : The wsdl 2.0 description of this service</li></ul> In addition you can set any of the outputOptions for the xmlrpc server.</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$services</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$options</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$documentor</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodaddMethod" id="addMethod"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">addMethod</span> (line <span class="line-number">185</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Allows you to add a single method to the server after construction.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
addMethod
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$name</span>, <span class="var-type">callback</span> <span class="var-name">$method</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$name</span><span class="var-description">: The name of the method as exposed through the rpc server</span> </li>
|
||||
<li>
|
||||
<span class="var-type">callback</span>
|
||||
<span class="var-name">$method</span><span class="var-description">: The name of the method to call, or an array with classname or object and method name.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodaddService" id="addService"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">addService</span> (line <span class="line-number">134</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Allows you to add a service to the server after construction.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">throws:</span> Ripcord_InvalidArgumentException (ripcord::unknownServiceType) when passed an incorrect service</li>
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
addService
|
||||
</span>
|
||||
(<span class="var-type">object</span> <span class="var-name">$service</span>, [<span class="var-type">string</span> <span class="var-name">$serviceName</span> = <span class="var-default">0</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">object</span>
|
||||
<span class="var-name">$service</span><span class="var-description">: The object or class whose public methods must be added to the rpc server. May also be a function or method.</span> </li>
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$serviceName</span><span class="var-description">: Optional. The namespace for the methods.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodcall" id="call"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">call</span> (line <span class="line-number">340</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Calls a method by its rpc name.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">throws:</span> Ripcord_BadMethodCallException (ripcord::methodNotFound) when the requested method isn't available.</li>
|
||||
<li><span class="field">throws:</span> Ripcord_InvalidArgumentException (ripcord::cannotRecurse) when passed a recursive multiCall</li>
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">mixed</span>
|
||||
<span class="method-name">
|
||||
call
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$method</span>, [<span class="var-type">array</span> <span class="var-name">$args</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$method</span><span class="var-description">: The rpc name of the method</span> </li>
|
||||
<li>
|
||||
<span class="var-type">array</span>
|
||||
<span class="var-name">$args</span><span class="var-description">: The arguments to this method</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodhandle" id="handle"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">handle</span> (line <span class="line-number">301</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Handles the given request xml</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">string</span>
|
||||
<span class="method-name">
|
||||
handle
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$request_xml</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$request_xml</span><span class="var-description">: The incoming request.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodrun" id="run"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">run</span> (line <span class="line-number">197</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Runs the rpc server. Automatically handles an incoming request.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
run
|
||||
</span>
|
||||
()
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodsetOutputOption" id="setOutputOption"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">setOutputOption</span> (line <span class="line-number">382</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Allows you to set specific output options of the server after construction.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
setOutputOption
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$option</span>, <span class="var-type">mixed</span> <span class="var-name">$value</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$option</span><span class="var-description">: The name of the option</span> </li>
|
||||
<li>
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$value</span><span class="var-description">: The value of the option The options are: <ul><li>output_type: Return data as either php native data or xml encoded. Can be either 'php' or 'xml'. 'xml' is the default.</li><li>verbosity: Determines the compactness of generated xml. Can be either 'no_white_space', 'newlines_only' or 'pretty'.
|
||||
'pretty' is the default.</li><li>escaping: Determines how/whether to escape certain characters. 1 or more values are allowed. If multiple, they need
|
||||
to be specified as a sub-array. Options are: 'cdata', 'non-ascii', 'non-print' and 'markup'. Default is 'non-ascii',
|
||||
'non-print' and 'markup'.</li><li>version: Version of the xml vocabulary to use. Currently, three are supported: 'xmlrpc', 'soap 1.1' and 'simple'. The
|
||||
keyword 'auto' is also recognized and tells the server to respond in whichever version the request cam in. 'auto' is
|
||||
the default.</li><li>encoding: The character encoding that the data is in. Can be any supported character encoding. Default is 'utf-8'.</li></ul></span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Tue, 16 Nov 2010 16:20:19 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
112
erp/ripcord/docs/Ripcord/Ripcord_Transport.html
Normal file
112
erp/ripcord/docs/Ripcord/Ripcord_Transport.html
Normal file
@ -0,0 +1,112 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Ripcord_Transport</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Interface Ripcord_Transport</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This interface describes the minimum interface needed for the transport object used by the</p>
|
||||
<p class="description"><p>Ripcord_Client</p></p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_ripcord_client.php.html">/ripcord_client.php</a> (line <span class="field">425</span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">string</span>
|
||||
<a href="#post" title="details" class="method-name">post</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$url</span>, <span class="var-type">string</span> <span class="var-name">$request</span>)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
|
||||
<a name="methodpost" id="post"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">post</span> (line <span class="line-number">433</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method must post the request to the given url and return the results.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> The server response</li>
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">string</span>
|
||||
<span class="method-name">
|
||||
post
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$url</span>, <span class="var-type">string</span> <span class="var-name">$request</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$url</span><span class="var-description">: The url to post to.</span> </li>
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$request</span><span class="var-description">: The request to post.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Tue, 16 Nov 2010 16:20:18 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
117
erp/ripcord/docs/Ripcord/Ripcord_TransportException.html
Normal file
117
erp/ripcord/docs/Ripcord/Ripcord_TransportException.html
Normal file
@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Ripcord_TransportException</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Class Ripcord_TransportException</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-vars">Vars</a>
|
||||
| <a href="#sec-methods">Methods</a>
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<p class="implements">
|
||||
Implements interfaces:
|
||||
<ul>
|
||||
<li><a href="../Ripcord/Ripcord_Exception.html">Ripcord_Exception</a></li> </ul>
|
||||
</p>
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This class is used whenever something goes wrong in sending / receiving data. Possible exceptions thrown are: <ul><li>ripcord::cannotAccessURL (-4) Could not access {url} - Thrown by the transport object when unable to access the given url.</li></ul></p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_ripcord.php.html">/ripcord.php</a> (line <span class="field">344</span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre>RuntimeException
|
||||
|
|
||||
--Ripcord_TransportException</pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="sec-vars"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variables</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Vars</span>
|
||||
|
||||
|
||||
|
|
||||
<a href="#sec-methods">Methods</a>
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<h4>Inherited Variables</h4>
|
||||
<A NAME='inherited_vars'><!-- --></A>
|
||||
<p>Inherited from <span class="classname">RuntimeException (Internal Class)</span></p>
|
||||
<blockquote>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$code</span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$file</span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$line</span><br>
|
||||
</span>
|
||||
<span class="var-title">
|
||||
<span class="var-name">$message</span><br>
|
||||
</span>
|
||||
</blockquote>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-vars">Vars</a>
|
||||
<span class="disabled">Methods</span>
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
|
||||
<h4>Inherited Methods</h4>
|
||||
<a name='inherited_methods'><!-- --></a>
|
||||
<!-- =========== Summary =========== -->
|
||||
<p>Inherited From <span class="classname">RuntimeException (Internal Class)</span></p>
|
||||
<blockquote>
|
||||
<span class="method-name">constructor __construct ( [$message = ], [$code = ] )</span><br>
|
||||
<span class="method-name">getCode ( )</span><br>
|
||||
<span class="method-name">getFile ( )</span><br>
|
||||
<span class="method-name">getLine ( )</span><br>
|
||||
<span class="method-name">getMessage ( )</span><br>
|
||||
<span class="method-name">getTrace ( )</span><br>
|
||||
<span class="method-name">getTraceAsString ( )</span><br>
|
||||
<span class="method-name">__clone ( )</span><br>
|
||||
<span class="method-name">__toString ( )</span><br>
|
||||
</blockquote>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Tue, 16 Nov 2010 16:20:17 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
219
erp/ripcord/docs/Ripcord/Ripcord_Transport_CURL.html
Normal file
219
erp/ripcord/docs/Ripcord/Ripcord_Transport_CURL.html
Normal file
@ -0,0 +1,219 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Ripcord_Transport_CURL</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Class Ripcord_Transport_CURL</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<p class="implements">
|
||||
Implements interfaces:
|
||||
<ul>
|
||||
<li><a href="../Ripcord/Ripcord_Transport.html">Ripcord_Transport</a></li> </ul>
|
||||
</p>
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This class implements the Ripcord_Transport interface using CURL.</p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_ripcord_client.php.html">/ripcord_client.php</a> (line <span class="field">499</span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<a name="sec-var-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variable Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="var-summary">
|
||||
<div class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<a href="#$responseHeaders" title="details" class="var-name">$responseHeaders</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
|
||||
|
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">Ripcord_Transport_CURL</span>
|
||||
<a href="#__construct" title="details" class="method-name">__construct</a>
|
||||
([<span class="var-type">array</span> <span class="var-name">$curlOptions</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<span class="method-result">string</span>
|
||||
<a href="#post" title="details" class="method-name">post</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$url</span>, <span class="var-type">string</span> <span class="var-name">$request</span>)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-vars"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variables</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
|
||||
|
||||
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="var$responseHeaders" id="$responseHeaders"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$responseHeaders</span>
|
||||
= <span class="var-default"> null</span> (line <span class="line-number">514</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Contains the headers sent by the server.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
|
||||
<a name="method__construct" id="__construct"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">Constructor __construct</span> (line <span class="line-number">520</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This is the constructor for the Ripcord_Transport_CURL class.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">Ripcord_Transport_CURL</span>
|
||||
<span class="method-name">
|
||||
__construct
|
||||
</span>
|
||||
([<span class="var-type">array</span> <span class="var-name">$curlOptions</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">array</span>
|
||||
<span class="var-name">$curlOptions</span><span class="var-description">: A list of CURL options.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodpost" id="post"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">post</span> (line <span class="line-number">539</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method posts the request to the given url</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> The server response</li>
|
||||
<li><span class="field">throws:</span> Ripcord_TransportException (ripcord::cannotAccessURL) when the given URL cannot be accessed for any reason.</li>
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">string</span>
|
||||
<span class="method-name">
|
||||
post
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$url</span>, <span class="var-type">string</span> <span class="var-name">$request</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$url</span><span class="var-description">: The url to post to.</span> </li>
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$request</span><span class="var-description">: The request to post.</span> </li>
|
||||
</ul>
|
||||
|
||||
<hr class="separator" />
|
||||
<div class="notes">Implementation of:</div>
|
||||
<dl>
|
||||
<dt><a href="../Ripcord/Ripcord_Transport.html#methodpost">Ripcord_Transport::post()</a></dt>
|
||||
<dd>This method must post the request to the given url and return the results.</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Tue, 16 Nov 2010 16:20:18 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
219
erp/ripcord/docs/Ripcord/Ripcord_Transport_Stream.html
Normal file
219
erp/ripcord/docs/Ripcord/Ripcord_Transport_Stream.html
Normal file
@ -0,0 +1,219 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class Ripcord_Transport_Stream</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Class Ripcord_Transport_Stream</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
| <a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<p class="implements">
|
||||
Implements interfaces:
|
||||
<ul>
|
||||
<li><a href="../Ripcord/Ripcord_Transport.html">Ripcord_Transport</a></li> </ul>
|
||||
</p>
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This class implements the Ripcord_Transport interface using PHP streams.</p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_ripcord_client.php.html">/ripcord_client.php</a> (line <span class="field">440</span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<a name="sec-var-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variable Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="var-summary">
|
||||
<div class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<a href="#$responseHeaders" title="details" class="var-name">$responseHeaders</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
|
||||
|
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">Ripcord_Transport_Stream</span>
|
||||
<a href="#__construct" title="details" class="method-name">__construct</a>
|
||||
([<span class="var-type">array</span> <span class="var-name">$contextOptions</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
<span class="method-result">string</span>
|
||||
<a href="#post" title="details" class="method-name">post</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$url</span>, <span class="var-type">string</span> <span class="var-name">$request</span>)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-vars"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Variables</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
|
||||
|
||||
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="var$responseHeaders" id="$responseHeaders"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="var-header">
|
||||
<span class="var-title">
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$responseHeaders</span>
|
||||
= <span class="var-default"> null</span> (line <span class="line-number">450</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Contains the headers sent by the server.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
|
||||
<a name="method__construct" id="__construct"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">Constructor __construct</span> (line <span class="line-number">456</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This is the constructor for the Ripcord_Transport_Stream class.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">Ripcord_Transport_Stream</span>
|
||||
<span class="method-name">
|
||||
__construct
|
||||
</span>
|
||||
([<span class="var-type">array</span> <span class="var-name">$contextOptions</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">array</span>
|
||||
<span class="var-name">$contextOptions</span><span class="var-description">: Optional. An array with stream context options.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodpost" id="post"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">post</span> (line <span class="line-number">471</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method posts the request to the given url.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">return:</span> The server response</li>
|
||||
<li><span class="field">throws:</span> Ripcord_TransportException (ripcord::cannotAccessURL) when the given URL cannot be accessed for any reason.</li>
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">string</span>
|
||||
<span class="method-name">
|
||||
post
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$url</span>, <span class="var-type">string</span> <span class="var-name">$request</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$url</span><span class="var-description">: The url to post to.</span> </li>
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$request</span><span class="var-description">: The request to post.</span> </li>
|
||||
</ul>
|
||||
|
||||
<hr class="separator" />
|
||||
<div class="notes">Implementation of:</div>
|
||||
<dl>
|
||||
<dt><a href="../Ripcord/Ripcord_Transport.html#methodpost">Ripcord_Transport::post()</a></dt>
|
||||
<dd>This method must post the request to the given url and return the results.</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Tue, 16 Nov 2010 16:20:18 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
115
erp/ripcord/docs/Ripcord/_ripcord.php.html
Normal file
115
erp/ripcord/docs/Ripcord/_ripcord.php.html
Normal file
@ -0,0 +1,115 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs for page ripcord.php</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="file-name">/ripcord.php</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Ripcord is an easy to use XML-RPC library for PHP.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">author:</span> Auke van Slooten <<a href="mailto:auke@muze.nl">auke@muze.nl</a>></li>
|
||||
<li><span class="field">version:</span> Ripcord 0.9 - PHP 5</li>
|
||||
<li><span class="field">copyright:</span> Copyright (C) 2010, Muze <www.muze.nl></li>
|
||||
<li><span class="field">license:</span> <a href="http://opensource.org/licenses/gpl-3.0.html">GNU Public License</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-classes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Classes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Classes</span>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../Ripcord/ripcord.html">ripcord</a>
|
||||
</td>
|
||||
<td>
|
||||
The ripcord class contains a number of useful static methods. This makes it a bit easier to create a server or client, convert types and check for errors.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../Ripcord/Ripcord_Exception.html">Ripcord_Exception</a>
|
||||
</td>
|
||||
<td>
|
||||
This interface is implemented by all exceptions thrown by Ripcord.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../Ripcord/Ripcord_BadMethodCallException.html">Ripcord_BadMethodCallException</a>
|
||||
</td>
|
||||
<td>
|
||||
This class is used whenever an when a method passed to the server is invalid.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../Ripcord/Ripcord_ConfigurationException.html">Ripcord_ConfigurationException</a>
|
||||
</td>
|
||||
<td>
|
||||
This class is used whenever prerequisite requirements are not met.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../Ripcord/Ripcord_InvalidArgumentException.html">Ripcord_InvalidArgumentException</a>
|
||||
</td>
|
||||
<td>
|
||||
This class is used whenever an argument passed to a Ripcord method is invalid for any reason. Possible exceptions thrown are: <ul><li>ripcord::notRipcordCall (-2) Argument {index} is not a valid Ripcord call - Thrown by the client when passing incorrect arguments to system.multiCall.</li></ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../Ripcord/Ripcord_TransportException.html">Ripcord_TransportException</a>
|
||||
</td>
|
||||
<td>
|
||||
This class is used whenever something goes wrong in sending / receiving data. Possible exceptions thrown are: <ul><li>ripcord::cannotAccessURL (-4) Could not access {url} - Thrown by the transport object when unable to access the given url.</li></ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../Ripcord/Ripcord_RemoteException.html">Ripcord_RemoteException</a>
|
||||
</td>
|
||||
<td>
|
||||
This class is used for exceptions generated from xmlrpc faults returned by the server. The code and message correspond to the code and message from the xmlrpc fault.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Tue, 16 Nov 2010 16:20:15 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
135
erp/ripcord/docs/Ripcord/_ripcord_client.php.html
Normal file
135
erp/ripcord/docs/Ripcord/_ripcord_client.php.html
Normal file
@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs for page ripcord_client.php</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="file-name">/ripcord_client.php</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
| <a href="#sec-includes">Includes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Ripcord is an easy to use XML-RPC library for PHP.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">author:</span> Auke van Slooten <<a href="mailto:auke@muze.nl">auke@muze.nl</a>></li>
|
||||
<li><span class="field">version:</span> Ripcord 0.9 - PHP 5</li>
|
||||
<li><span class="field">copyright:</span> Copyright (C) 2010, Muze <www.muze.nl></li>
|
||||
<li><span class="field">license:</span> <a href="http://opensource.org/licenses/gpl-3.0.html">GNU Public License</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-classes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Classes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Classes</span>
|
||||
| <a href="#sec-includes">Includes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../Ripcord/Ripcord_Client.html">Ripcord_Client</a>
|
||||
</td>
|
||||
<td>
|
||||
This class implements a simple RPC client, for XML-RPC, (simplified) SOAP 1.1 or Simple RPC. The client abstracts the entire RPC process behind native PHP methods. Any method defined by the rpc server can be called as if it was a native method of the rpc client.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../Ripcord/Ripcord_Client_MultiCall.html">Ripcord_Client_MultiCall</a>
|
||||
</td>
|
||||
<td>
|
||||
This class provides the fetch interface for system.multiCall. It is returned
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../Ripcord/Ripcord_Client_Call.html">Ripcord_Client_Call</a>
|
||||
</td>
|
||||
<td>
|
||||
This class is used with the Ripcord_Client when calling system.multiCall. Instead of immediately calling the method on the rpc server, a Ripcord_Client_Call object is created with all the information needed to call the method using the multicall parameters. The call object is returned immediately and is used as input parameter for the multiCall call. The result of the call can be bound to a php variable. This variable will be filled with the result of the call when it is available.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../Ripcord/Ripcord_Transport.html">Ripcord_Transport</a>
|
||||
</td>
|
||||
<td>
|
||||
This interface describes the minimum interface needed for the transport object used by the
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../Ripcord/Ripcord_Transport_Stream.html">Ripcord_Transport_Stream</a>
|
||||
</td>
|
||||
<td>
|
||||
This class implements the Ripcord_Transport interface using PHP streams.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../Ripcord/Ripcord_Transport_CURL.html">Ripcord_Transport_CURL</a>
|
||||
</td>
|
||||
<td>
|
||||
This class implements the Ripcord_Transport interface using CURL.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-includes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Includes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
| <span class="disabled">Includes</span>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="_dirname(__FILE__)_/ripcord_php"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div>
|
||||
<span class="include-title">
|
||||
<span class="include-type">require_once</span>
|
||||
(<span class="include-name">dirname(__FILE__).'/ripcord.php'</span>)
|
||||
(line <span class="line-number">14</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Includes the static ripcord factory class and exceptions</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Tue, 16 Nov 2010 16:20:17 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
91
erp/ripcord/docs/Ripcord/_ripcord_documentor.php.html
Normal file
91
erp/ripcord/docs/Ripcord/_ripcord_documentor.php.html
Normal file
@ -0,0 +1,91 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs for page ripcord_documentor.php</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="file-name">/ripcord_documentor.php</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Ripcord is an easy to use XML-RPC library for PHP.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">author:</span> Auke van Slooten <<a href="mailto:auke@muze.nl">auke@muze.nl</a>></li>
|
||||
<li><span class="field">version:</span> Ripcord 0.9 - PHP 5</li>
|
||||
<li><span class="field">copyright:</span> Copyright (C) 2010, Muze <www.muze.nl></li>
|
||||
<li><span class="field">license:</span> <a href="http://opensource.org/licenses/gpl-3.0.html">GNU Public License</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-classes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Classes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Classes</span>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../Ripcord/Ripcord_Documentor_Interface.html">Ripcord_Documentor_Interface</a>
|
||||
</td>
|
||||
<td>
|
||||
This interface defines the minimum methods any documentor needs to implement.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../Ripcord/Ripcord_Documentor.html">Ripcord_Documentor</a>
|
||||
</td>
|
||||
<td>
|
||||
This class implements the default documentor for the ripcord server. Any request to the server without a request_xml is handled by the documentor.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../Ripcord/Ripcord_Documentor_Parser.html">Ripcord_Documentor_Parser</a>
|
||||
</td>
|
||||
<td>
|
||||
This interface describes the minimum interface needed for a comment parser object used by the
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../Ripcord/Ripcord_Documentor_Parser_phpdoc.html">Ripcord_Documentor_Parser_phpdoc</a>
|
||||
</td>
|
||||
<td>
|
||||
This class implements the Ripcord_Documentor_Parser interface, parsing the docComment as a phpdoc style docComment.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Tue, 16 Nov 2010 16:20:18 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
95
erp/ripcord/docs/Ripcord/_ripcord_server.php.html
Normal file
95
erp/ripcord/docs/Ripcord/_ripcord_server.php.html
Normal file
@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs for page ripcord_server.php</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="file-name">/ripcord_server.php</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
| <a href="#sec-includes">Includes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Ripcord is an easy to use XML-RPC library for PHP.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">author:</span> Auke van Slooten <<a href="mailto:auke@muze.nl">auke@muze.nl</a>></li>
|
||||
<li><span class="field">version:</span> Ripcord 0.9 - PHP 5</li>
|
||||
<li><span class="field">copyright:</span> Copyright (C) 2010, Muze <www.muze.nl></li>
|
||||
<li><span class="field">license:</span> <a href="http://opensource.org/licenses/gpl-3.0.html">GNU Public License</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-classes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Classes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Classes</span>
|
||||
| <a href="#sec-includes">Includes</a>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<table cellpadding="2" cellspacing="0" class="class-table">
|
||||
<tr>
|
||||
<th class="class-table-header">Class</th>
|
||||
<th class="class-table-header">Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 2em; vertical-align: top">
|
||||
<a href="../Ripcord/Ripcord_Server.html">Ripcord_Server</a>
|
||||
</td>
|
||||
<td>
|
||||
This class implements the Ripcord server. It is an OO wrapper around PHP's XML-RPC methods, with some added features.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-includes"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Includes</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-classes">Classes</a>
|
||||
| <span class="disabled">Includes</span>
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="_dirname(__FILE__)_/ripcord_php"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div>
|
||||
<span class="include-title">
|
||||
<span class="include-type">require_once</span>
|
||||
(<span class="include-name">dirname(__FILE__).'/ripcord.php'</span>)
|
||||
(line <span class="line-number">14</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Includes the static ripcord factory class and exceptions</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Tue, 16 Nov 2010 16:20:19 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
887
erp/ripcord/docs/Ripcord/ripcord.html
Normal file
887
erp/ripcord/docs/Ripcord/ripcord.html
Normal file
@ -0,0 +1,887 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>Docs For Class ripcord</title>
|
||||
<link rel="stylesheet" href="../media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-body">
|
||||
<h2 class="class-name">Class ripcord</h2>
|
||||
|
||||
<a name="sec-description"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Description</div>
|
||||
<div class="nav-bar">
|
||||
<span class="disabled">Description</span> |
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">The ripcord class contains a number of useful static methods. This makes it a bit easier to create a server or client, convert types and check for errors.</p>
|
||||
<p class="notes">
|
||||
Located in <a class="field" href="_ripcord.php.html">/ripcord.php</a> (line <span class="field">16</span>)
|
||||
</p>
|
||||
|
||||
|
||||
<pre></pre>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-const-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Class Constant Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<span class="disabled">Constants</span> (<a href="#sec-consts">details</a>)
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="const-summary">
|
||||
<div class="const-title">
|
||||
<img src="../media/images/Constant.png" alt=" " />
|
||||
<a href="#cannotAccessURL" title="details" class="const-name">cannotAccessURL</a> = <span class="var-type"> -4</span>
|
||||
|
||||
</div>
|
||||
<div class="const-title">
|
||||
<img src="../media/images/Constant.png" alt=" " />
|
||||
<a href="#cannotRecurse" title="details" class="const-name">cannotRecurse</a> = <span class="var-type"> -3</span>
|
||||
|
||||
</div>
|
||||
<div class="const-title">
|
||||
<img src="../media/images/Constant.png" alt=" " />
|
||||
<a href="#methodNotFound" title="details" class="const-name">methodNotFound</a> = <span class="var-type"> -1</span>
|
||||
|
||||
</div>
|
||||
<div class="const-title">
|
||||
<img src="../media/images/Constant.png" alt=" " />
|
||||
<a href="#notBase64" title="details" class="const-name">notBase64</a> = <span class="var-type"> -7</span>
|
||||
|
||||
</div>
|
||||
<div class="const-title">
|
||||
<img src="../media/images/Constant.png" alt=" " />
|
||||
<a href="#notDatetime" title="details" class="const-name">notDatetime</a> = <span class="var-type"> -6</span>
|
||||
|
||||
</div>
|
||||
<div class="const-title">
|
||||
<img src="../media/images/Constant.png" alt=" " />
|
||||
<a href="#notRipcordCall" title="details" class="const-name">notRipcordCall</a> = <span class="var-type"> -2</span>
|
||||
|
||||
</div>
|
||||
<div class="const-title">
|
||||
<img src="../media/images/Constant.png" alt=" " />
|
||||
<a href="#unknownServiceType" title="details" class="const-name">unknownServiceType</a> = <span class="var-type"> -8</span>
|
||||
|
||||
</div>
|
||||
<div class="const-title">
|
||||
<img src="../media/images/Constant.png" alt=" " />
|
||||
<a href="#xmlrpcNotInstalled" title="details" class="const-name">xmlrpcNotInstalled</a> = <span class="var-type"> -5</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-method-summary"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Method Summary</span></div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<div class="method-summary">
|
||||
<div class="method-definition">
|
||||
static <span class="method-result">object</span>
|
||||
<a href="#base64" title="details" class="method-name">base64</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$binary</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
static <span class="method-result">string</span>
|
||||
<a href="#binary" title="details" class="method-name">binary</a>
|
||||
(<span class="var-type">object</span> <span class="var-name">$base64</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
static <span class="method-result">void</span>
|
||||
<a href="#client" title="details" class="method-name">client</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$url</span>, [<span class="var-type">array</span> <span class="var-name">$options</span> = <span class="var-default">null</span>], [<span class="var-type"></span> <span class="var-name">$transport</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
static <span class="method-result">object</span>
|
||||
<a href="#datetime" title="details" class="method-name">datetime</a>
|
||||
(<span class="var-type">int</span> <span class="var-name">$timestamp</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
static <span class="method-result">void</span>
|
||||
<a href="#documentor" title="details" class="method-name">documentor</a>
|
||||
([<span class="var-type">array</span> <span class="var-name">$options</span> = <span class="var-default">null</span>], [<span class="var-type">object docCommentParser</span> <span class="var-name">$docCommentParser</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
static <span class="method-result">object</span>
|
||||
<a href="#encodeCall" title="details" class="method-name">encodeCall</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$method</span>, <span class="var-type">mixed</span> <span class="var-name">$args,...</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
static <span class="method-result">array</span>
|
||||
<a href="#fault" title="details" class="method-name">fault</a>
|
||||
(<span class="var-type">int</span> <span class="var-name">$code</span>, <span class="var-type">string</span> <span class="var-name">$message</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
static <span class="method-result">string</span>
|
||||
<a href="#getType" title="details" class="method-name">getType</a>
|
||||
(<span class="var-type">mixed</span> <span class="var-name">$param</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
static <span class="method-result">bool</span>
|
||||
<a href="#isFault" title="details" class="method-name">isFault</a>
|
||||
(<span class="var-type">mixed</span> <span class="var-name">$fault</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
static <span class="method-result">boolean</span>
|
||||
<a href="#load" title="details" class="method-name">load</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$class</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
static <span class="method-result">void</span>
|
||||
<a href="#server" title="details" class="method-name">server</a>
|
||||
([<span class="var-type">mixed</span> <span class="var-name">$services</span> = <span class="var-default">null</span>], [<span class="var-type">array</span> <span class="var-name">$options</span> = <span class="var-default">null</span>], [<span class="var-type"></span> <span class="var-name">$documentor</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
static <span class="method-result">object</span>
|
||||
<a href="#simpleClient" title="details" class="method-name">simpleClient</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$url</span>, [<span class="var-type">array</span> <span class="var-name">$options</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
static <span class="method-result">void</span>
|
||||
<a href="#soapClient" title="details" class="method-name">soapClient</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$url</span>, [<span class="var-type">array</span> <span class="var-name">$options</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
static <span class="method-result">int</span>
|
||||
<a href="#timestamp" title="details" class="method-name">timestamp</a>
|
||||
(<span class="var-type">object</span> <span class="var-name">$datetime</span>)
|
||||
</div>
|
||||
<div class="method-definition">
|
||||
static <span class="method-result">object</span>
|
||||
<a href="#xmlrpcClient" title="details" class="method-name">xmlrpcClient</a>
|
||||
(<span class="var-type">string</span> <span class="var-name">$url</span>, [<span class="var-type">array</span> <span class="var-name">$options</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
|
||||
<div class="method-definition">
|
||||
<span class="method-result">void</span>
|
||||
<a href="#bind" title="details" class="method-name">bind</a>
|
||||
(<span class="var-type"></span> <span class="var-name">&$bound</span>, <span class="var-type"></span> <span class="var-name">$call</span>)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a name="sec-methods"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Methods</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
|
||||
|
||||
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<A NAME='method_detail'></A>
|
||||
<a name="methodbase64" id="base64"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">static method base64</span> (line <span class="line-number">139</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method returns an XML-RPC base64 object from a given binary string.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
static
|
||||
<span class="method-result">object</span>
|
||||
<span class="method-name">
|
||||
base64
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$binary</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$binary</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodbinary" id="binary"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">static method binary</span> (line <span class="line-number">152</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method returns a (binary) string from a given XML-RPC base64 object.</p>
|
||||
<p class="description"><p>It will throw a 'Variable is not of type base64' Ripcord_Exception (code -7) if the given argument is not of the correct type.</p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
static
|
||||
<span class="method-result">string</span>
|
||||
<span class="method-name">
|
||||
binary
|
||||
</span>
|
||||
(<span class="var-type">object</span> <span class="var-name">$base64</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">object</span>
|
||||
<span class="var-name">$base64</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodclient" id="client"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">static method client</span> (line <span class="line-number">79</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method returns a new Ripcord client. By default this will be an XML-RPC client, but you can change this through the $options argument.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">see:</span> <a href="../Ripcord/Ripcord_Client.html">Ripcord_Client</a></li>
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
static
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
client
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$url</span>, [<span class="var-type">array</span> <span class="var-name">$options</span> = <span class="var-default">null</span>], [<span class="var-type"></span> <span class="var-name">$transport</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$url</span><span class="var-description">: The url of the RPC server to connect with</span> </li>
|
||||
<li>
|
||||
<span class="var-type">array</span>
|
||||
<span class="var-name">$options</span><span class="var-description">: Optional. An array of options to set for the Ripcord client.</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$transport</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methoddatetime" id="datetime"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">static method datetime</span> (line <span class="line-number">110</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method returns an XML-RPC datetime object from a given unix timestamp.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
static
|
||||
<span class="method-result">object</span>
|
||||
<span class="method-name">
|
||||
datetime
|
||||
</span>
|
||||
(<span class="var-type">int</span> <span class="var-name">$timestamp</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">int</span>
|
||||
<span class="var-name">$timestamp</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methoddocumentor" id="documentor"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">static method documentor</span> (line <span class="line-number">96</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method returns a new Ripcord documentor object.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">see:</span> <a href="../Ripcord/Ripcord_Client.html">Ripcord_Client</a></li>
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
static
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
documentor
|
||||
</span>
|
||||
([<span class="var-type">array</span> <span class="var-name">$options</span> = <span class="var-default">null</span>], [<span class="var-type">object docCommentParser</span> <span class="var-name">$docCommentParser</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">array</span>
|
||||
<span class="var-name">$options</span><span class="var-description">: Optional. An array of options to set for the Ripcord documentor.</span> </li>
|
||||
<li>
|
||||
<span class="var-type">object docCommentParser</span>
|
||||
<span class="var-name">$docCommentParser</span><span class="var-description">: Optional. An object that parses a docComment block. Must implement the Ripcord_Documentor_CommentParser interface.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodencodeCall" id="encodeCall"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">static method encodeCall</span> (line <span class="line-number">246</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method creates a new Ripcord_Client_Call object, which encodes the information needed for a method call to an rpc server. This is mostly used for the system.multiCall method.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
static
|
||||
<span class="method-result">object</span>
|
||||
<span class="method-name">
|
||||
encodeCall
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$method</span>, <span class="var-type">mixed</span> <span class="var-name">$args,...</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$method</span><span class="var-description">: The name of the method call to encode</span> </li>
|
||||
<li>
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$args,...</span><span class="var-description">: The remainder of the arguments are encoded as parameters to the call</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodfault" id="fault"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">static method fault</span> (line <span class="line-number">38</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method generates an XML-RPC fault with the given code and message.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
static
|
||||
<span class="method-result">array</span>
|
||||
<span class="method-name">
|
||||
fault
|
||||
</span>
|
||||
(<span class="var-type">int</span> <span class="var-name">$code</span>, <span class="var-type">string</span> <span class="var-name">$message</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">int</span>
|
||||
<span class="var-name">$code</span> </li>
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$message</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodgetType" id="getType"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">static method getType</span> (line <span class="line-number">168</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method returns the type of the given parameter. This can be any of the XML-RPC data types, e.g.</p>
|
||||
<p class="description"><p>'struct', 'int', 'string', 'base64', 'boolean', 'double', 'array' or 'datetime'.</p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
static
|
||||
<span class="method-result">string</span>
|
||||
<span class="method-name">
|
||||
getType
|
||||
</span>
|
||||
(<span class="var-type">mixed</span> <span class="var-name">$param</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$param</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodisFault" id="isFault"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">static method isFault</span> (line <span class="line-number">23</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method checks whether the given argument is an XML-RPC fault.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
static
|
||||
<span class="method-result">bool</span>
|
||||
<span class="method-name">
|
||||
isFault
|
||||
</span>
|
||||
(<span class="var-type">mixed</span> <span class="var-name">$fault</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$fault</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodload" id="load"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">static method load</span> (line <span class="line-number">216</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method includes a ripcord class, using require_once. Used for autoloading ripcord classes.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
static
|
||||
<span class="method-result">boolean</span>
|
||||
<span class="method-name">
|
||||
load
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$class</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$class</span><span class="var-description">: The name of the class to load.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodserver" id="server"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">static method server</span> (line <span class="line-number">51</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method returns a new Ripcord server, which by default implements XML-RPC, Simple RPC and SOAP 1.1.</p>
|
||||
<p class="description"><p>The server will publish any methods passed through the $services argument. It can be configured through the $options argument.</p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">see:</span> <a href="../Ripcord/Ripcord_Server.html">Ripcord_Server</a></li>
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
static
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
server
|
||||
</span>
|
||||
([<span class="var-type">mixed</span> <span class="var-name">$services</span> = <span class="var-default">null</span>], [<span class="var-type">array</span> <span class="var-name">$options</span> = <span class="var-default">null</span>], [<span class="var-type"></span> <span class="var-name">$documentor</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">mixed</span>
|
||||
<span class="var-name">$services</span><span class="var-description">: Optional. Either an object or an array of objects. If the array has non-numeric keys, the key will be used as a namespace for the methods in the object.</span> </li>
|
||||
<li>
|
||||
<span class="var-type">array</span>
|
||||
<span class="var-name">$options</span><span class="var-description">: Optional. An array of options to set for the Ripcord server.</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$documentor</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodsimpleClient" id="simpleClient"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">static method simpleClient</span> (line <span class="line-number">205</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method returns a new Ripcord client, configured to access a Simple RPC server.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">see:</span> <a href="../Ripcord/Ripcord_Client.html">Ripcord_Client</a></li>
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
static
|
||||
<span class="method-result">object</span>
|
||||
<span class="method-name">
|
||||
simpleClient
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$url</span>, [<span class="var-type">array</span> <span class="var-name">$options</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$url</span> </li>
|
||||
<li>
|
||||
<span class="var-type">array</span>
|
||||
<span class="var-name">$options</span><span class="var-description">: Optional.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodsoapClient" id="soapClient"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">static method soapClient</span> (line <span class="line-number">179</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method returns a new Ripcord client, configured to access a SOAP 1.1 server.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">see:</span> <a href="../Ripcord/Ripcord_Client.html">Ripcord_Client</a></li>
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
static
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
soapClient
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$url</span>, [<span class="var-type">array</span> <span class="var-name">$options</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$url</span> </li>
|
||||
<li>
|
||||
<span class="var-type">array</span>
|
||||
<span class="var-name">$options</span><span class="var-description">: Optional.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodtimestamp" id="timestamp"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">static method timestamp</span> (line <span class="line-number">124</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method returns a unix timestamp from a given XML-RPC datetime object.</p>
|
||||
<p class="description"><p>It will throw a 'Variable is not of type datetime' Ripcord_Exception (code -6) if the given argument is not of the correct type.</p></p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
static
|
||||
<span class="method-result">int</span>
|
||||
<span class="method-name">
|
||||
timestamp
|
||||
</span>
|
||||
(<span class="var-type">object</span> <span class="var-name">$datetime</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">object</span>
|
||||
<span class="var-name">$datetime</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="methodxmlrpcClient" id="xmlrpcClient"><!-- --></a>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">static method xmlrpcClient</span> (line <span class="line-number">192</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">This method returns a new Ripcord client, configured to access an XML-RPC server.</p>
|
||||
<ul class="tags">
|
||||
<li><span class="field">see:</span> <a href="../Ripcord/Ripcord_Client.html">Ripcord_Client</a></li>
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
static
|
||||
<span class="method-result">object</span>
|
||||
<span class="method-name">
|
||||
xmlrpcClient
|
||||
</span>
|
||||
(<span class="var-type">string</span> <span class="var-name">$url</span>, [<span class="var-type">array</span> <span class="var-name">$options</span> = <span class="var-default">null</span>])
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type">string</span>
|
||||
<span class="var-name">$url</span> </li>
|
||||
<li>
|
||||
<span class="var-type">array</span>
|
||||
<span class="var-name">$options</span><span class="var-description">: Optional.</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<a name="methodbind" id="bind"><!-- --></a>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="method-header">
|
||||
<span class="method-title">bind</span> (line <span class="line-number">263</span>)
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<ul class="tags">
|
||||
<li><span class="field">access:</span> public</li>
|
||||
</ul>
|
||||
|
||||
<div class="method-signature">
|
||||
<span class="method-result">void</span>
|
||||
<span class="method-name">
|
||||
bind
|
||||
</span>
|
||||
(<span class="var-type"></span> <span class="var-name">&$bound</span>, <span class="var-type"></span> <span class="var-name">$call</span>)
|
||||
</div>
|
||||
|
||||
<ul class="parameters">
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">&$bound</span> </li>
|
||||
<li>
|
||||
<span class="var-type"></span>
|
||||
<span class="var-name">$call</span> </li>
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="sec-consts"></a>
|
||||
<div class="info-box">
|
||||
<div class="info-box-title">Class Constants</div>
|
||||
<div class="nav-bar">
|
||||
<a href="#sec-description">Description</a> |
|
||||
<a href="#sec-var-summary">Constants</a> (<span class="disabled">details</span>)
|
||||
|
||||
|
||||
|
|
||||
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
|
||||
|
||||
</div>
|
||||
<div class="info-box-body">
|
||||
<a name="constcannotAccessURL" id="cannotAccessURL"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">cannotAccessURL</span>
|
||||
= <span class="const-default"> -4</span>
|
||||
(line <span class="line-number">289</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Could not access {url} - Thrown by the transport object when unable to access the given url.</p>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="constcannotRecurse" id="cannotRecurse"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">cannotRecurse</span>
|
||||
= <span class="const-default"> -3</span>
|
||||
(line <span class="line-number">285</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Cannot recurse system.multiCall - Thrown by the ripcord server when system.multicall is called within itself.</p>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="constmethodNotFound" id="methodNotFound"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">methodNotFound</span>
|
||||
= <span class="const-default"> -1</span>
|
||||
(line <span class="line-number">277</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Method {method} not found. - Thrown by the ripcord server when a requested method isn't found.</p>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="constnotBase64" id="notBase64"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">notBase64</span>
|
||||
= <span class="const-default"> -7</span>
|
||||
(line <span class="line-number">301</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Variable is not of type base64 - Thrown by the ripcord binary method.</p>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="constnotDatetime" id="notDatetime"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">notDatetime</span>
|
||||
= <span class="const-default"> -6</span>
|
||||
(line <span class="line-number">297</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Variable is not of type datetime - Thrown by the ripcord timestamp method.</p>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="constnotRipcordCall" id="notRipcordCall"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">notRipcordCall</span>
|
||||
= <span class="const-default"> -2</span>
|
||||
(line <span class="line-number">281</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Argument {index} is not a valid Ripcord call - Thrown by the client when passing incorrect arguments to system.multiCall.</p>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="constunknownServiceType" id="unknownServiceType"><!-- --></A>
|
||||
<div class="evenrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">unknownServiceType</span>
|
||||
= <span class="const-default"> -8</span>
|
||||
(line <span class="line-number">305</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">Variable is not a classname or an object - Thrown by the ripcord server.</p>
|
||||
|
||||
|
||||
</div>
|
||||
<a name="constxmlrpcNotInstalled" id="xmlrpcNotInstalled"><!-- --></A>
|
||||
<div class="oddrow">
|
||||
|
||||
<div class="const-header">
|
||||
<img src="../media/images/Variable.png" />
|
||||
<span class="const-title">
|
||||
<span class="const-name">xmlrpcNotInstalled</span>
|
||||
= <span class="const-default"> -5</span>
|
||||
(line <span class="line-number">293</span>)
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- ========== Info from phpDoc block ========= -->
|
||||
<p class="short-description">PHP XMLRPC library is not installed - Thrown by the ripcord server and client when the xmlrpc library is not installed.</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Tue, 16 Nov 2010 16:20:15 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</div></body>
|
||||
</html>
|
13
erp/ripcord/docs/blank.html
Normal file
13
erp/ripcord/docs/blank.html
Normal file
@ -0,0 +1,13 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Ripcord v0.9: Easy XML-RPC for PHP</title>
|
||||
<link rel="stylesheet" href="media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div align="center"><h1>Ripcord v0.9: Easy XML-RPC for PHP</h1></div>
|
||||
<b>Welcome to Ripcord!</b><br />
|
||||
<br />
|
||||
This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.4.3</a><br />
|
||||
</body>
|
||||
</html>
|
86
erp/ripcord/docs/classtrees_Ripcord.html
Normal file
86
erp/ripcord/docs/classtrees_Ripcord.html
Normal file
@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Start of Class Data -->
|
||||
<H2>
|
||||
|
||||
</H2>
|
||||
<h2>Root interface Ripcord_Documentor_Interface</h2>
|
||||
<ul>
|
||||
<li><a href="Ripcord/Ripcord_Documentor_Interface.html">Ripcord_Documentor_Interface</a></li></ul>
|
||||
|
||||
<h2>Root interface Ripcord_Documentor_Parser</h2>
|
||||
<ul>
|
||||
<li><a href="Ripcord/Ripcord_Documentor_Parser.html">Ripcord_Documentor_Parser</a></li></ul>
|
||||
|
||||
<h2>Root interface Ripcord_Exception</h2>
|
||||
<ul>
|
||||
<li><a href="Ripcord/Ripcord_Exception.html">Ripcord_Exception</a></li></ul>
|
||||
|
||||
<h2>Root interface Ripcord_Transport</h2>
|
||||
<ul>
|
||||
<li><a href="Ripcord/Ripcord_Transport.html">Ripcord_Transport</a></li></ul>
|
||||
|
||||
<h2>Root class ripcord</h2>
|
||||
<ul>
|
||||
<li><a href="Ripcord/ripcord.html">ripcord</a></li></ul>
|
||||
|
||||
<h2>Root class Ripcord_Client</h2>
|
||||
<ul>
|
||||
<li><a href="Ripcord/Ripcord_Client.html">Ripcord_Client</a><ul>
|
||||
<li><a href="Ripcord/Ripcord_Client_MultiCall.html">Ripcord_Client_MultiCall</a></li></ul></li>
|
||||
</ul>
|
||||
|
||||
<h2>Root class Ripcord_Client_Call</h2>
|
||||
<ul>
|
||||
<li><a href="Ripcord/Ripcord_Client_Call.html">Ripcord_Client_Call</a></li></ul>
|
||||
|
||||
<h2>Root class Ripcord_Documentor</h2>
|
||||
<ul>
|
||||
<li><a href="Ripcord/Ripcord_Documentor.html">Ripcord_Documentor</a></li></ul>
|
||||
|
||||
<h2>Root class Ripcord_Documentor_Parser_phpdoc</h2>
|
||||
<ul>
|
||||
<li><a href="Ripcord/Ripcord_Documentor_Parser_phpdoc.html">Ripcord_Documentor_Parser_phpdoc</a></li></ul>
|
||||
|
||||
<h2>Root class Ripcord_Server</h2>
|
||||
<ul>
|
||||
<li><a href="Ripcord/Ripcord_Server.html">Ripcord_Server</a></li></ul>
|
||||
|
||||
<h2>Root class Ripcord_Transport_CURL</h2>
|
||||
<ul>
|
||||
<li><a href="Ripcord/Ripcord_Transport_CURL.html">Ripcord_Transport_CURL</a></li></ul>
|
||||
|
||||
<h2>Root class Ripcord_Transport_Stream</h2>
|
||||
<ul>
|
||||
<li><a href="Ripcord/Ripcord_Transport_Stream.html">Ripcord_Transport_Stream</a></li></ul>
|
||||
|
||||
<h2>Root class BadMethodCallException</h2>
|
||||
<ul>
|
||||
<li><a href="Ripcord/Ripcord_BadMethodCallException.html">Ripcord_BadMethodCallException</a></li></ul>
|
||||
|
||||
<h2>Root class Exception</h2>
|
||||
<ul>
|
||||
<li><a href="Ripcord/Ripcord_ConfigurationException.html">Ripcord_ConfigurationException</a></li><li><a href="Ripcord/Ripcord_RemoteException.html">Ripcord_RemoteException</a></li></ul>
|
||||
|
||||
<h2>Root class InvalidArgumentException</h2>
|
||||
<ul>
|
||||
<li><a href="Ripcord/Ripcord_InvalidArgumentException.html">Ripcord_InvalidArgumentException</a></li></ul>
|
||||
|
||||
<h2>Root class RuntimeException</h2>
|
||||
<ul>
|
||||
<li><a href="Ripcord/Ripcord_TransportException.html">Ripcord_TransportException</a></li></ul>
|
||||
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Tue, 16 Nov 2010 16:20:15 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
901
erp/ripcord/docs/elementindex.html
Normal file
901
erp/ripcord/docs/elementindex.html
Normal file
@ -0,0 +1,901 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<a name="top"></a>
|
||||
<h2>Full index</h2>
|
||||
<h3>Package indexes</h3>
|
||||
<ul>
|
||||
<li><a href="elementindex_Ripcord.html">Ripcord</a></li>
|
||||
</ul>
|
||||
<br />
|
||||
<div class="index-letter-menu">
|
||||
<a class="index-letter" href="elementindex.html#a">a</a>
|
||||
<a class="index-letter" href="elementindex.html#b">b</a>
|
||||
<a class="index-letter" href="elementindex.html#c">c</a>
|
||||
<a class="index-letter" href="elementindex.html#d">d</a>
|
||||
<a class="index-letter" href="elementindex.html#e">e</a>
|
||||
<a class="index-letter" href="elementindex.html#f">f</a>
|
||||
<a class="index-letter" href="elementindex.html#g">g</a>
|
||||
<a class="index-letter" href="elementindex.html#h">h</a>
|
||||
<a class="index-letter" href="elementindex.html#i">i</a>
|
||||
<a class="index-letter" href="elementindex.html#l">l</a>
|
||||
<a class="index-letter" href="elementindex.html#m">m</a>
|
||||
<a class="index-letter" href="elementindex.html#n">n</a>
|
||||
<a class="index-letter" href="elementindex.html#p">p</a>
|
||||
<a class="index-letter" href="elementindex.html#r">r</a>
|
||||
<a class="index-letter" href="elementindex.html#s">s</a>
|
||||
<a class="index-letter" href="elementindex.html#t">t</a>
|
||||
<a class="index-letter" href="elementindex.html#u">u</a>
|
||||
<a class="index-letter" href="elementindex.html#v">v</a>
|
||||
<a class="index-letter" href="elementindex.html#w">w</a>
|
||||
<a class="index-letter" href="elementindex.html#x">x</a>
|
||||
<a class="index-letter" href="elementindex.html#_">_</a>
|
||||
</div>
|
||||
|
||||
<a name="a"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">a</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="method-title">addMethod</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Server.html#methodaddMethod">Ripcord_Server::addMethod()</a> in ripcord_server.php</div>
|
||||
<div class="index-item-description">Allows you to add a single method to the server after construction.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">addService</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Server.html#methodaddService">Ripcord_Server::addService()</a> in ripcord_server.php</div>
|
||||
<div class="index-item-description">Allows you to add a service to the server after construction.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="b"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">b</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="var-title">$bound</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client_Call.html#var$bound">Ripcord_Client_Call::$bound</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">A reference to the php variable to fill with the result of the call, if any.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">base64</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodbase64">ripcord::base64()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method returns an XML-RPC base64 object from a given binary string.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">binary</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodbinary">ripcord::binary()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method returns a (binary) string from a given XML-RPC base64 object.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">bind</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client_Call.html#methodbind">Ripcord_Client_Call::bind()</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This method allows you to bind a php variable to the result of this method call.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">bind</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodbind">ripcord::bind()</a> in ripcord.php</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="c"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">c</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="var-title">$css</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor.html#var$css">Ripcord_Documentor::$css</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">A url to an optional css file or a css string for an inline stylesheet.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">call</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Server.html#methodcall">Ripcord_Server::call()</a> in ripcord_server.php</div>
|
||||
<div class="index-item-description">Calls a method by its rpc name.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
cannotAccessURL
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#constcannotAccessURL">ripcord::cannotAccessURL</a> in ripcord.php</div>
|
||||
<div class="index-item-description">Could not access {url} - Thrown by the transport object when unable to access the given url.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
cannotRecurse
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#constcannotRecurse">ripcord::cannotRecurse</a> in ripcord.php</div>
|
||||
<div class="index-item-description">Cannot recurse system.multiCall - Thrown by the ripcord server when system.multicall is called within itself.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">client</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodclient">ripcord::client()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method returns a new Ripcord client. By default this will be an XML-RPC client, but you can change this through the $options argument.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="d"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">d</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="method-title">datetime</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methoddatetime">ripcord::datetime()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method returns an XML-RPC datetime object from a given unix timestamp.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">documentor</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methoddocumentor">ripcord::documentor()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method returns a new Ripcord documentor object.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="e"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">e</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="method-title">encode</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client_Call.html#methodencode">Ripcord_Client_Call::encode()</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This method returns the correct format for a multiCall argument.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">encodeCall</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodencodeCall">ripcord::encodeCall()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method creates a new Ripcord_Client_Call object, which encodes the information needed for a method call to an rpc server. This is mostly used for the system.multiCall method.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">execute</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client_MultiCall.html#methodexecute">Ripcord_Client_MultiCall::execute()</a> in ripcord_client.php</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="f"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">f</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="var-title">$footer</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor.html#var$footer">Ripcord_Documentor::$footer</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">Optional footer text for the online documentation.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">fault</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodfault">ripcord::fault()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method generates an XML-RPC fault with the given code and message.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="g"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">g</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="method-title">getIntrospectionXML</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor_Interface.html#methodgetIntrospectionXML">Ripcord_Documentor_Interface::getIntrospectionXML()</a> in ripcord_documentor.php</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">getIntrospectionXML</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor.html#methodgetIntrospectionXML">Ripcord_Documentor::getIntrospectionXML()</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">This method returns an XML document in the introspection format expected by xmlrpc_server_register_introspection_callback. It uses the php Reflection classes to gather information from the registered methods.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">getType</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodgetType">ripcord::getType()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method returns the type of the given parameter. This can be any of the XML-RPC data types, e.g.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="h"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">h</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="var-title">$header</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor.html#var$header">Ripcord_Documentor::$header</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">Optional header text for the online documentation.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">handle</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Server.html#methodhandle">Ripcord_Server::handle()</a> in ripcord_server.php</div>
|
||||
<div class="index-item-description">Handles the given request xml</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">handle</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor.html#methodhandle">Ripcord_Documentor::handle()</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">This method handles any request which isn't a valid rpc request.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">handle</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor_Interface.html#methodhandle">Ripcord_Documentor_Interface::handle()</a> in ripcord_documentor.php</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="i"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">i</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="var-title">$index</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client_Call.html#var$index">Ripcord_Client_Call::$index</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">The index in the multicall request array, if any.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">isFault</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodisFault">ripcord::isFault()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method checks whether the given argument is an XML-RPC fault.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="l"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">l</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="method-title">load</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodload">ripcord::load()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method includes a ripcord class, using require_once. Used for autoloading ripcord classes.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="m"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">m</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="var-title">$method</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client_Call.html#var$method">Ripcord_Client_Call::$method</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">The method to call on the rpc server</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
methodNotFound
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#constmethodNotFound">ripcord::methodNotFound</a> in ripcord.php</div>
|
||||
<div class="index-item-description">Method {method} not found. - Thrown by the ripcord server when a requested method isn't found.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="n"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">n</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="var-title">$name</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor.html#var$name">Ripcord_Documentor::$name</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">The name of the rpc server, used as the title and heading of the default HTML page.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
notBase64
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#constnotBase64">ripcord::notBase64</a> in ripcord.php</div>
|
||||
<div class="index-item-description">Variable is not of type base64 - Thrown by the ripcord binary method.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
notDatetime
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#constnotDatetime">ripcord::notDatetime</a> in ripcord.php</div>
|
||||
<div class="index-item-description">Variable is not of type datetime - Thrown by the ripcord timestamp method.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
notRipcordCall
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#constnotRipcordCall">ripcord::notRipcordCall</a> in ripcord.php</div>
|
||||
<div class="index-item-description">Argument {index} is not a valid Ripcord call - Thrown by the client when passing incorrect arguments to system.multiCall.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="p"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">p</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="var-title">$params</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client_Call.html#var$params">Ripcord_Client_Call::$params</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">The arguments to pass on to the method.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">parse</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor_Parser_phpdoc.html#methodparse">Ripcord_Documentor_Parser_phpdoc::parse()</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">This method parses a given docComment block and returns an array with information.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">parse</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor_Parser.html#methodparse">Ripcord_Documentor_Parser::parse()</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">This method parses a given docComment block and returns an array with information.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">post</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Transport_CURL.html#methodpost">Ripcord_Transport_CURL::post()</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This method posts the request to the given url</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">post</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Transport.html#methodpost">Ripcord_Transport::post()</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This method must post the request to the given url and return the results.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">post</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Transport_Stream.html#methodpost">Ripcord_Transport_Stream::post()</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This method posts the request to the given url.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="r"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">r</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="var-title">$responseHeaders</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Transport_CURL.html#var$responseHeaders">Ripcord_Transport_CURL::$responseHeaders</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">Contains the headers sent by the server.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="var-title">$responseHeaders</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Transport_Stream.html#var$responseHeaders">Ripcord_Transport_Stream::$responseHeaders</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">Contains the headers sent by the server.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="var-title">$root</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor.html#var$root">Ripcord_Documentor::$root</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">The root URL of the rpc server.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
ripcord
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html">ripcord</a> in ripcord.php</div>
|
||||
<div class="index-item-description">The ripcord class contains a number of useful static methods. This makes it a bit easier to create a server or client, convert types and check for errors.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="include-title">ripcord.php</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/_ripcord.php.html">ripcord.php</a> in ripcord.php</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_BadMethodCallException
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_BadMethodCallException.html">Ripcord_BadMethodCallException</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This class is used whenever an when a method passed to the server is invalid.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_Client
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client.html">Ripcord_Client</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This class implements a simple RPC client, for XML-RPC, (simplified) SOAP 1.1 or Simple RPC. The client abstracts the entire RPC process behind native PHP methods. Any method defined by the rpc server can be called as if it was a native method of the rpc client.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="include-title">ripcord_client.php</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/_ripcord_client.php.html">ripcord_client.php</a> in ripcord_client.php</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_Client_Call
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client_Call.html">Ripcord_Client_Call</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This class is used with the Ripcord_Client when calling system.multiCall. Instead of immediately calling the method on the rpc server, a Ripcord_Client_Call object is created with all the information needed to call the method using the multicall parameters. The call object is returned immediately and is used as input parameter for the multiCall call. The result of the call can be bound to a php variable. This variable will be filled with the result of the call when it is available.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_Client_MultiCall
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client_MultiCall.html">Ripcord_Client_MultiCall</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This class provides the fetch interface for system.multiCall. It is returned</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_ConfigurationException
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_ConfigurationException.html">Ripcord_ConfigurationException</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This class is used whenever prerequisite requirements are not met.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_Documentor
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor.html">Ripcord_Documentor</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">This class implements the default documentor for the ripcord server. Any request to the server without a request_xml is handled by the documentor.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="include-title">ripcord_documentor.php</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/_ripcord_documentor.php.html">ripcord_documentor.php</a> in ripcord_documentor.php</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_Documentor_Interface
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor_Interface.html">Ripcord_Documentor_Interface</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">This interface defines the minimum methods any documentor needs to implement.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_Documentor_Parser
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor_Parser.html">Ripcord_Documentor_Parser</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">This interface describes the minimum interface needed for a comment parser object used by the</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_Documentor_Parser_phpdoc
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor_Parser_phpdoc.html">Ripcord_Documentor_Parser_phpdoc</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">This class implements the Ripcord_Documentor_Parser interface, parsing the docComment as a phpdoc style docComment.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_Exception
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Exception.html">Ripcord_Exception</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This interface is implemented by all exceptions thrown by Ripcord.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_InvalidArgumentException
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_InvalidArgumentException.html">Ripcord_InvalidArgumentException</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This class is used whenever an argument passed to a Ripcord method is invalid for any reason. Possible exceptions thrown are: <ul><li>ripcord::notRipcordCall (-2) Argument {index} is not a valid Ripcord call - Thrown by the client when passing incorrect arguments to system.multiCall.</li></ul></div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_RemoteException
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_RemoteException.html">Ripcord_RemoteException</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This class is used for exceptions generated from xmlrpc faults returned by the server. The code and message correspond to the code and message from the xmlrpc fault.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_Server
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Server.html">Ripcord_Server</a> in ripcord_server.php</div>
|
||||
<div class="index-item-description">This class implements the Ripcord server. It is an OO wrapper around PHP's XML-RPC methods, with some added features.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="include-title">ripcord_server.php</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/_ripcord_server.php.html">ripcord_server.php</a> in ripcord_server.php</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_Transport
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Transport.html">Ripcord_Transport</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This interface describes the minimum interface needed for the transport object used by the</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_TransportException
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_TransportException.html">Ripcord_TransportException</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This class is used whenever something goes wrong in sending / receiving data. Possible exceptions thrown are: <ul><li>ripcord::cannotAccessURL (-4) Could not access {url} - Thrown by the transport object when unable to access the given url.</li></ul></div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_Transport_CURL
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Transport_CURL.html">Ripcord_Transport_CURL</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This class implements the Ripcord_Transport interface using CURL.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_Transport_Stream
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Transport_Stream.html">Ripcord_Transport_Stream</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This class implements the Ripcord_Transport interface using PHP streams.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">run</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Server.html#methodrun">Ripcord_Server::run()</a> in ripcord_server.php</div>
|
||||
<div class="index-item-description">Runs the rpc server. Automatically handles an incoming request.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="s"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">s</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="method-title">server</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodserver">ripcord::server()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method returns a new Ripcord server, which by default implements XML-RPC, Simple RPC and SOAP 1.1.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">setMethodData</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor_Interface.html#methodsetMethodData">Ripcord_Documentor_Interface::setMethodData()</a> in ripcord_documentor.php</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">setMethodData</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor.html#methodsetMethodData">Ripcord_Documentor::setMethodData()</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">This method fills the list of method data with all the user supplied methods of the rpc server.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">setOutputOption</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Server.html#methodsetOutputOption">Ripcord_Server::setOutputOption()</a> in ripcord_server.php</div>
|
||||
<div class="index-item-description">Allows you to set specific output options of the server after construction.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">simpleClient</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodsimpleClient">ripcord::simpleClient()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method returns a new Ripcord client, configured to access a Simple RPC server.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">soapClient</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodsoapClient">ripcord::soapClient()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method returns a new Ripcord client, configured to access a SOAP 1.1 server.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">start</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client_MultiCall.html#methodstart">Ripcord_Client_MultiCall::start()</a> in ripcord_client.php</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="t"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">t</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="method-title">timestamp</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodtimestamp">ripcord::timestamp()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method returns a unix timestamp from a given XML-RPC datetime object.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="u"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">u</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
unknownServiceType
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#constunknownServiceType">ripcord::unknownServiceType</a> in ripcord.php</div>
|
||||
<div class="index-item-description">Variable is not a classname or an object - Thrown by the ripcord server.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="v"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">v</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="var-title">$version</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor.html#var$version">Ripcord_Documentor::$version</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">Which version of the XML vocabulary the server implements. Either 'xmlrpc', 'soap 1.1', 'simple' or 'auto'.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="w"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">w</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="var-title">$wsdl</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor.html#var$wsdl">Ripcord_Documentor::$wsdl</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">The wsdl 1.0 description.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="var-title">$wsdl2</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor.html#var$wsdl2">Ripcord_Documentor::$wsdl2</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">The wsdl 2.0 description</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="x"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">x</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="method-title">xmlrpcClient</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodxmlrpcClient">ripcord::xmlrpcClient()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method returns a new Ripcord client, configured to access an XML-RPC server.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
xmlrpcNotInstalled
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#constxmlrpcNotInstalled">ripcord::xmlrpcNotInstalled</a> in ripcord.php</div>
|
||||
<div class="index-item-description">PHP XMLRPC library is not installed - Thrown by the ripcord server and client when the xmlrpc library is not installed.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="_"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">_</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="var-title">$_autoDecode</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client.html#var$_autoDecode">Ripcord_Client::$_autoDecode</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">Whether or not to decode the XML-RPC datetime and base64 types to unix timestamp and binary string respectively.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="var-title">$_multiCall</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client.html#var$_multiCall">Ripcord_Client::$_multiCall</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">A flag to indicate if we are in a multiCall block. Start this with $client->system->multiCall()->start()</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="var-title">$_multiCallArgs</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client.html#var$_multiCallArgs">Ripcord_Client::$_multiCallArgs</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">A list of deferred encoded calls.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="var-title">$_request</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client.html#var$_request">Ripcord_Client::$_request</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">The exact request from the client. For debugging purposes.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="var-title">$_response</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client.html#var$_response">Ripcord_Client::$_response</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">The exact response from the rpc server. For debugging purposes.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="var-title">$_throwExceptions</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client.html#var$_throwExceptions">Ripcord_Client::$_throwExceptions</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">Whether or not to throw exceptions when an xml-rpc fault is returned by the server. Default is false.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">__call</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client.html#method__call">Ripcord_Client::__call()</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This method catches any native method called on the client and calls it on the rpc server instead. It automatically parses the resulting xml and returns native php type results.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">__construct</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor.html#method__construct">Ripcord_Documentor::__construct()</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">The constructor for the Ripcord_Documentor class.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">__construct</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor_Interface.html#method__construct">Ripcord_Documentor_Interface::__construct()</a> in ripcord_documentor.php</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">__construct</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Server.html#method__construct">Ripcord_Server::__construct()</a> in ripcord_server.php</div>
|
||||
<div class="index-item-description">Creates a new instance of the Ripcord server.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">__construct</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Transport_Stream.html#method__construct">Ripcord_Transport_Stream::__construct()</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This is the constructor for the Ripcord_Transport_Stream class.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">__construct</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Transport_CURL.html#method__construct">Ripcord_Transport_CURL::__construct()</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This is the constructor for the Ripcord_Transport_CURL class.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">__construct</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client_Call.html#method__construct">Ripcord_Client_Call::__construct()</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">The constructor for the Ripcord_Client_Call class.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">__construct</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client_MultiCall.html#method__construct">Ripcord_Client_MultiCall::__construct()</a> in ripcord_client.php</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">__construct</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client.html#method__construct">Ripcord_Client::__construct()</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">The constructor for the RPC client.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">__get</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client.html#method__get">Ripcord_Client::__get()</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This method catches any reference to properties of the client and uses them as a namespace. The property is automatically created as a new instance of the rpc client, with the name of the property as a namespace.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<div class="index-letter-menu">
|
||||
<a class="index-letter" href="elementindex.html#a">a</a>
|
||||
<a class="index-letter" href="elementindex.html#b">b</a>
|
||||
<a class="index-letter" href="elementindex.html#c">c</a>
|
||||
<a class="index-letter" href="elementindex.html#d">d</a>
|
||||
<a class="index-letter" href="elementindex.html#e">e</a>
|
||||
<a class="index-letter" href="elementindex.html#f">f</a>
|
||||
<a class="index-letter" href="elementindex.html#g">g</a>
|
||||
<a class="index-letter" href="elementindex.html#h">h</a>
|
||||
<a class="index-letter" href="elementindex.html#i">i</a>
|
||||
<a class="index-letter" href="elementindex.html#l">l</a>
|
||||
<a class="index-letter" href="elementindex.html#m">m</a>
|
||||
<a class="index-letter" href="elementindex.html#n">n</a>
|
||||
<a class="index-letter" href="elementindex.html#p">p</a>
|
||||
<a class="index-letter" href="elementindex.html#r">r</a>
|
||||
<a class="index-letter" href="elementindex.html#s">s</a>
|
||||
<a class="index-letter" href="elementindex.html#t">t</a>
|
||||
<a class="index-letter" href="elementindex.html#u">u</a>
|
||||
<a class="index-letter" href="elementindex.html#v">v</a>
|
||||
<a class="index-letter" href="elementindex.html#w">w</a>
|
||||
<a class="index-letter" href="elementindex.html#x">x</a>
|
||||
<a class="index-letter" href="elementindex.html#_">_</a>
|
||||
</div> </body>
|
||||
</html>
|
898
erp/ripcord/docs/elementindex_Ripcord.html
Normal file
898
erp/ripcord/docs/elementindex_Ripcord.html
Normal file
@ -0,0 +1,898 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<a name="top"></a>
|
||||
<h2>[Ripcord] element index</h2>
|
||||
<a href="elementindex.html">All elements</a>
|
||||
<br />
|
||||
<div class="index-letter-menu">
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#a">a</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#b">b</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#c">c</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#d">d</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#e">e</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#f">f</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#g">g</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#h">h</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#i">i</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#l">l</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#m">m</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#n">n</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#p">p</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#r">r</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#s">s</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#t">t</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#u">u</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#v">v</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#w">w</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#x">x</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#_">_</a>
|
||||
</div>
|
||||
|
||||
<a name="_"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">_</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="var-title">$_autoDecode</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client.html#var$_autoDecode">Ripcord_Client::$_autoDecode</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">Whether or not to decode the XML-RPC datetime and base64 types to unix timestamp and binary string respectively.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="var-title">$_multiCall</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client.html#var$_multiCall">Ripcord_Client::$_multiCall</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">A flag to indicate if we are in a multiCall block. Start this with $client->system->multiCall()->start()</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="var-title">$_multiCallArgs</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client.html#var$_multiCallArgs">Ripcord_Client::$_multiCallArgs</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">A list of deferred encoded calls.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="var-title">$_request</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client.html#var$_request">Ripcord_Client::$_request</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">The exact request from the client. For debugging purposes.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="var-title">$_response</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client.html#var$_response">Ripcord_Client::$_response</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">The exact response from the rpc server. For debugging purposes.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="var-title">$_throwExceptions</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client.html#var$_throwExceptions">Ripcord_Client::$_throwExceptions</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">Whether or not to throw exceptions when an xml-rpc fault is returned by the server. Default is false.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">__call</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client.html#method__call">Ripcord_Client::__call()</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This method catches any native method called on the client and calls it on the rpc server instead. It automatically parses the resulting xml and returns native php type results.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">__construct</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor.html#method__construct">Ripcord_Documentor::__construct()</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">The constructor for the Ripcord_Documentor class.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">__construct</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor_Interface.html#method__construct">Ripcord_Documentor_Interface::__construct()</a> in ripcord_documentor.php</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">__construct</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Server.html#method__construct">Ripcord_Server::__construct()</a> in ripcord_server.php</div>
|
||||
<div class="index-item-description">Creates a new instance of the Ripcord server.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">__construct</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Transport_Stream.html#method__construct">Ripcord_Transport_Stream::__construct()</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This is the constructor for the Ripcord_Transport_Stream class.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">__construct</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Transport_CURL.html#method__construct">Ripcord_Transport_CURL::__construct()</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This is the constructor for the Ripcord_Transport_CURL class.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">__construct</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client_Call.html#method__construct">Ripcord_Client_Call::__construct()</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">The constructor for the Ripcord_Client_Call class.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">__construct</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client_MultiCall.html#method__construct">Ripcord_Client_MultiCall::__construct()</a> in ripcord_client.php</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">__construct</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client.html#method__construct">Ripcord_Client::__construct()</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">The constructor for the RPC client.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">__get</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client.html#method__get">Ripcord_Client::__get()</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This method catches any reference to properties of the client and uses them as a namespace. The property is automatically created as a new instance of the rpc client, with the name of the property as a namespace.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="a"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">a</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="method-title">addMethod</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Server.html#methodaddMethod">Ripcord_Server::addMethod()</a> in ripcord_server.php</div>
|
||||
<div class="index-item-description">Allows you to add a single method to the server after construction.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">addService</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Server.html#methodaddService">Ripcord_Server::addService()</a> in ripcord_server.php</div>
|
||||
<div class="index-item-description">Allows you to add a service to the server after construction.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="b"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">b</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="var-title">$bound</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client_Call.html#var$bound">Ripcord_Client_Call::$bound</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">A reference to the php variable to fill with the result of the call, if any.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">base64</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodbase64">ripcord::base64()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method returns an XML-RPC base64 object from a given binary string.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">binary</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodbinary">ripcord::binary()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method returns a (binary) string from a given XML-RPC base64 object.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">bind</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client_Call.html#methodbind">Ripcord_Client_Call::bind()</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This method allows you to bind a php variable to the result of this method call.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">bind</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodbind">ripcord::bind()</a> in ripcord.php</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="c"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">c</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="var-title">$css</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor.html#var$css">Ripcord_Documentor::$css</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">A url to an optional css file or a css string for an inline stylesheet.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">call</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Server.html#methodcall">Ripcord_Server::call()</a> in ripcord_server.php</div>
|
||||
<div class="index-item-description">Calls a method by its rpc name.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
cannotAccessURL
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#constcannotAccessURL">ripcord::cannotAccessURL</a> in ripcord.php</div>
|
||||
<div class="index-item-description">Could not access {url} - Thrown by the transport object when unable to access the given url.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
cannotRecurse
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#constcannotRecurse">ripcord::cannotRecurse</a> in ripcord.php</div>
|
||||
<div class="index-item-description">Cannot recurse system.multiCall - Thrown by the ripcord server when system.multicall is called within itself.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">client</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodclient">ripcord::client()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method returns a new Ripcord client. By default this will be an XML-RPC client, but you can change this through the $options argument.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="d"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">d</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="method-title">datetime</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methoddatetime">ripcord::datetime()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method returns an XML-RPC datetime object from a given unix timestamp.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">documentor</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methoddocumentor">ripcord::documentor()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method returns a new Ripcord documentor object.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="e"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">e</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="method-title">encode</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client_Call.html#methodencode">Ripcord_Client_Call::encode()</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This method returns the correct format for a multiCall argument.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">encodeCall</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodencodeCall">ripcord::encodeCall()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method creates a new Ripcord_Client_Call object, which encodes the information needed for a method call to an rpc server. This is mostly used for the system.multiCall method.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">execute</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client_MultiCall.html#methodexecute">Ripcord_Client_MultiCall::execute()</a> in ripcord_client.php</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="f"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">f</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="var-title">$footer</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor.html#var$footer">Ripcord_Documentor::$footer</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">Optional footer text for the online documentation.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">fault</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodfault">ripcord::fault()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method generates an XML-RPC fault with the given code and message.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="g"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">g</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="method-title">getIntrospectionXML</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor_Interface.html#methodgetIntrospectionXML">Ripcord_Documentor_Interface::getIntrospectionXML()</a> in ripcord_documentor.php</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">getIntrospectionXML</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor.html#methodgetIntrospectionXML">Ripcord_Documentor::getIntrospectionXML()</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">This method returns an XML document in the introspection format expected by xmlrpc_server_register_introspection_callback. It uses the php Reflection classes to gather information from the registered methods.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">getType</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodgetType">ripcord::getType()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method returns the type of the given parameter. This can be any of the XML-RPC data types, e.g.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="h"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">h</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="var-title">$header</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor.html#var$header">Ripcord_Documentor::$header</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">Optional header text for the online documentation.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">handle</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Server.html#methodhandle">Ripcord_Server::handle()</a> in ripcord_server.php</div>
|
||||
<div class="index-item-description">Handles the given request xml</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">handle</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor.html#methodhandle">Ripcord_Documentor::handle()</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">This method handles any request which isn't a valid rpc request.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">handle</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor_Interface.html#methodhandle">Ripcord_Documentor_Interface::handle()</a> in ripcord_documentor.php</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="i"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">i</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="var-title">$index</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client_Call.html#var$index">Ripcord_Client_Call::$index</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">The index in the multicall request array, if any.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">isFault</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodisFault">ripcord::isFault()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method checks whether the given argument is an XML-RPC fault.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="l"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">l</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="method-title">load</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodload">ripcord::load()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method includes a ripcord class, using require_once. Used for autoloading ripcord classes.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="m"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">m</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="var-title">$method</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client_Call.html#var$method">Ripcord_Client_Call::$method</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">The method to call on the rpc server</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
methodNotFound
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#constmethodNotFound">ripcord::methodNotFound</a> in ripcord.php</div>
|
||||
<div class="index-item-description">Method {method} not found. - Thrown by the ripcord server when a requested method isn't found.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="n"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">n</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="var-title">$name</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor.html#var$name">Ripcord_Documentor::$name</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">The name of the rpc server, used as the title and heading of the default HTML page.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
notBase64
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#constnotBase64">ripcord::notBase64</a> in ripcord.php</div>
|
||||
<div class="index-item-description">Variable is not of type base64 - Thrown by the ripcord binary method.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
notDatetime
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#constnotDatetime">ripcord::notDatetime</a> in ripcord.php</div>
|
||||
<div class="index-item-description">Variable is not of type datetime - Thrown by the ripcord timestamp method.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
notRipcordCall
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#constnotRipcordCall">ripcord::notRipcordCall</a> in ripcord.php</div>
|
||||
<div class="index-item-description">Argument {index} is not a valid Ripcord call - Thrown by the client when passing incorrect arguments to system.multiCall.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="p"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">p</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="var-title">$params</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client_Call.html#var$params">Ripcord_Client_Call::$params</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">The arguments to pass on to the method.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">parse</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor_Parser_phpdoc.html#methodparse">Ripcord_Documentor_Parser_phpdoc::parse()</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">This method parses a given docComment block and returns an array with information.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">parse</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor_Parser.html#methodparse">Ripcord_Documentor_Parser::parse()</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">This method parses a given docComment block and returns an array with information.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">post</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Transport_CURL.html#methodpost">Ripcord_Transport_CURL::post()</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This method posts the request to the given url</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">post</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Transport.html#methodpost">Ripcord_Transport::post()</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This method must post the request to the given url and return the results.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">post</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Transport_Stream.html#methodpost">Ripcord_Transport_Stream::post()</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This method posts the request to the given url.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="r"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">r</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="var-title">$responseHeaders</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Transport_CURL.html#var$responseHeaders">Ripcord_Transport_CURL::$responseHeaders</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">Contains the headers sent by the server.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="var-title">$responseHeaders</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Transport_Stream.html#var$responseHeaders">Ripcord_Transport_Stream::$responseHeaders</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">Contains the headers sent by the server.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="var-title">$root</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor.html#var$root">Ripcord_Documentor::$root</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">The root URL of the rpc server.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
ripcord
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html">ripcord</a> in ripcord.php</div>
|
||||
<div class="index-item-description">The ripcord class contains a number of useful static methods. This makes it a bit easier to create a server or client, convert types and check for errors.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="include-title">ripcord.php</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/_ripcord.php.html">ripcord.php</a> in ripcord.php</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_BadMethodCallException
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_BadMethodCallException.html">Ripcord_BadMethodCallException</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This class is used whenever an when a method passed to the server is invalid.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_Client
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client.html">Ripcord_Client</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This class implements a simple RPC client, for XML-RPC, (simplified) SOAP 1.1 or Simple RPC. The client abstracts the entire RPC process behind native PHP methods. Any method defined by the rpc server can be called as if it was a native method of the rpc client.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="include-title">ripcord_client.php</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/_ripcord_client.php.html">ripcord_client.php</a> in ripcord_client.php</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_Client_Call
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client_Call.html">Ripcord_Client_Call</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This class is used with the Ripcord_Client when calling system.multiCall. Instead of immediately calling the method on the rpc server, a Ripcord_Client_Call object is created with all the information needed to call the method using the multicall parameters. The call object is returned immediately and is used as input parameter for the multiCall call. The result of the call can be bound to a php variable. This variable will be filled with the result of the call when it is available.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_Client_MultiCall
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client_MultiCall.html">Ripcord_Client_MultiCall</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This class provides the fetch interface for system.multiCall. It is returned</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_ConfigurationException
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_ConfigurationException.html">Ripcord_ConfigurationException</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This class is used whenever prerequisite requirements are not met.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_Documentor
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor.html">Ripcord_Documentor</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">This class implements the default documentor for the ripcord server. Any request to the server without a request_xml is handled by the documentor.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="include-title">ripcord_documentor.php</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/_ripcord_documentor.php.html">ripcord_documentor.php</a> in ripcord_documentor.php</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_Documentor_Interface
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor_Interface.html">Ripcord_Documentor_Interface</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">This interface defines the minimum methods any documentor needs to implement.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_Documentor_Parser
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor_Parser.html">Ripcord_Documentor_Parser</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">This interface describes the minimum interface needed for a comment parser object used by the</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_Documentor_Parser_phpdoc
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor_Parser_phpdoc.html">Ripcord_Documentor_Parser_phpdoc</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">This class implements the Ripcord_Documentor_Parser interface, parsing the docComment as a phpdoc style docComment.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_Exception
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Exception.html">Ripcord_Exception</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This interface is implemented by all exceptions thrown by Ripcord.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_InvalidArgumentException
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_InvalidArgumentException.html">Ripcord_InvalidArgumentException</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This class is used whenever an argument passed to a Ripcord method is invalid for any reason. Possible exceptions thrown are: <ul><li>ripcord::notRipcordCall (-2) Argument {index} is not a valid Ripcord call - Thrown by the client when passing incorrect arguments to system.multiCall.</li></ul></div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_RemoteException
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_RemoteException.html">Ripcord_RemoteException</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This class is used for exceptions generated from xmlrpc faults returned by the server. The code and message correspond to the code and message from the xmlrpc fault.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_Server
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Server.html">Ripcord_Server</a> in ripcord_server.php</div>
|
||||
<div class="index-item-description">This class implements the Ripcord server. It is an OO wrapper around PHP's XML-RPC methods, with some added features.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="include-title">ripcord_server.php</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/_ripcord_server.php.html">ripcord_server.php</a> in ripcord_server.php</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_Transport
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Transport.html">Ripcord_Transport</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This interface describes the minimum interface needed for the transport object used by the</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_TransportException
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_TransportException.html">Ripcord_TransportException</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This class is used whenever something goes wrong in sending / receiving data. Possible exceptions thrown are: <ul><li>ripcord::cannotAccessURL (-4) Could not access {url} - Thrown by the transport object when unable to access the given url.</li></ul></div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_Transport_CURL
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Transport_CURL.html">Ripcord_Transport_CURL</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This class implements the Ripcord_Transport interface using CURL.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
Ripcord_Transport_Stream
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Transport_Stream.html">Ripcord_Transport_Stream</a> in ripcord_client.php</div>
|
||||
<div class="index-item-description">This class implements the Ripcord_Transport interface using PHP streams.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">run</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Server.html#methodrun">Ripcord_Server::run()</a> in ripcord_server.php</div>
|
||||
<div class="index-item-description">Runs the rpc server. Automatically handles an incoming request.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="s"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">s</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="method-title">server</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodserver">ripcord::server()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method returns a new Ripcord server, which by default implements XML-RPC, Simple RPC and SOAP 1.1.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">setMethodData</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor_Interface.html#methodsetMethodData">Ripcord_Documentor_Interface::setMethodData()</a> in ripcord_documentor.php</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">setMethodData</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor.html#methodsetMethodData">Ripcord_Documentor::setMethodData()</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">This method fills the list of method data with all the user supplied methods of the rpc server.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">setOutputOption</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Server.html#methodsetOutputOption">Ripcord_Server::setOutputOption()</a> in ripcord_server.php</div>
|
||||
<div class="index-item-description">Allows you to set specific output options of the server after construction.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">simpleClient</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodsimpleClient">ripcord::simpleClient()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method returns a new Ripcord client, configured to access a Simple RPC server.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">soapClient</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodsoapClient">ripcord::soapClient()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method returns a new Ripcord client, configured to access a SOAP 1.1 server.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="method-title">start</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Client_MultiCall.html#methodstart">Ripcord_Client_MultiCall::start()</a> in ripcord_client.php</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="t"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">t</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="method-title">timestamp</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodtimestamp">ripcord::timestamp()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method returns a unix timestamp from a given XML-RPC datetime object.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="u"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">u</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
unknownServiceType
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#constunknownServiceType">ripcord::unknownServiceType</a> in ripcord.php</div>
|
||||
<div class="index-item-description">Variable is not a classname or an object - Thrown by the ripcord server.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="v"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">v</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="var-title">$version</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor.html#var$version">Ripcord_Documentor::$version</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">Which version of the XML vocabulary the server implements. Either 'xmlrpc', 'soap 1.1', 'simple' or 'auto'.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="w"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">w</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="var-title">$wsdl</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor.html#var$wsdl">Ripcord_Documentor::$wsdl</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">The wsdl 1.0 description.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
<span class="var-title">$wsdl2</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/Ripcord_Documentor.html#var$wsdl2">Ripcord_Documentor::$wsdl2</a> in ripcord_documentor.php</div>
|
||||
<div class="index-item-description">The wsdl 2.0 description</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<a name="x"></a>
|
||||
<div class="index-letter-section">
|
||||
<div style="float: left" class="index-letter-title">x</div>
|
||||
<div style="float: right"><a href="#top">top</a></div>
|
||||
<div style="clear: both"></div>
|
||||
</div>
|
||||
<dl>
|
||||
<dt class="field">
|
||||
<span class="method-title">xmlrpcClient</span>
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#methodxmlrpcClient">ripcord::xmlrpcClient()</a> in ripcord.php</div>
|
||||
<div class="index-item-description">This method returns a new Ripcord client, configured to access an XML-RPC server.</div>
|
||||
</dd>
|
||||
<dt class="field">
|
||||
xmlrpcNotInstalled
|
||||
</dt>
|
||||
<dd class="index-item-body">
|
||||
<div class="index-item-details"><a href="Ripcord/ripcord.html#constxmlrpcNotInstalled">ripcord::xmlrpcNotInstalled</a> in ripcord.php</div>
|
||||
<div class="index-item-description">PHP XMLRPC library is not installed - Thrown by the ripcord server and client when the xmlrpc library is not installed.</div>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<div class="index-letter-menu">
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#a">a</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#b">b</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#c">c</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#d">d</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#e">e</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#f">f</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#g">g</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#h">h</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#i">i</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#l">l</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#m">m</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#n">n</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#p">p</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#r">r</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#s">s</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#t">t</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#u">u</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#v">v</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#w">w</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#x">x</a>
|
||||
<a class="index-letter" href="elementindex_Ripcord.html#_">_</a>
|
||||
</div> </body>
|
||||
</html>
|
20
erp/ripcord/docs/errors.html
Normal file
20
erp/ripcord/docs/errors.html
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title>phpDocumentor Parser Errors and Warnings</title>
|
||||
<link rel="stylesheet" href="media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<a href="#Post-parsing">Post-parsing</a><br>
|
||||
<a name="ripcord_client.php"></a>
|
||||
<h1>ripcord_client.php</h1>
|
||||
<h2>Warnings:</h2><br>
|
||||
<b>Warning on line 313</b> - no @package tag was used in a DocBlock for class Ripcord_Client_MultiCall<br>
|
||||
<p class="notes" id="credit">
|
||||
Documentation generated on Tue, 16 Nov 2010 16:20:19 +0100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
24
erp/ripcord/docs/index.html
Normal file
24
erp/ripcord/docs/index.html
Normal file
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//FR"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- Generated by phpDocumentor on Tue, 16 Nov 2010 16:20:14 +0100 -->
|
||||
<title>Ripcord v0.9: Easy XML-RPC for PHP</title>
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
|
||||
<FRAMESET rows='120,*'>
|
||||
<FRAME src='packages.html' name='left_top' frameborder="1" bordercolor="#999999">
|
||||
<FRAMESET cols='25%,*'>
|
||||
<FRAME src='li_Ripcord.html' name='left_bottom' frameborder="1" bordercolor="#999999">
|
||||
<FRAME src='blank.html' name='right' frameborder="1" bordercolor="#999999">
|
||||
</FRAMESET>
|
||||
<NOFRAMES>
|
||||
<H2>Frame Alert</H2>
|
||||
<P>This document is designed to be viewed using the frames feature.
|
||||
If you see this message, you are using a non-frame-capable web client.</P>
|
||||
</NOFRAMES>
|
||||
</FRAMESET>
|
||||
</HTML>
|
55
erp/ripcord/docs/li_Ripcord.html
Normal file
55
erp/ripcord/docs/li_Ripcord.html
Normal file
@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="media/stylesheet.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="package-title">Ripcord</div>
|
||||
<div class="package-details">
|
||||
|
||||
<dl class="tree">
|
||||
|
||||
<dt class="folder-title">Description</dt>
|
||||
<dd>
|
||||
<a href='classtrees_Ripcord.html' target='right'>Class trees</a><br />
|
||||
<a href='elementindex_Ripcord.html' target='right'>Index of elements</a><br />
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<dt class="folder-title">Interfaces</dt>
|
||||
<dd><a href='Ripcord/Ripcord_Documentor_Interface.html' target='right'>Ripcord_Documentor_Interface</a></dd>
|
||||
<dd><a href='Ripcord/Ripcord_Documentor_Parser.html' target='right'>Ripcord_Documentor_Parser</a></dd>
|
||||
<dd><a href='Ripcord/Ripcord_Exception.html' target='right'>Ripcord_Exception</a></dd>
|
||||
<dd><a href='Ripcord/Ripcord_Transport.html' target='right'>Ripcord_Transport</a></dd>
|
||||
<dt class="folder-title">Classes</dt>
|
||||
<dd><a href='Ripcord/ripcord.html' target='right'>ripcord</a></dd>
|
||||
<dd><a href='Ripcord/Ripcord_BadMethodCallException.html' target='right'>Ripcord_BadMethodCallException</a></dd>
|
||||
<dd><a href='Ripcord/Ripcord_Client.html' target='right'>Ripcord_Client</a></dd>
|
||||
<dd><a href='Ripcord/Ripcord_Client_Call.html' target='right'>Ripcord_Client_Call</a></dd>
|
||||
<dd><a href='Ripcord/Ripcord_Client_MultiCall.html' target='right'>Ripcord_Client_MultiCall</a></dd>
|
||||
<dd><a href='Ripcord/Ripcord_ConfigurationException.html' target='right'>Ripcord_ConfigurationException</a></dd>
|
||||
<dd><a href='Ripcord/Ripcord_Documentor.html' target='right'>Ripcord_Documentor</a></dd>
|
||||
<dd><a href='Ripcord/Ripcord_Documentor_Parser_phpdoc.html' target='right'>Ripcord_Documentor_Parser_phpdoc</a></dd>
|
||||
<dd><a href='Ripcord/Ripcord_InvalidArgumentException.html' target='right'>Ripcord_InvalidArgumentException</a></dd>
|
||||
<dd><a href='Ripcord/Ripcord_RemoteException.html' target='right'>Ripcord_RemoteException</a></dd>
|
||||
<dd><a href='Ripcord/Ripcord_Server.html' target='right'>Ripcord_Server</a></dd>
|
||||
<dd><a href='Ripcord/Ripcord_TransportException.html' target='right'>Ripcord_TransportException</a></dd>
|
||||
<dd><a href='Ripcord/Ripcord_Transport_CURL.html' target='right'>Ripcord_Transport_CURL</a></dd>
|
||||
<dd><a href='Ripcord/Ripcord_Transport_Stream.html' target='right'>Ripcord_Transport_Stream</a></dd>
|
||||
<dt class="folder-title">Files</dt>
|
||||
<dd><a href='Ripcord/_ripcord.php.html' target='right'>ripcord.php</a></dd>
|
||||
<dd><a href='Ripcord/_ripcord_client.php.html' target='right'>ripcord_client.php</a></dd>
|
||||
<dd><a href='Ripcord/_ripcord_documentor.php.html' target='right'>ripcord_documentor.php</a></dd>
|
||||
<dd><a href='Ripcord/_ripcord_server.php.html' target='right'>ripcord_server.php</a></dd>
|
||||
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<p class="notes"><a href="http://www.phpdoc.org" target="_blank">phpDocumentor v <span class="field">1.4.3</span></a></p>
|
||||
</BODY>
|
||||
</HTML>
|
32
erp/ripcord/docs/media/banner.css
Normal file
32
erp/ripcord/docs/media/banner.css
Normal file
@ -0,0 +1,32 @@
|
||||
body
|
||||
{
|
||||
background-color: #CCCCFF;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
/* Banner (top bar) classes */
|
||||
|
||||
.banner { }
|
||||
|
||||
.banner-menu
|
||||
{
|
||||
clear: both;
|
||||
padding: .5em;
|
||||
border-top: 2px solid #6666AA;
|
||||
}
|
||||
|
||||
.banner-title
|
||||
{
|
||||
text-align: right;
|
||||
font-size: 20pt;
|
||||
font-weight: bold;
|
||||
margin: .2em;
|
||||
}
|
||||
|
||||
.package-selector
|
||||
{
|
||||
background-color: #AAAADD;
|
||||
border: 1px solid black;
|
||||
color: yellow;
|
||||
}
|
BIN
erp/ripcord/docs/media/images/Constant.png
Normal file
BIN
erp/ripcord/docs/media/images/Constant.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 752 B |
BIN
erp/ripcord/docs/media/images/Variable.png
Normal file
BIN
erp/ripcord/docs/media/images/Variable.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 688 B |
144
erp/ripcord/docs/media/stylesheet.css
Normal file
144
erp/ripcord/docs/media/stylesheet.css
Normal file
@ -0,0 +1,144 @@
|
||||
a { color: #336699; text-decoration: none; }
|
||||
a:hover { color: #6699CC; text-decoration: underline; }
|
||||
a:active { color: #6699CC; text-decoration: underline; }
|
||||
|
||||
body { background : #FFFFFF; }
|
||||
body, table { font-family: Georgia, Times New Roman, Times, serif; font-size: 10pt }
|
||||
p, li { line-height: 140% }
|
||||
a img { border: 0px; }
|
||||
dd { margin-left: 0px; padding-left: 1em; }
|
||||
|
||||
/* Page layout/boxes */
|
||||
|
||||
.info-box {}
|
||||
.info-box-title { margin: 1em 0em 0em 0em; padding: .25em; font-weight: normal; font-size: 14pt; border: 2px solid #999999; background-color: #CCCCFF }
|
||||
.info-box-body { border: 1px solid #999999; padding: .5em; }
|
||||
.nav-bar { font-size: 8pt; white-space: nowrap; text-align: right; padding: .2em; margin: 0em 0em 1em 0em; }
|
||||
|
||||
.oddrow { background-color: #F8F8F8; border: 1px solid #AAAAAA; padding: .5em; margin-bottom: 1em}
|
||||
.evenrow { border: 1px solid #AAAAAA; padding: .5em; margin-bottom: 1em}
|
||||
|
||||
.page-body { max-width: 800px; margin: auto; }
|
||||
.tree dl { margin: 0px }
|
||||
|
||||
/* Index formatting classes */
|
||||
|
||||
.index-item-body { margin-top: .5em; margin-bottom: .5em}
|
||||
.index-item-description { margin-top: .25em }
|
||||
.index-item-details { font-weight: normal; font-style: italic; font-size: 8pt }
|
||||
.index-letter-section { background-color: #EEEEEE; border: 1px dotted #999999; padding: .5em; margin-bottom: 1em}
|
||||
.index-letter-title { font-size: 12pt; font-weight: bold }
|
||||
.index-letter-menu { text-align: center; margin: 1em }
|
||||
.index-letter { font-size: 12pt }
|
||||
|
||||
/* Docbook classes */
|
||||
|
||||
.description {}
|
||||
.short-description { font-weight: bold; color: #666666; }
|
||||
.tags { padding-left: 0em; margin-left: 3em; color: #666666; list-style-type: square; }
|
||||
.parameters { padding-left: 0em; margin-left: 3em; font-style: italic; list-style-type: square; }
|
||||
.redefinitions { font-size: 8pt; padding-left: 0em; margin-left: 2em; }
|
||||
.package { }
|
||||
.package-title { font-weight: bold; font-size: 14pt; border-bottom: 1px solid black }
|
||||
.package-details { font-size: 85%; }
|
||||
.sub-package { font-weight: bold; font-size: 120% }
|
||||
.tutorial { border-width: thin; border-color: #0066ff }
|
||||
.tutorial-nav-box { width: 100%; border: 1px solid #999999; background-color: #F8F8F8; }
|
||||
.nav-button-disabled { color: #999999; }
|
||||
.nav-button:active,
|
||||
.nav-button:focus,
|
||||
.nav-button:hover { background-color: #DDDDDD; outline: 1px solid #999999; text-decoration: none }
|
||||
.folder-title { font-style: italic }
|
||||
|
||||
/* Generic formatting */
|
||||
|
||||
.field { font-weight: bold; }
|
||||
.detail { font-size: 8pt; }
|
||||
.notes { font-style: italic; font-size: 8pt; }
|
||||
.separator { background-color: #999999; height: 2px; }
|
||||
.warning { color: #FF6600; }
|
||||
.disabled { font-style: italic; color: #999999; }
|
||||
|
||||
/* Code elements */
|
||||
|
||||
.line-number { }
|
||||
|
||||
.class-table { width: 100%; }
|
||||
.class-table-header { border-bottom: 1px dotted #666666; text-align: left}
|
||||
.class-name { color: #000000; font-weight: bold; }
|
||||
|
||||
.method-summary { padding-left: 1em; font-size: 8pt }
|
||||
.method-header { }
|
||||
.method-definition { margin-bottom: .3em }
|
||||
.method-title { font-weight: bold; }
|
||||
.method-name { font-weight: bold; }
|
||||
.method-signature { font-size: 85%; color: #666666; margin: .5em 0em }
|
||||
.method-result { font-style: italic; }
|
||||
|
||||
.var-summary { padding-left: 1em; font-size: 8pt; }
|
||||
.var-header { }
|
||||
.var-title { margin-bottom: .3em }
|
||||
.var-type { font-style: italic; }
|
||||
.var-name { font-weight: bold; }
|
||||
.var-default {}
|
||||
.var-description { font-weight: normal; color: #000000; }
|
||||
|
||||
.include-title { }
|
||||
.include-type { font-style: italic; }
|
||||
.include-name { font-weight: bold; }
|
||||
|
||||
.const-title { }
|
||||
.const-name { font-weight: bold; }
|
||||
|
||||
/* Syntax highlighting */
|
||||
|
||||
.src-code { border: 1px solid #336699; padding: 1em; background-color: #EEEEEE; }
|
||||
.src-line { font-family: 'Courier New', Courier, monospace; font-weight: normal; }
|
||||
|
||||
.src-comm { color: green; }
|
||||
.src-id { }
|
||||
.src-inc { color: #0000FF; }
|
||||
.src-key { color: #0000FF; }
|
||||
.src-num { color: #CC0000; }
|
||||
.src-str { color: #66cccc; }
|
||||
.src-sym { font-weight: bold; }
|
||||
.src-var { }
|
||||
|
||||
.src-php { font-weight: bold; }
|
||||
|
||||
.src-doc { color: #009999 }
|
||||
.src-doc-close-template { color: #0000FF }
|
||||
.src-doc-coretag { color: #0099FF; font-weight: bold }
|
||||
.src-doc-inlinetag { color: #0099FF }
|
||||
.src-doc-internal { color: #6699cc }
|
||||
.src-doc-tag { color: #0080CC }
|
||||
.src-doc-template { color: #0000FF }
|
||||
.src-doc-type { font-style: italic }
|
||||
.src-doc-var { font-style: italic }
|
||||
|
||||
.tute-tag { color: #009999 }
|
||||
.tute-attribute-name { color: #0000FF }
|
||||
.tute-attribute-value { color: #0099FF }
|
||||
.tute-entity { font-weight: bold; }
|
||||
.tute-comment { font-style: italic }
|
||||
.tute-inline-tag { color: #636311; font-weight: bold }
|
||||
|
||||
/* tutorial */
|
||||
|
||||
.authors { }
|
||||
.author { font-style: italic; font-weight: bold }
|
||||
.author-blurb { margin: .5em 0em .5em 2em; font-size: 85%; font-weight: normal; font-style: normal }
|
||||
.example { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em; }
|
||||
*[class="example"] { line-height : 0.5em }
|
||||
.listing { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em; white-space: nowrap; }
|
||||
*[class="listing"] { line-height : 0.5em }
|
||||
.release-info { font-size: 85%; font-style: italic; margin: 1em 0em }
|
||||
.ref-title-box { }
|
||||
.ref-title { }
|
||||
.ref-purpose { font-style: italic; color: #666666 }
|
||||
.ref-synopsis { }
|
||||
.title { font-weight: bold; margin: 1em 0em 0em 0em; padding: .25em; border: 2px solid #999999; background-color: #CCCCFF }
|
||||
.cmd-synopsis { margin: 1em 0em }
|
||||
.cmd-title { font-weight: bold }
|
||||
.toc { margin-left: 2em; padding-left: 0em }
|
||||
|
27
erp/ripcord/docs/packages.html
Normal file
27
erp/ripcord/docs/packages.html
Normal file
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<!-- template designed by Marco Von Ballmoos -->
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="media/stylesheet.css" />
|
||||
<link rel="stylesheet" href="media/banner.css" />
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="banner">
|
||||
<div class="banner-title">Ripcord</div>
|
||||
<div class="banner-menu">
|
||||
<table cellpadding="0" cellspacing="0" style="width: 100%">
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
<td style="width: 2em"> </td>
|
||||
<td style="text-align: right">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
65
erp/ripcord/readme.txt
Normal file
65
erp/ripcord/readme.txt
Normal file
@ -0,0 +1,65 @@
|
||||
Readme Ripcord: Easy XML-RPC Client and Server for PHP 5
|
||||
=============================================================================
|
||||
|
||||
Ripcord is a very easy to use XML-RPC library for PHP. It provides client,
|
||||
server and auto documentation features for XML-RPC but also SimpleRPC and
|
||||
simplified SOAP (1.1). It uses PHP's xmlrpc library and it needs at least PHP 5.
|
||||
|
||||
To create a simple xmlrpc client do something like this:
|
||||
|
||||
<?php
|
||||
require_once('ripcord.php');
|
||||
$client = ripcord::xmlrpcClient( 'http://www.moviemeter.nl/ws' );
|
||||
$score = $client->film->getScore( 'e3dee9d19a8c3af7c92f9067d2945b59', 500 );
|
||||
?>
|
||||
|
||||
See the RipcordClientManual
|
||||
<http://code.google.com/p/ripcord/wiki/RipcordClientManual> for more information.
|
||||
|
||||
To create a simple xmlrpc server do something like this:
|
||||
|
||||
<?php
|
||||
require_once('ripcord.php');
|
||||
class myTest {
|
||||
public function Foo() {
|
||||
return 'Bar';
|
||||
}
|
||||
}
|
||||
$test = new MyTest();
|
||||
$server = ripcord::server( $test );
|
||||
$server->run();
|
||||
?>
|
||||
|
||||
See the RipcordServerManual
|
||||
<http://code.google.com/p/ripcord/wiki/RipcordServerManual> for more information.
|
||||
|
||||
|
||||
Extending Ripcord
|
||||
=================
|
||||
|
||||
Ripcord is also very simple to extend. All functionality can be changed
|
||||
through dependency injection. The client by default uses the PHP Streams API
|
||||
to connect to a server, but can simply be reconfigured to use CURL. You
|
||||
can provide your own configuration or even a completely new transport method
|
||||
by simply injecting a new transport object into the client.
|
||||
|
||||
Any server created with Ripcord is auto documenting by default. Simply browse
|
||||
to the URL of your RPC server and you will see a list of all methods including
|
||||
any inline documentation for that method, if you use docblock style comments, e.g.:
|
||||
|
||||
/**
|
||||
* This will show up with your method description.
|
||||
*/
|
||||
function yourMethod() {
|
||||
}
|
||||
|
||||
The auto documentor is again easily extended to use your own styles or extensions
|
||||
and you can simply inject a completely different documentor object into the server
|
||||
if you want. Or skip it altogether.
|
||||
|
||||
|
||||
Documentation
|
||||
=============
|
||||
|
||||
The full API documentation is included in the docs/ directory.
|
||||
|
356
erp/ripcord/ripcord.php
Normal file
356
erp/ripcord/ripcord.php
Normal file
@ -0,0 +1,356 @@
|
||||
<?php
|
||||
/**
|
||||
* Ripcord is an easy to use XML-RPC library for PHP.
|
||||
* @package Ripcord
|
||||
* @author Auke van Slooten <auke@muze.nl>
|
||||
* @copyright Copyright (C) 2010, Muze <www.muze.nl>
|
||||
* @license http://opensource.org/licenses/gpl-3.0.html GNU Public License
|
||||
* @version Ripcord 0.9 - PHP 5
|
||||
*/
|
||||
|
||||
/**
|
||||
* The ripcord class contains a number of useful static methods. This makes it a bit easier to create a server or client, convert types
|
||||
* and check for errors.
|
||||
* @package Ripcord
|
||||
*/
|
||||
class ripcord
|
||||
{
|
||||
/**
|
||||
* This method checks whether the given argument is an XML-RPC fault.
|
||||
* @param mixed $fault
|
||||
* @return bool
|
||||
*/
|
||||
public static function isFault($fault)
|
||||
{
|
||||
if ( isset($fault) && is_array($fault) ) {
|
||||
return xmlrpc_is_fault($fault);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method generates an XML-RPC fault with the given code and message.
|
||||
* @param int $code
|
||||
* @param string $message
|
||||
* @return array
|
||||
*/
|
||||
public static function fault($code, $message)
|
||||
{
|
||||
return array('faultCode' => $code, 'faultString' => $message);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a new Ripcord server, which by default implements XML-RPC, Simple RPC and SOAP 1.1.
|
||||
* The server will publish any methods passed through the $services argument. It can be configured through
|
||||
* the $options argument.
|
||||
* @param mixed $services Optional. Either an object or an array of objects. If the array has non-numeric keys, the key will be used as a namespace for the methods in the object.
|
||||
* @param array $options Optional. An array of options to set for the Ripcord server.
|
||||
* @see Ripcord_Server
|
||||
*/
|
||||
public static function server($services = null, $options = null, $documentor = null)
|
||||
{
|
||||
self::load('Ripcord_Server');
|
||||
if ( !isset($documentor) )
|
||||
{
|
||||
$doc = array('name', 'css', 'wsdl', 'wsdl2');
|
||||
$docOptions = array();
|
||||
foreach ( $doc as $key )
|
||||
{
|
||||
if ( isset($options[$key]) )
|
||||
{
|
||||
$docOptions[$key] = $options[$key];
|
||||
unset( $options[$key] );
|
||||
}
|
||||
}
|
||||
$docOptions['version'] = $options['version'];
|
||||
$documentor = self::documentor( $docOptions );
|
||||
}
|
||||
return new Ripcord_Server($services, $options, $documentor);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a new Ripcord client. By default this will be an XML-RPC client, but you can change this
|
||||
* through the $options argument.
|
||||
* @param string $url The url of the RPC server to connect with
|
||||
* @param array $options Optional. An array of options to set for the Ripcord client.
|
||||
* @see Ripcord_Client
|
||||
*/
|
||||
public static function client($url, $options = null, $transport = null )
|
||||
{
|
||||
self::load('Ripcord_Client');
|
||||
if ( !isset($transport) )
|
||||
{
|
||||
$transport = new Ripcord_Transport_Stream();
|
||||
}
|
||||
return new Ripcord_Client($url, $options, $transport);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a new Ripcord documentor object.
|
||||
* @param array $options Optional. An array of options to set for the Ripcord documentor.
|
||||
* @param object docCommentParser Optional. An object that parses a docComment block. Must
|
||||
* implement the Ripcord_Documentor_CommentParser interface.
|
||||
* @see Ripcord_Client
|
||||
*/
|
||||
public static function documentor( $options = null, $docCommentParser = null )
|
||||
{
|
||||
self::load('Ripcord_Documentor');
|
||||
if (!$docCommentParser) {
|
||||
$docCommentParser = new Ripcord_Documentor_Parser_phpdoc();
|
||||
}
|
||||
return new Ripcord_Documentor( $options, $docCommentParser );
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns an XML-RPC datetime object from a given unix timestamp.
|
||||
* @param int $timestamp
|
||||
* @return object
|
||||
*/
|
||||
public static function datetime($timestamp)
|
||||
{
|
||||
$datetime = date("Ymd\TH:i:s", $timestamp);
|
||||
xmlrpc_set_type($datetime, 'datetime');
|
||||
return $datetime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a unix timestamp from a given XML-RPC datetime object.
|
||||
* It will throw a 'Variable is not of type datetime' Ripcord_Exception (code -6)
|
||||
* if the given argument is not of the correct type.
|
||||
* @param object $datetime
|
||||
* @return int
|
||||
*/
|
||||
public static function timestamp($datetime)
|
||||
{
|
||||
if (xmlrpc_get_type($datetime)=='datetime')
|
||||
{
|
||||
return $datetime->timestamp;
|
||||
} else {
|
||||
throw Ripcord_Exception('Variable is not of type datetime', -6);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns an XML-RPC base64 object from a given binary string.
|
||||
* @param string $binary
|
||||
* @return object
|
||||
*/
|
||||
public static function base64($binary)
|
||||
{
|
||||
xmlrpc_set_type($binary, 'base64');
|
||||
return $binary;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a (binary) string from a given XML-RPC base64 object.
|
||||
* It will throw a 'Variable is not of type base64' Ripcord_Exception (code -7)
|
||||
* if the given argument is not of the correct type.
|
||||
* @param object $base64
|
||||
* @return string
|
||||
*/
|
||||
public static function binary($base64)
|
||||
{
|
||||
if (xmlrpc_get_type($base64)=='base64')
|
||||
{
|
||||
return $base64->scalar;
|
||||
} else {
|
||||
throw Ripcord_Exception('Variable is not of type base64', -7);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns the type of the given parameter. This can be any of the XML-RPC data types, e.g.
|
||||
* 'struct', 'int', 'string', 'base64', 'boolean', 'double', 'array' or 'datetime'.
|
||||
* @param mixed $param
|
||||
* @return string
|
||||
*/
|
||||
public static function getType($param)
|
||||
{
|
||||
return xmlrpc_get_type($param);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a new Ripcord client, configured to access a SOAP 1.1 server.
|
||||
* @param string $url
|
||||
* @param array $options Optional.
|
||||
* @see Ripcord_Client
|
||||
*/
|
||||
public static function soapClient($url, $options = null, $transport = null)
|
||||
{
|
||||
$options['version'] = 'soap 1.1';
|
||||
return self::client($url, $options, $transport);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a new Ripcord client, configured to access an XML-RPC server.
|
||||
* @param string $url
|
||||
* @param array $options Optional.
|
||||
* @return object
|
||||
* @see Ripcord_Client
|
||||
*/
|
||||
public static function xmlrpcClient($url, $options = null, $transport = null)
|
||||
{
|
||||
$options['version'] = 'xmlrpc';
|
||||
return self::client($url, $options, $transport);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns a new Ripcord client, configured to access a Simple RPC server.
|
||||
* @param string $url
|
||||
* @param array $options Optional.
|
||||
* @return object
|
||||
* @see Ripcord_Client
|
||||
*/
|
||||
public static function simpleClient($url, $options = null, $transport = null)
|
||||
{
|
||||
$options['version'] = 'simple';
|
||||
return self::client($url, $options, $transport);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method includes a ripcord class, using require_once. Used for autoloading ripcord classes.
|
||||
* @param string $class The name of the class to load.
|
||||
* @return boolean
|
||||
*/
|
||||
public static function load($class)
|
||||
{
|
||||
if (substr($class, 0, 8)=='Ripcord_')
|
||||
{
|
||||
$root = dirname(__FILE__).'/ripcord_';
|
||||
$class = substr($class, 8);
|
||||
$file = str_replace('.', '', $class);
|
||||
$file = str_replace('_', '/', $file);
|
||||
$file = strtolower($file);
|
||||
while ($file && $file!='.')
|
||||
{
|
||||
if ( file_exists($root.$file.'.php') )
|
||||
{
|
||||
require_once($root.$file.'.php');
|
||||
return true;
|
||||
} else {
|
||||
$file = dirname($file);
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method creates a new Ripcord_Client_Call object, which encodes the information needed for
|
||||
* a method call to an rpc server. This is mostly used for the system.multiCall method.
|
||||
* @param string $method The name of the method call to encode
|
||||
* @param mixed $args,... The remainder of the arguments are encoded as parameters to the call
|
||||
* @return object
|
||||
*/
|
||||
public static function encodeCall()
|
||||
{
|
||||
self::load('Ripcord_Client');
|
||||
$params = func_get_args();
|
||||
$method = array_shift($params);
|
||||
return new Ripcord_Client_Call( $method, $params );
|
||||
}
|
||||
|
||||
/*
|
||||
* This method binds the first parameter to the output of a Ripcord client call. If
|
||||
* the second argument is a Ripcord_Client_Call object, it binds the parameter to it,
|
||||
* if not it simply assigns the second parameter to the first parameter.
|
||||
* This means that doing:
|
||||
* > ripcord::bind( $result, $client->someMethod() )
|
||||
* will always result in $result eventually containing the return value of $client->someMethod().
|
||||
* Whether multiCall mode has been enabled or not.
|
||||
*/
|
||||
public function bind(&$bound, $call)
|
||||
{
|
||||
if ( is_a( $call, 'Ripcord_Client_Call' ) )
|
||||
{
|
||||
$call->bound =& $bound;
|
||||
} else {
|
||||
$bound = $call;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method {method} not found. - Thrown by the ripcord server when a requested method isn't found.
|
||||
*/
|
||||
const methodNotFound = -1;
|
||||
/**
|
||||
* Argument {index} is not a valid Ripcord call - Thrown by the client when passing incorrect arguments to system.multiCall.
|
||||
*/
|
||||
const notRipcordCall = -2;
|
||||
/**
|
||||
* Cannot recurse system.multiCall - Thrown by the ripcord server when system.multicall is called within itself.
|
||||
*/
|
||||
const cannotRecurse = -3;
|
||||
/**
|
||||
* Could not access {url} - Thrown by the transport object when unable to access the given url.
|
||||
*/
|
||||
const cannotAccessURL = -4;
|
||||
/**
|
||||
* PHP XMLRPC library is not installed - Thrown by the ripcord server and client when the xmlrpc library is not installed.
|
||||
*/
|
||||
const xmlrpcNotInstalled = -5;
|
||||
/**
|
||||
* Variable is not of type datetime - Thrown by the ripcord timestamp method.
|
||||
*/
|
||||
const notDatetime = -6;
|
||||
/**
|
||||
* Variable is not of type base64 - Thrown by the ripcord binary method.
|
||||
*/
|
||||
const notBase64 = -7;
|
||||
/**
|
||||
* Variable is not a classname or an object - Thrown by the ripcord server.
|
||||
*/
|
||||
const unknownServiceType = -8;
|
||||
}
|
||||
|
||||
/**
|
||||
* This interface is implemented by all exceptions thrown by Ripcord.
|
||||
* @package Ripcord
|
||||
*/
|
||||
interface Ripcord_Exception {}
|
||||
|
||||
/**
|
||||
* This class is used whenever an when a method passed to the server is invalid.
|
||||
* - ripcord::methodNotFound (-1) Method {method} not found. - Thrown by the ripcord server when a requested method isn't found.
|
||||
* @package Ripcord
|
||||
*/
|
||||
class Ripcord_BadMethodCallException extends BadMethodCallException implements Ripcord_Exception { }
|
||||
|
||||
/**
|
||||
* This class is used whenever prerequisite requirements are not met.
|
||||
* - ripcord::xmlrpcNotInstalled (-5) PHP XMLRPC library is not installed - Thrown by the ripcord server and client when the xmlrpc library is not installed.
|
||||
* @package Ripcord
|
||||
*/
|
||||
class Ripcord_ConfigurationException extends Exception implements Ripcord_Exception { }
|
||||
|
||||
/**
|
||||
* This class is used whenever an argument passed to a Ripcord method is invalid for any reason. Possible exceptions thrown are:
|
||||
* - ripcord::notRipcordCall (-2) Argument {index} is not a valid Ripcord call - Thrown by the client when passing incorrect arguments to system.multiCall.
|
||||
* - ripcord::cannotRecurse (-3) Cannot recurse system.multiCall - Thrown by the ripcord server when system.multicall is called within itself.
|
||||
* - ripcord::notDateTime (-6) Variable is not of type datetime - Thrown by the ripcord timestamp method.
|
||||
* - ripcord::notBase64 (-7) Variable is not of type base64 - Thrown by the ripcord binary method.
|
||||
* - ripcord::unknownServiceType (-8) Variable is not a classname or an object - Thrown by the ripcord server.
|
||||
* @package Ripcord
|
||||
*/
|
||||
class Ripcord_InvalidArgumentException extends InvalidArgumentException implements Ripcord_Exception { }
|
||||
|
||||
/**
|
||||
* This class is used whenever something goes wrong in sending / receiving data. Possible exceptions thrown are:
|
||||
* - ripcord::cannotAccessURL (-4) Could not access {url} - Thrown by the transport object when unable to access the given url.
|
||||
* @package Ripcord
|
||||
*/
|
||||
class Ripcord_TransportException extends RuntimeException implements Ripcord_Exception { }
|
||||
|
||||
/**
|
||||
* This class is used for exceptions generated from xmlrpc faults returned by the server. The code and message correspond
|
||||
* to the code and message from the xmlrpc fault.
|
||||
* @package Ripcord
|
||||
*/
|
||||
class Ripcord_RemoteException extends Exception implements Ripcord_Exception { }
|
||||
|
||||
if (function_exists('spl_autoload_register')) {
|
||||
spl_autoload_register('ripcord::load');
|
||||
}
|
||||
?>
|
579
erp/ripcord/ripcord_client.php
Normal file
579
erp/ripcord/ripcord_client.php
Normal file
@ -0,0 +1,579 @@
|
||||
<?php
|
||||
/**
|
||||
* Ripcord is an easy to use XML-RPC library for PHP.
|
||||
* @package Ripcord
|
||||
* @author Auke van Slooten <auke@muze.nl>
|
||||
* @copyright Copyright (C) 2010, Muze <www.muze.nl>
|
||||
* @license http://opensource.org/licenses/gpl-3.0.html GNU Public License
|
||||
* @version Ripcord 0.9 - PHP 5
|
||||
*/
|
||||
|
||||
/**
|
||||
* Includes the static ripcord factory class and exceptions
|
||||
*/
|
||||
require_once(dirname(__FILE__).'/ripcord.php');
|
||||
|
||||
/**
|
||||
* This class implements a simple RPC client, for XML-RPC, (simplified) SOAP 1.1 or Simple RPC. The client abstracts
|
||||
* the entire RPC process behind native PHP methods. Any method defined by the rpc server can be called as if it was
|
||||
* a native method of the rpc client.
|
||||
*
|
||||
* E.g.
|
||||
* <code>
|
||||
* <?php
|
||||
* $client = ripcord::client( 'http://www.moviemeter.nl/ws' );
|
||||
* $score = $client->film->getScore( 'e3dee9d19a8c3af7c92f9067d2945b59', 500 );
|
||||
* ?>
|
||||
* </code>
|
||||
*
|
||||
* The client has a simple interface for the system.multiCall method:
|
||||
* <code>
|
||||
* <?php
|
||||
* $client = ripcord::client( 'http://ripcord.muze.nl/ripcord.php' );
|
||||
* $client->system->multiCall()->start();
|
||||
* ripcord::bind( $methods, $client->system->listMethods() );
|
||||
* ripcord::bind( $foo, $client->getFoo() );
|
||||
* $client->system->multiCall()->execute();
|
||||
* ?>
|
||||
* </code>
|
||||
*
|
||||
* The soap client can only handle the basic php types and doesn't understand xml namespaces. Use PHP's SoapClient
|
||||
* for complex soap calls. This client cannot parse wsdl.
|
||||
* If you want to skip the ripcord::client factory method, you _must_ provide a transport object explicitly.
|
||||
*
|
||||
* @link http://wiki.moviemeter.nl/index.php/API Moviemeter API documentation
|
||||
* @package Ripcord
|
||||
*/
|
||||
class Ripcord_Client
|
||||
{
|
||||
/**
|
||||
* The url of the rpc server
|
||||
*/
|
||||
private $_url = '';
|
||||
|
||||
/**
|
||||
* The transport object, used to post requests.
|
||||
*/
|
||||
private $_transport = null;
|
||||
|
||||
/**
|
||||
* A list of output options, used with the xmlrpc_encode_request method.
|
||||
* @see Ripcord_Server::setOutputOption()
|
||||
*/
|
||||
private $_outputOptions = array(
|
||||
"output_type" => "xml",
|
||||
"verbosity" => "pretty",
|
||||
"escaping" => array("markup"),
|
||||
"version" => "xmlrpc",
|
||||
"encoding" => "utf-8"
|
||||
);
|
||||
|
||||
/**
|
||||
* The namespace to use when calling a method.
|
||||
*/
|
||||
private $_namespace = null;
|
||||
|
||||
/**
|
||||
* A reference to the root client object. This is so when you use namespaced sub clients, you can always
|
||||
* find the _response and _request data in the root client.
|
||||
*/
|
||||
private $_rootClient = null;
|
||||
|
||||
/**
|
||||
* A flag to indicate whether or not to preemptively clone objects passed as arguments to methods, see
|
||||
* php bug #50282. Only correctly set in the rootClient.
|
||||
*/
|
||||
private $_cloneObjects = false;
|
||||
|
||||
/**
|
||||
* A flag to indicate if we are in a multiCall block. Start this with $client->system->multiCall()->start()
|
||||
*/
|
||||
protected $_multiCall = false;
|
||||
|
||||
/**
|
||||
* A list of deferred encoded calls.
|
||||
*/
|
||||
protected $_multiCallArgs = array();
|
||||
|
||||
/**
|
||||
* The exact response from the rpc server. For debugging purposes.
|
||||
*/
|
||||
public $_response = '';
|
||||
|
||||
/**
|
||||
* The exact request from the client. For debugging purposes.
|
||||
*/
|
||||
public $_request = '';
|
||||
|
||||
/**
|
||||
* Whether or not to throw exceptions when an xml-rpc fault is returned by the server. Default is false.
|
||||
*/
|
||||
public $_throwExceptions = false;
|
||||
|
||||
/**
|
||||
* Whether or not to decode the XML-RPC datetime and base64 types to unix timestamp and binary string
|
||||
* respectively.
|
||||
*/
|
||||
public $_autoDecode = true;
|
||||
|
||||
/**
|
||||
* The constructor for the RPC client.
|
||||
* @param string $url The url of the rpc server
|
||||
* @param array $options Optional. A list of outputOptions. See {@link Ripcord_Server::setOutputOption()}
|
||||
* @param object $rootClient Optional. Used internally when using namespaces.
|
||||
* @throws Ripcord_ConfigurationException (ripcord::xmlrpcNotInstalled) when the xmlrpc extension is not available.
|
||||
*/
|
||||
public function __construct( $url, array $options = null, $transport = null, $rootClient = null )
|
||||
{
|
||||
if ( !isset($rootClient) ) {
|
||||
$rootClient = $this;
|
||||
if ( !function_exists( 'xmlrpc_encode_request' ) )
|
||||
{
|
||||
throw new Ripcord_ConfigurationException('PHP XMLRPC library is not installed',
|
||||
ripcord::xmlrpcNotInstalled);
|
||||
}
|
||||
$version = explode('.', phpversion() );
|
||||
if ( (0 + $version[0]) == 5) {
|
||||
if ( ( 0 + $version[1]) < 2 ) {
|
||||
$this->_cloneObjects = true; // workaround for bug #50282
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->_rootClient = $rootClient;
|
||||
$this->_url = $url;
|
||||
if ( isset($options) )
|
||||
{
|
||||
if ( isset($options['namespace']) )
|
||||
{
|
||||
$this->_namespace = $options['namespace'];
|
||||
unset( $options['namespace'] );
|
||||
}
|
||||
$this->_outputOptions = $options;
|
||||
}
|
||||
if ( isset($transport) ) {
|
||||
$this->_transport = $transport;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method catches any native method called on the client and calls it on the rpc server instead. It automatically
|
||||
* parses the resulting xml and returns native php type results.
|
||||
* @throws Ripcord_InvalidArgumentException (ripcord::notRipcordCall) when handling a multiCall and the
|
||||
* arguments passed do not have the correct method call information
|
||||
* @throws Ripcord_RemoteException when _throwExceptions is true and the server returns an XML-RPC Fault.
|
||||
*/
|
||||
public function __call($name, $args)
|
||||
{
|
||||
if ( isset($this->_namespace) )
|
||||
{
|
||||
$name = $this->_namespace . '.' . $name;
|
||||
}
|
||||
|
||||
if ( $name === 'system.multiCall' || $name == 'system.multicall' )
|
||||
{
|
||||
if ( !$args || ( is_array($args) && count($args)==0 ) )
|
||||
{
|
||||
// multiCall is called without arguments, so return the fetch interface object
|
||||
return new Ripcord_Client_MultiCall( $this->_rootClient, $name );
|
||||
} else if ( is_array( $args ) && (count( $args ) == 1) &&
|
||||
is_array( $args[0] ) && !isset( $args[0]['methodName'] ) )
|
||||
{
|
||||
// multicall is called with a simple array of calls.
|
||||
$args = $args[0];
|
||||
}
|
||||
$this->_rootClient->_multiCall = false;
|
||||
$params = array();
|
||||
$bound = array();
|
||||
foreach ( $args as $key => $arg )
|
||||
{
|
||||
if ( !is_a( $arg, 'Ripcord_Client_Call' ) &&
|
||||
(!is_array($arg) || !isset($arg['methodName']) ) )
|
||||
{
|
||||
throw new Ripcord_InvalidArgumentException(
|
||||
'Argument '.$key.' is not a valid Ripcord call',
|
||||
ripcord::notRipcordCall);
|
||||
}
|
||||
if ( is_a( $arg, 'Ripcord_Client_Call' ) )
|
||||
{
|
||||
$arg->index = count( $params );
|
||||
$params[] = $arg->encode();
|
||||
}
|
||||
else
|
||||
{
|
||||
$arg['index'] = count( $params );
|
||||
$params[] = array(
|
||||
'methodName' => $arg['methodName'],
|
||||
'params' => isset($arg['params']) ?
|
||||
(array) $arg['params'] : array()
|
||||
);
|
||||
}
|
||||
$bound[$key] = $arg;
|
||||
}
|
||||
$args = array( $params );
|
||||
$this->_rootClient->_multiCallArgs = array();
|
||||
}
|
||||
if ( $this->_rootClient->_multiCall ) {
|
||||
$call = new Ripcord_Client_Call( $name, $args );
|
||||
$this->_rootClient->_multiCallArgs[] = $call;
|
||||
return $call;
|
||||
}
|
||||
if ($this->_rootClient->_cloneObjects) { //workaround for php bug 50282
|
||||
foreach( $args as $key => $arg) {
|
||||
if (is_object($arg)) {
|
||||
$args[$key] = clone $arg;
|
||||
}
|
||||
}
|
||||
}
|
||||
$request = xmlrpc_encode_request( $name, $args, $this->_outputOptions );
|
||||
$response = $this->_transport->post( $this->_url, $request );
|
||||
$result = xmlrpc_decode( $response );
|
||||
$this->_rootClient->_request = $request;
|
||||
$this->_rootClient->_response = $response;
|
||||
if ( ripcord::isFault( $result ) && $this->_throwExceptions )
|
||||
{
|
||||
throw new Ripcord_RemoteException($result['faultString'], $result['faultCode']);
|
||||
}
|
||||
if ( isset($bound) && is_array( $bound ) )
|
||||
{
|
||||
foreach ( $bound as $key => $callObject )
|
||||
{
|
||||
if ( is_a( $callObject, 'Ripcord_Client_Call' ) )
|
||||
{
|
||||
$returnValue = $result[$callObject->index];
|
||||
}
|
||||
else
|
||||
{
|
||||
$returnValue = $result[$callObject['index']];
|
||||
}
|
||||
if ( is_array( $returnValue ) && count( $returnValue ) == 1 )
|
||||
{
|
||||
// XML-RPC specification says that non-fault results must be in a single item array
|
||||
$returnValue = current($returnValue);
|
||||
}
|
||||
if ($this->_autoDecode)
|
||||
{
|
||||
$type = xmlrpc_get_type($returnValue);
|
||||
switch ($type)
|
||||
{
|
||||
case 'base64' :
|
||||
$returnValue = ripcord::binary($returnValue);
|
||||
break;
|
||||
case 'datetime' :
|
||||
$returnValue = ripcord::timestamp($returnValue);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( is_a( $callObject, 'Ripcord_Client_Call' ) ) {
|
||||
$callObject->bound = $returnValue;
|
||||
}
|
||||
$bound[$key] = $returnValue;
|
||||
}
|
||||
$result = $bound;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method catches any reference to properties of the client and uses them as a namespace. The
|
||||
* property is automatically created as a new instance of the rpc client, with the name of the property
|
||||
* as a namespace.
|
||||
* @param string $name The name of the namespace
|
||||
* @return object A Ripcord Client with the given namespace set.
|
||||
*/
|
||||
public function __get($name)
|
||||
{
|
||||
$result = null;
|
||||
if ( !isset($this->{$name}) )
|
||||
{
|
||||
$result = new Ripcord_Client(
|
||||
$this->_url,
|
||||
array_merge($this->_outputOptions, array(
|
||||
'namespace' => $this->_namespace ?
|
||||
$this->_namespace . '.' . $name : $name
|
||||
) ),
|
||||
$this->_transport,
|
||||
$this->_rootClient
|
||||
);
|
||||
$this->{$name} = $result;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This class provides the fetch interface for system.multiCall. It is returned
|
||||
* when calling $client->system->multiCall() with no arguments. Upon construction
|
||||
* it puts the originating client into multiCall deferred mode. The client will
|
||||
* gather the requested method calls instead of executing them immediately. It
|
||||
* will them execute all of them, in order, when calling
|
||||
* $client->system->multiCall()->fetch().
|
||||
* This class extends Ripcord_Client only so it has access to its protected _multiCall
|
||||
* property.
|
||||
*/
|
||||
class Ripcord_Client_MultiCall extends Ripcord_Client
|
||||
{
|
||||
|
||||
/*
|
||||
* The reference to the originating client to put into multiCall mode.
|
||||
*/
|
||||
private $client = null;
|
||||
|
||||
/*
|
||||
* This method creates a new multiCall fetch api object.
|
||||
*/
|
||||
public function __construct( $client, $methodName = 'system.multiCall' )
|
||||
{
|
||||
$this->client = $client;
|
||||
$this->methodName = $methodName;
|
||||
}
|
||||
|
||||
/*
|
||||
* This method puts the client into multiCall mode. While in this mode all
|
||||
* method calls are collected as deferred calls (Ripcord_Client_Call).
|
||||
*/
|
||||
public function start()
|
||||
{
|
||||
$this->client->_multiCall = true;
|
||||
}
|
||||
|
||||
/*
|
||||
* This method finally calls the clients multiCall method with all deferred
|
||||
* method calls since multiCall mode was enabled.
|
||||
*/
|
||||
public function execute()
|
||||
{
|
||||
if ($this->methodName=='system.multiCall') {
|
||||
return $this->client->system->multiCall( $this->client->_multiCallArgs );
|
||||
} else { // system.multicall
|
||||
return $this->client->system->multicall( $this->client->_multiCallArgs );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This class is used with the Ripcord_Client when calling system.multiCall. Instead of immediately calling the method on the rpc server,
|
||||
* a Ripcord_Client_Call object is created with all the information needed to call the method using the multicall parameters. The call object is
|
||||
* returned immediately and is used as input parameter for the multiCall call. The result of the call can be bound to a php variable. This
|
||||
* variable will be filled with the result of the call when it is available.
|
||||
* @package Ripcord
|
||||
*/
|
||||
class Ripcord_Client_Call
|
||||
{
|
||||
/**
|
||||
* The method to call on the rpc server
|
||||
*/
|
||||
public $method = null;
|
||||
|
||||
/**
|
||||
* The arguments to pass on to the method.
|
||||
*/
|
||||
public $params = array();
|
||||
|
||||
/**
|
||||
* The index in the multicall request array, if any.
|
||||
*/
|
||||
public $index = null;
|
||||
|
||||
/**
|
||||
* A reference to the php variable to fill with the result of the call, if any.
|
||||
*/
|
||||
public $bound = null;
|
||||
|
||||
/**
|
||||
* The constructor for the Ripcord_Client_Call class.
|
||||
* @param string $method The name of the rpc method to call
|
||||
* @param array $params The parameters for the rpc method.
|
||||
*/
|
||||
public function __construct($method, $params)
|
||||
{
|
||||
$this->method = $method;
|
||||
$this->params = $params;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method allows you to bind a php variable to the result of this method call.
|
||||
* When the method call's result is available, the php variable will be filled with
|
||||
* this result.
|
||||
* @param mixed $bound The variable to bind the result from this call to.
|
||||
* @return object Returns this object for chaining.
|
||||
*/
|
||||
public function bind(&$bound)
|
||||
{
|
||||
$this->bound =& $bound;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns the correct format for a multiCall argument.
|
||||
* @return array An array with the methodName and params
|
||||
*/
|
||||
public function encode() {
|
||||
return array(
|
||||
'methodName' => $this->method,
|
||||
'params' => (array) $this->params
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This interface describes the minimum interface needed for the transport object used by the
|
||||
* Ripcord_Client
|
||||
* @package Ripcord
|
||||
*/
|
||||
interface Ripcord_Transport
|
||||
{
|
||||
/**
|
||||
* This method must post the request to the given url and return the results.
|
||||
* @param string $url The url to post to.
|
||||
* @param string $request The request to post.
|
||||
* @return string The server response
|
||||
*/
|
||||
public function post( $url, $request );
|
||||
}
|
||||
|
||||
/**
|
||||
* This class implements the Ripcord_Transport interface using PHP streams.
|
||||
* @package Ripcord
|
||||
*/
|
||||
class Ripcord_Transport_Stream implements Ripcord_Transport
|
||||
{
|
||||
/**
|
||||
* A list of stream context options.
|
||||
*/
|
||||
private $options = array();
|
||||
|
||||
/**
|
||||
* Contains the headers sent by the server.
|
||||
*/
|
||||
public $responseHeaders = null;
|
||||
|
||||
/**
|
||||
* This is the constructor for the Ripcord_Transport_Stream class.
|
||||
* @param array $contextOptions Optional. An array with stream context options.
|
||||
*/
|
||||
public function __construct( $contextOptions = null )
|
||||
{
|
||||
if ( isset($contextOptions) )
|
||||
{
|
||||
$this->options = $contextOptions;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method posts the request to the given url.
|
||||
* @param string $url The url to post to.
|
||||
* @param string $request The request to post.
|
||||
* @return string The server response
|
||||
* @throws Ripcord_TransportException (ripcord::cannotAccessURL) when the given URL cannot be accessed for any reason.
|
||||
*/
|
||||
public function post( $url, $request )
|
||||
{
|
||||
$options = array_merge(
|
||||
$this->options,
|
||||
array(
|
||||
'http' => array(
|
||||
'method' => "POST",
|
||||
'header' => "Content-Type: text/xml",
|
||||
'content' => $request
|
||||
)
|
||||
)
|
||||
);
|
||||
$context = stream_context_create( $options );
|
||||
$result = @file_get_contents( $url, false, $context );
|
||||
$this->responseHeaders = $http_response_header;
|
||||
if ( !$result )
|
||||
{
|
||||
throw new Ripcord_TransportException( 'Could not access ' . $url,
|
||||
ripcord::cannotAccessURL );
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This class implements the Ripcord_Transport interface using CURL.
|
||||
* @package Ripcord
|
||||
*/
|
||||
class Ripcord_Transport_CURL implements Ripcord_Transport
|
||||
{
|
||||
/**
|
||||
* A list of CURL options.
|
||||
*/
|
||||
private $options = array();
|
||||
|
||||
/**
|
||||
* A flag that indicates whether or not we can safely pass the previous exception to a new exception.
|
||||
*/
|
||||
private $skipPreviousException = false;
|
||||
|
||||
/**
|
||||
* Contains the headers sent by the server.
|
||||
*/
|
||||
public $responseHeaders = null;
|
||||
|
||||
/**
|
||||
* This is the constructor for the Ripcord_Transport_CURL class.
|
||||
* @param array $curlOptions A list of CURL options.
|
||||
*/
|
||||
public function __construct( $curlOptions = null )
|
||||
{
|
||||
if ( isset($curlOptions) )
|
||||
{
|
||||
$this->options = $curlOptions;
|
||||
}
|
||||
$version = explode('.', phpversion() );
|
||||
if ( ( (0 + $version[0]) == 5) && ( 0 + $version[1]) < 3 ) { // previousException supported in php >= 5.3
|
||||
$this->_skipPreviousException = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method posts the request to the given url
|
||||
* @param string $url The url to post to.
|
||||
* @param string $request The request to post.
|
||||
* @throws Ripcord_TransportException (ripcord::cannotAccessURL) when the given URL cannot be accessed for any reason.
|
||||
* @return string The server response
|
||||
*/
|
||||
public function post( $url, $request)
|
||||
{
|
||||
$curl = curl_init();
|
||||
$options = (array) $this->options + array(
|
||||
CURLOPT_RETURNTRANSFER => 1,
|
||||
CURLOPT_URL => $url,
|
||||
CURLOPT_POST => true,
|
||||
CURLOPT_POSTFIELDS => $request,
|
||||
CURLOPT_HEADER => true
|
||||
);
|
||||
curl_setopt_array( $curl, $options );
|
||||
$contents = curl_exec( $curl );
|
||||
$headerSize = curl_getinfo( $curl, CURLINFO_HEADER_SIZE );
|
||||
$this->responseHeaders = substr( $contents, 0, $headerSize );
|
||||
$contents = substr( $contents, $headerSize );
|
||||
|
||||
if ( curl_errno( $curl ) )
|
||||
{
|
||||
$errorNumber = curl_errno( $curl );
|
||||
$errorMessage = curl_error( $curl );
|
||||
curl_close( $curl );
|
||||
$version = explode('.', phpversion() );
|
||||
if (!$this->_skipPreviousException) { // previousException supported in php >= 5.3
|
||||
$exception = new Ripcord_TransportException( 'Could not access ' . $url
|
||||
, ripcord::cannotAccessURL
|
||||
, new Exception( $errorMessage, $errorNumber )
|
||||
);
|
||||
} else {
|
||||
$exception = new Ripcord_TransportException( 'Could not access ' . $url
|
||||
. ' ( original CURL error: ' . $errorMessage . ' ) ',
|
||||
ripcord::cannotAccessURL
|
||||
);
|
||||
}
|
||||
throw $exception;
|
||||
}
|
||||
curl_close($curl);
|
||||
return $contents;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
602
erp/ripcord/ripcord_documentor.php
Normal file
602
erp/ripcord/ripcord_documentor.php
Normal file
@ -0,0 +1,602 @@
|
||||
<?php
|
||||
/**
|
||||
* Ripcord is an easy to use XML-RPC library for PHP.
|
||||
* @package Ripcord
|
||||
* @author Auke van Slooten <auke@muze.nl>
|
||||
* @copyright Copyright (C) 2010, Muze <www.muze.nl>
|
||||
* @license http://opensource.org/licenses/gpl-3.0.html GNU Public License
|
||||
* @version Ripcord 0.9 - PHP 5
|
||||
*/
|
||||
|
||||
/**
|
||||
* This interface defines the minimum methods any documentor needs to implement.
|
||||
* @package Ripcord
|
||||
*/
|
||||
interface Ripcord_Documentor_Interface
|
||||
{
|
||||
public function setMethodData( $methods );
|
||||
public function handle( $rpcServer );
|
||||
public function getIntrospectionXML();
|
||||
}
|
||||
|
||||
/**
|
||||
* This class implements the default documentor for the ripcord server. Any request to the server
|
||||
* without a request_xml is handled by the documentor.
|
||||
* @package Ripcord
|
||||
*/
|
||||
class Ripcord_Documentor implements Ripcord_Documentor_Interface
|
||||
{
|
||||
/**
|
||||
* The object to parse the docComments.
|
||||
*/
|
||||
private $docCommentParser = null;
|
||||
|
||||
/**
|
||||
* The name of the rpc server, used as the title and heading of the default HTML page.
|
||||
*/
|
||||
public $name = 'Ripcord: Simple RPC Server';
|
||||
|
||||
/**
|
||||
* A url to an optional css file or a css string for an inline stylesheet.
|
||||
*/
|
||||
public $css = "
|
||||
html {
|
||||
font-family: georgia, times, serif;
|
||||
font-size: 79%;
|
||||
background-color: #EEEEEE;
|
||||
}
|
||||
h1 {
|
||||
font-family: 'arial black', helvetica, sans-serif;
|
||||
font-size: 2em;
|
||||
font-weight: normal;
|
||||
margin: -20px -21px 0.4em -20px;
|
||||
padding: 40px 20px 20px;
|
||||
background: #01648E; /* for non-css3 browsers */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00486E', endColorstr='#09799E'); /* for IE */
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#00486E), to(#09799E)); /* for webkit browsers */
|
||||
background: -moz-linear-gradient(top, #00486E, #09799E); /* for firefox 3.6+ */
|
||||
color: white;
|
||||
border-bottom: 4px solid black;
|
||||
text-shadow: black 0.1em 0.1em 0.2em;
|
||||
}
|
||||
h2 {
|
||||
font-family: arial, helvetica, sans-serif;
|
||||
font-weight: bold;
|
||||
font-size: 1.4em;
|
||||
color: #444444;
|
||||
text-shadow: #AAAAAA 0.1em 0.1em 0.2em;
|
||||
margin-top: 2.5em;
|
||||
border-bottom: 1px solid #09799E;
|
||||
}
|
||||
h3 {
|
||||
font-family: arial, helvetica, sans-serif;
|
||||
font-weight: normal;
|
||||
font-size: 1.4em;
|
||||
color: #555555;
|
||||
text-shadow: #AAAAAA 0.1em 0.1em 0.2em;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
div.signature {
|
||||
font-family: courier, monospace;
|
||||
margin-bottom: 1.4em;
|
||||
}
|
||||
ul, ol, li {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
ul, ol {
|
||||
color: #09799E;
|
||||
margin-bottom: 1.4em;
|
||||
}
|
||||
ul li {
|
||||
list-style: square;
|
||||
}
|
||||
ul li, ol li {
|
||||
margin-left: 20px;
|
||||
}
|
||||
li span, li label {
|
||||
color: black;
|
||||
}
|
||||
li.param label {
|
||||
font-family: courier, monospace;
|
||||
padding-right: 1.4em;
|
||||
}
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
body {
|
||||
background-color: white;
|
||||
width: 830px;
|
||||
margin: 10px auto;
|
||||
padding: 20px;
|
||||
-moz-box-shadow: 5px 5px 5px #ccc;
|
||||
-webkit-box-shadow: 5px 5px 5px #ccc;
|
||||
box-shadow: 5px 5px 5px #ccc;
|
||||
}
|
||||
code {
|
||||
display: block;
|
||||
background-color: #999999;
|
||||
padding: 10px;
|
||||
margin: 0.4em 0px 1.4em 0px;
|
||||
color: white;
|
||||
white-space: pre;
|
||||
font-family: courier, monospace;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
.tag, .argName, .argType {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.argument {
|
||||
margin-left: 20px;
|
||||
}
|
||||
.footer {
|
||||
font-family: helvetica, sans-serif;
|
||||
font-size: 0.9em;
|
||||
font-weight: normal;
|
||||
margin: 0px -21px -20px -20px;
|
||||
padding: 20px;
|
||||
background: #01648E; /* for non-css3 browsers */
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00486E', endColorstr='#09799E'); /* for IE */
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#00486E), to(#09799E)); /* for webkit browsers */
|
||||
background: -moz-linear-gradient(top, #00486E, #09799E); /* for firefox 3.6+ */
|
||||
color: white;
|
||||
}
|
||||
.footer a {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
";
|
||||
|
||||
/**
|
||||
* The wsdl 1.0 description.
|
||||
*/
|
||||
public $wsdl = false;
|
||||
|
||||
/**
|
||||
* The wsdl 2.0 description
|
||||
*/
|
||||
public $wsdl2 = false;
|
||||
|
||||
/**
|
||||
* Which version of the XML vocabulary the server implements. Either 'xmlrpc', 'soap 1.1', 'simple' or 'auto'.
|
||||
*/
|
||||
public $version = 'auto';
|
||||
|
||||
/**
|
||||
* The root URL of the rpc server.
|
||||
*/
|
||||
public $root = '';
|
||||
|
||||
/**
|
||||
* Optional header text for the online documentation.
|
||||
*/
|
||||
public $header = '';
|
||||
|
||||
/**
|
||||
* Optional footer text for the online documentation.
|
||||
*/
|
||||
public $footer = '';
|
||||
|
||||
/**
|
||||
* A list of method data, containing all the user supplied methods the rpc server implements.
|
||||
*/
|
||||
private $methods = null;
|
||||
|
||||
/**
|
||||
* The constructor for the Ripcord_Documentor class.
|
||||
* @param array $options. Optional. Allows you to set the public properties of this class upon construction.
|
||||
*/
|
||||
public function __construct( $options = null, $docCommentParser = null )
|
||||
{
|
||||
$check = array( 'name', 'css', 'wsdl', 'wsdl2', 'root', 'version', 'header', 'footer' );
|
||||
foreach ( $check as $name )
|
||||
{
|
||||
if ( isset($options[$name]) )
|
||||
{
|
||||
$this->{$name} = $options[$name];
|
||||
}
|
||||
}
|
||||
$this->docCommentParser = $docCommentParser;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method fills the list of method data with all the user supplied methods of the rpc server.
|
||||
* @param array $methodData A list of methods with name and callback information.
|
||||
*/
|
||||
public function setMethodData( $methodData )
|
||||
{
|
||||
$this->methods = $methodData;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method handles any request which isn't a valid rpc request.
|
||||
* @param object $rpcServer A reference to the active rpc server.
|
||||
*/
|
||||
public function handle( $rpcServer )
|
||||
{
|
||||
$methods = $rpcServer->call('system.listMethods');
|
||||
echo '<!DOCTYPE html>';
|
||||
echo '<html><head><title>' . $this->name . '</title>';
|
||||
if ( isset($this->css) )
|
||||
{
|
||||
if (strpos($this->css, "\n")!==false) {
|
||||
echo '<style type="text/css">'.$this->css.'</style>';
|
||||
} else {
|
||||
echo '<link rel="stylesheet" type="text/css" href="' . $this->css . '">';
|
||||
}
|
||||
}
|
||||
echo '</head><body>';
|
||||
echo '<div class="content">';
|
||||
echo '<h1>' . $this->name . '</h1>';
|
||||
echo $this->header;
|
||||
echo '<p>';
|
||||
$showWSDL = false;
|
||||
switch ( $this->version )
|
||||
{
|
||||
case 'xmlrpc':
|
||||
echo 'This server implements the <a href="http://www.xmlrpc.com/spec">XML-RPC specification</a>';
|
||||
break;
|
||||
case 'simple':
|
||||
echo 'This server implements the <a href="http://sites.google.com/a/simplerpc.org/simplerpc/Home/simplerpc-specification-v09">SimpleRPC 1.0 specification</a>';
|
||||
break;
|
||||
case 'auto';
|
||||
echo 'This server implements the <a href="http://www.w3.org/TR/2000/NOTE-SOAP-20000508/">SOAP 1.1</a>, <a href="http://www.xmlrpc.com/spec">XML-RPC</a> and <a href="http://sites.google.com/a/simplerpc.org/simplerpc/Home/simplerpc-specification-v09">SimpleRPC 1.0</a> specification.';
|
||||
$showWSDL = true;
|
||||
break;
|
||||
case 'soap 1.1':
|
||||
echo 'This server implements the <a href="http://www.w3.org/TR/2000/NOTE-SOAP-20000508/">SOAP 1.1 specification</a>.';
|
||||
$showWSDL = true;
|
||||
break;
|
||||
}
|
||||
echo '</p>';
|
||||
if ( $showWSDL && ( $this->wsdl || $this->wsdl2 ) )
|
||||
{
|
||||
echo '<ul>';
|
||||
if ($this->wsdl)
|
||||
{
|
||||
echo '<li><a href="' . $this->root . '?wsdl">WSDL 1.1 Description</a></li>';
|
||||
}
|
||||
if ($this->wsdl2)
|
||||
{
|
||||
echo '<li><a href="' . $this->root . '?wsdl2">WSDL 2.0 Description</a></li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
}
|
||||
|
||||
$methods = $rpcServer->call( 'system.describeMethods' );
|
||||
$allMethods = array();
|
||||
$allFunctions = array();
|
||||
foreach( $methods['methodList'] as $index => $method )
|
||||
{
|
||||
if ( strpos( $method['name'], '.' ) !== false )
|
||||
{
|
||||
$allMethods[ $method['name'] ] = $index;
|
||||
} else {
|
||||
$allFunctions[ $method['name'] ] = $index;
|
||||
}
|
||||
}
|
||||
ksort( $allMethods );
|
||||
ksort( $allFunctions );
|
||||
$allMethods = $allFunctions + $allMethods;
|
||||
|
||||
echo '<div class="index"><h2>Methods</h2><ul>';
|
||||
foreach ( $allMethods as $methodName => $methodIndex )
|
||||
{
|
||||
echo '<li><a href="#method_' . (int)$methodIndex . '">' . $methodName . '</a></li>';
|
||||
}
|
||||
echo '</ul></div>';
|
||||
|
||||
$currentClass = '';
|
||||
$class = '';
|
||||
echo '<div class="functions">';
|
||||
foreach ( $allMethods as $methodName => $methodIndex )
|
||||
{
|
||||
$method = $methods['methodList'][$methodIndex];
|
||||
$pos = strpos( $methodName, '.');
|
||||
if ( $pos !== false )
|
||||
{
|
||||
$class = substr( $methodName, 0, $pos );
|
||||
}
|
||||
if ( $currentClass != $class )
|
||||
{
|
||||
echo '</div>';
|
||||
echo '<div class="class_'.$class.'">';
|
||||
$currentClass = $class;
|
||||
}
|
||||
echo '<h2 id="method_'.$methodIndex.'">' . $method['name'] . '</h2>';
|
||||
if ( isset( $method['signatures'] ) )
|
||||
{
|
||||
|
||||
foreach ( $method['signatures'] as $signature )
|
||||
{
|
||||
echo '<div class="signature">';
|
||||
if ( is_array( $signature['returns'] ) ) {
|
||||
$return = $signature['returns'][0];
|
||||
echo '(' . $return['type'] . ') ';
|
||||
}
|
||||
echo $method['name'] . '(';
|
||||
$paramInfo = false;
|
||||
if ( is_array( $signature['params'] ) )
|
||||
{
|
||||
$paramInfo = $signature['params'];
|
||||
$params = '';
|
||||
foreach ( $signature['params'] as $param )
|
||||
{
|
||||
$params .= ', (' . $param['type'] . ') ' . $param['name'] . ' ';
|
||||
}
|
||||
echo substr($params, 1);
|
||||
}
|
||||
echo ')</div>';
|
||||
if ( is_array( $paramInfo ) )
|
||||
{
|
||||
echo '<div class="params"><h3>Parameters</h3><ul>';
|
||||
foreach ( $paramInfo as $param )
|
||||
{
|
||||
echo '<li class="param">';
|
||||
echo '<label>(' . $param['type'] . ') ' . $param['name'] . '</label> ';
|
||||
echo '<span>' . $param['description'] . '</span>';
|
||||
echo '</li>';
|
||||
}
|
||||
echo '</ul></div>';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ( $method['purpose'] )
|
||||
{
|
||||
echo '<div class="purpose">' . $method['purpose'] . '</div>';
|
||||
}
|
||||
|
||||
if ( isset( $method['notes'] ) && is_array( $method['notes'] ) )
|
||||
{
|
||||
echo '<div class="notes"><h3>Notes</h3><ol>';
|
||||
foreach ( $method['notes'] as $note )
|
||||
{
|
||||
echo '<li><span>' . $note. '</span></li>';
|
||||
}
|
||||
echo '</ol></div>';
|
||||
}
|
||||
|
||||
if ( isset( $method['see'] ) && is_array( $method['see'] ) )
|
||||
{
|
||||
echo '<div class="see">';
|
||||
echo '<h3>See</h3>';
|
||||
echo '<ul>';
|
||||
foreach ( $method['see'] as $link => $description)
|
||||
{
|
||||
echo '<li>';
|
||||
if ( isset( $allMethods[$link] ) )
|
||||
{
|
||||
echo '<a href="#method_' . (int)$allMethods[$link] .'">' . $link . '</a> <span>' . $description . '</span>';
|
||||
} else {
|
||||
echo '<span>' . $link . ' ' . $description . '</span>';
|
||||
}
|
||||
echo '</li>';
|
||||
}
|
||||
echo '</ul></div>';
|
||||
}
|
||||
|
||||
}
|
||||
echo '</div>';
|
||||
echo $this->footer;
|
||||
echo '<div class="footer">';
|
||||
echo 'Powered by <a href="http://ripcord.googlecode.com/">Ripcord : Simple RPC Server</a>.';
|
||||
echo '</div>';
|
||||
echo '</div></body></html>';
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns an XML document in the introspection format expected by
|
||||
* xmlrpc_server_register_introspection_callback. It uses the php Reflection
|
||||
* classes to gather information from the registered methods.
|
||||
* Descriptions are added from phpdoc docblocks if found.
|
||||
* @return string XML string with the introspection data.
|
||||
*/
|
||||
function getIntrospectionXML()
|
||||
{
|
||||
$xml = "<?xml version='1.0' ?><introspection version='1.0'><methodList>";
|
||||
if ( isset($this->methods) && is_array( $this->methods ) )
|
||||
{
|
||||
foreach ($this->methods as $method => $methodData )
|
||||
{
|
||||
if ( is_array( $methodData['call'] ) )
|
||||
{
|
||||
$reflection = new ReflectionMethod(
|
||||
$methodData['call'][0],
|
||||
$methodData['call'][1]
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$reflection = new ReflectionFunction( $methodData['call'] );
|
||||
}
|
||||
$description = $reflection->getDocComment();
|
||||
if ( $description && $this->docCommentParser )
|
||||
{
|
||||
$data = $this->docCommentParser->parse( $description );
|
||||
if ($data['description'])
|
||||
{
|
||||
$description = $data['description'];
|
||||
}
|
||||
}
|
||||
if ($description)
|
||||
{
|
||||
$description = '<p>' . str_replace( array( "\r\n\r\n", "\n\n") , '</p><p>', $description)
|
||||
. '</p>';
|
||||
}
|
||||
if ( is_array( $data ) )
|
||||
{
|
||||
foreach( $data as $key => $value )
|
||||
{
|
||||
switch( $key )
|
||||
{
|
||||
case 'category' :
|
||||
case 'deprecated' :
|
||||
case 'package' :
|
||||
$description .= '<div class="' . $key . '"><span class="tag">'
|
||||
. $key . '</span>' . $value .'</div>';
|
||||
break;
|
||||
|
||||
default :
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
$xml .= '<methodDescription name="' . $method . '"><purpose><![CDATA['
|
||||
. $description . ']]></purpose>';
|
||||
if ( is_array( $data ) && ( isset( $data['arguments'] ) || isset( $data['return'] ) ) )
|
||||
{
|
||||
$xml .= '<signatures><signature>';
|
||||
if ( isset( $data['arguments'] ) && is_array($data['arguments']) )
|
||||
{
|
||||
$xml .= '<params>';
|
||||
foreach ( $data['arguments'] as $name => $argument )
|
||||
{
|
||||
if ( $name[0] == '$' )
|
||||
{
|
||||
$name = substr( $name, 1 );
|
||||
}
|
||||
$xml .= '<value type="' . htmlspecialchars( $argument['type'] )
|
||||
. '" name="' . htmlspecialchars( $name ) . '"><![CDATA[' . $argument['description']
|
||||
. ']]></value>';
|
||||
}
|
||||
$xml .= '</params>';
|
||||
}
|
||||
if ( isset( $data['return'] ) && is_array( $data['return'] ) )
|
||||
{
|
||||
$xml .= '<returns><value type="' . htmlspecialchars($data['return']['type'])
|
||||
. '"><![CDATA[' . $data['return']['description'] . ']]></value></returns>';
|
||||
}
|
||||
$xml .= '</signature></signatures>';
|
||||
}
|
||||
$xml .= '</methodDescription>';
|
||||
}
|
||||
}
|
||||
$xml .= "</methodList></introspection>";
|
||||
return $xml;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This interface describes the minimum interface needed for a comment parser object used by the
|
||||
* Ripcord_Documentor
|
||||
* @package Ripcord
|
||||
*/
|
||||
interface Ripcord_Documentor_Parser
|
||||
{
|
||||
/**
|
||||
* This method parses a given docComment block and returns an array with information.
|
||||
* @param string $commentBlock The docComment block.
|
||||
* @return array The parsed information.
|
||||
*/
|
||||
public function parse( $commentBlock );
|
||||
}
|
||||
|
||||
/**
|
||||
* This class implements the Ripcord_Documentor_Parser interface, parsing the docComment
|
||||
* as a phpdoc style docComment.
|
||||
* @package Ripcord
|
||||
*/
|
||||
class Ripcord_Documentor_Parser_phpdoc implements Ripcord_Documentor_Parser
|
||||
{
|
||||
|
||||
/**
|
||||
* This method parses a given docComment block and returns an array with information.
|
||||
* @param string $commentBlock The docComment block.
|
||||
* @return array The parsed information.
|
||||
*/
|
||||
public function parse( $commentBlock)
|
||||
{
|
||||
$this->currentTag = 'description';
|
||||
$description = preg_replace('/^(\s*(\/\*\*|\*\/|\*))/m', '', $commentBlock);
|
||||
$info = array();
|
||||
$lines = explode( "\n", $description );
|
||||
foreach ( $lines as $line ) {
|
||||
$info = $this->parseLine( $line, $info );
|
||||
}
|
||||
return $info; //array( 'description' => $description );
|
||||
}
|
||||
|
||||
/**
|
||||
* This method parses a single line from the comment block.
|
||||
*/
|
||||
private function parseLine( $line, $info )
|
||||
{
|
||||
$handled = false;
|
||||
if (preg_match('/^\s*(@[a-z]+)\s(.*)$/i', $line, $matches))
|
||||
{
|
||||
$this->currentTag = substr($matches[1], 1);
|
||||
$line = trim( substr($line, strlen($this->currentTag)+2 ) );
|
||||
switch( $this->currentTag )
|
||||
{
|
||||
case 'param' :
|
||||
if ( preg_match('/^\s*([[:alpha:]|]+)\s([[:alnum:]$_]+)(.*)$/i', $line, $matches) )
|
||||
{
|
||||
if ( !isset($info['arguments']) ) {
|
||||
$info['arguments'] = array();
|
||||
}
|
||||
if ( !isset($info['arguments'][$matches[2]]) ) {
|
||||
$info['arguments'][$matches[2]] = array('description' => '');
|
||||
}
|
||||
$info['arguments'][$matches[2]]['type'] = $matches[1];
|
||||
$info['arguments'][$matches[2]]['description'] .= $this->parseDescription($matches[3]);
|
||||
}
|
||||
$handled = true;
|
||||
break;
|
||||
case 'return' :
|
||||
if ( preg_match('/^\s*([[:alpha:]|]+)\s(.*)$/i', $line, $matches) )
|
||||
{
|
||||
if ( !isset($info['return']) ) {
|
||||
$info['return'] = array( 'description' => '' );
|
||||
}
|
||||
$info['return']['type'] = $matches[1];
|
||||
$info['return']['description'] .= $this->parseDescription($matches[2]);
|
||||
}
|
||||
$handled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$handled) {
|
||||
switch( $this->currentTag) {
|
||||
case 'param' :
|
||||
case 'return' :
|
||||
if ( !isset( $info[$this->currentTag] ) ) {
|
||||
$info[$this->currentTag] = array();
|
||||
}
|
||||
$info[$this->currentTag]['description'] .= $this->parseDescription($line);
|
||||
break;
|
||||
default:
|
||||
if ( !isset( $info[$this->currentTag] ) ) {
|
||||
$info[$this->currentTag] = '';
|
||||
}
|
||||
$info[$this->currentTag] .= $this->parseDescription($line);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $info;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method parses only the text description part of a line of the comment block.
|
||||
*/
|
||||
private function parseDescription( $line ) {
|
||||
while ( preg_match('/{@([^}]*)}/', $line, $matches) ) {
|
||||
switch( $matches[1] ) {
|
||||
case 'internal' :
|
||||
$line = str_replace( $matches[0], '', $line );
|
||||
break;
|
||||
default :
|
||||
$line = str_replace( $matches[0], $matches[1], $line );
|
||||
break;
|
||||
}
|
||||
}
|
||||
$line = str_replace( array( '\@', '{@*}' ), array( '@', '*/' ), $line );
|
||||
return $line;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
417
erp/ripcord/ripcord_server.php
Normal file
417
erp/ripcord/ripcord_server.php
Normal file
@ -0,0 +1,417 @@
|
||||
<?php
|
||||
/**
|
||||
* Ripcord is an easy to use XML-RPC library for PHP.
|
||||
* @package Ripcord
|
||||
* @author Auke van Slooten <auke@muze.nl>
|
||||
* @copyright Copyright (C) 2010, Muze <www.muze.nl>
|
||||
* @license http://opensource.org/licenses/gpl-3.0.html GNU Public License
|
||||
* @version Ripcord 0.9 - PHP 5
|
||||
*/
|
||||
|
||||
/**
|
||||
* Includes the static ripcord factory class and exceptions
|
||||
*/
|
||||
require_once(dirname(__FILE__).'/ripcord.php');
|
||||
|
||||
/**
|
||||
* This class implements the Ripcord server. It is an OO wrapper around PHP's XML-RPC methods, with some added features.
|
||||
* You can create an XML-RPC (or Simple RPC or a simple SOAP 1.1) server by defining a class with public methods and passing
|
||||
* an object (or array of objects) of this class to the constructor of Ripcord_Server. Then simply call the run() method.
|
||||
*
|
||||
* A basic example:
|
||||
* <code>
|
||||
* <?php
|
||||
* $myObject = new MyClass();
|
||||
* $server = ripcord::server( $myObject );
|
||||
* $server->run();
|
||||
* ?>
|
||||
* </code>
|
||||
*
|
||||
* An example with namespaces in the method names and a static class as rpc service.
|
||||
* <code>
|
||||
* <?php
|
||||
* $myObject = new MyClass();
|
||||
* $server = ripcord::server(
|
||||
* array(
|
||||
* 'namespace1' => $myObject,
|
||||
* 'namespace2' => 'myOtherClass'
|
||||
* )
|
||||
* );
|
||||
* $server->run();
|
||||
* ?>
|
||||
* </code>
|
||||
*
|
||||
* You don't need to instantiate a class to use it with Ripcord, in the above example 'myOtherClass' is the
|
||||
* name of a PHP class to use. In addition you may also specify functions or methods directly, in any format
|
||||
* that matches PHP's is_callable() criteria.
|
||||
* @package Ripcord
|
||||
*/
|
||||
|
||||
/*
|
||||
TODO:
|
||||
- create seperate interface for encoding / decoding requests
|
||||
- create xmlrpc-epi class using xmlrpc_encode/decode for xml-rpc, simple-rpc and for now soap
|
||||
- add json-rpc class (http://json-rpc.org/wiki/specification)
|
||||
- pass list of protocol parsers/generators in the constructor of the server
|
||||
- protocol must know how to handle the system.* methods
|
||||
*/
|
||||
class Ripcord_Server
|
||||
{
|
||||
/**
|
||||
* Contains a reference to the Ripcord documentor object.
|
||||
* @see Ripcord_Documentor
|
||||
*/
|
||||
private $documentor = null;
|
||||
|
||||
/**
|
||||
* Contains a reference to the XML-RPC server created with xmlrpc_server_create.
|
||||
*/
|
||||
private $xmlrpc = null;
|
||||
|
||||
/**
|
||||
* Contains a list of methods set for this server. Excludes the system.* methods automatically
|
||||
* created by PHP's xmlrpc_server_create.
|
||||
*/
|
||||
private $methods = array();
|
||||
|
||||
/**
|
||||
* Contains an array with outputOptions, used when calling methods on the xmlrpc server created with
|
||||
* xmlrpc_server_create. These options can be overridden through the $options parameter of the
|
||||
* Ripcord_Server constructor.
|
||||
* @see Ripcord_Server::setOutputOption()
|
||||
*/
|
||||
private $outputOptions = array(
|
||||
"output_type" => "xml",
|
||||
"verbosity" => "pretty",
|
||||
"escaping" => array("markup"),
|
||||
"version" => "auto",
|
||||
"encoding" => "utf-8"
|
||||
);
|
||||
|
||||
/**
|
||||
* Creates a new instance of the Ripcord server.
|
||||
* @param mixed $services. Optional. An object or array of objects. The public methods in these objects will be exposed
|
||||
* through the RPC server. If the services array has non-numeric keys, the key for each object will define its namespace.
|
||||
* @param array $options. Optional. Allows you to override the default server settings. Accepted key names are:
|
||||
* - 'documentor': allows you to specify an alternative HTML documentor class, or if set to false, no HTML documentor.
|
||||
* - 'name' : The name of the server, used by the default HTML documentor.
|
||||
* - 'css' : An url of a css file to link to in the HTML documentation.
|
||||
* - 'wsdl' : The wsdl 1.0 description of this service (only usefull if you run the 'soap 1.1' version, or the 'auto' version
|
||||
* - 'wsdl2' : The wsdl 2.0 description of this service
|
||||
* In addition you can set any of the outputOptions for the xmlrpc server.
|
||||
* @see Ripcord_Server::setOutputOption()
|
||||
* @throws Ripcord_InvalidArgumentException (ripcord::unknownServiceType) when passed an incorrect service
|
||||
* @throws Ripcord_ConfigurationException (ripcord::xmlrpcNotInstalled) when the xmlrpc extension in not available.
|
||||
*/
|
||||
function __construct($services = null, $options = null, $documentor = null)
|
||||
{
|
||||
if ( !function_exists( 'xmlrpc_server_create' ) )
|
||||
{
|
||||
throw new Ripcord_ConfigurationException('PHP XMLRPC library is not installed',
|
||||
ripcord::xmlrpcNotInstalled );
|
||||
}
|
||||
libxml_disable_entity_loader(); // prevents XXE attacks
|
||||
$this->xmlrpc = xmlrpc_server_create();
|
||||
if (isset($services))
|
||||
{
|
||||
if (is_array($services))
|
||||
{
|
||||
foreach ($services as $serviceName => $service)
|
||||
{
|
||||
$this->addService($service, $serviceName);
|
||||
}
|
||||
} else {
|
||||
$this->addService($services);
|
||||
}
|
||||
}
|
||||
if ( isset($documentor) && is_object($documentor) ) {
|
||||
$this->documentor = $documentor;
|
||||
xmlrpc_server_register_introspection_callback( $this->xmlrpc,
|
||||
array( $this->documentor, 'getIntrospectionXML') );
|
||||
}
|
||||
if ( isset($options) )
|
||||
{
|
||||
$this->outputOptions = array_merge($this->outputOptions, $options);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows you to add a service to the server after construction.
|
||||
* @param object $service The object or class whose public methods must be added to the rpc server. May also be a function or method.
|
||||
* @param string $serviceName Optional. The namespace for the methods.
|
||||
* @throws Ripcord_InvalidArgumentException (ripcord::unknownServiceType) when passed an incorrect service
|
||||
*/
|
||||
public function addService($service, $serviceName = 0)
|
||||
{
|
||||
if ( is_object( $service ) )
|
||||
{
|
||||
$reflection = new ReflectionObject( $service );
|
||||
}
|
||||
else if ( is_string( $service ) && class_exists( $service ) )
|
||||
{
|
||||
$reflection = new ReflectionClass( $service );
|
||||
}
|
||||
else if ( is_callable( $service ) ) // method passed directly
|
||||
{
|
||||
$this->addMethod( $serviceName, $service );
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Ripcord_InvalidArgumentException( 'Unknown service type ' . $serviceName,
|
||||
ripcord::unknownServiceType );
|
||||
}
|
||||
if ( $serviceName && !is_numeric( $serviceName ) )
|
||||
{
|
||||
$serviceName .= '.';
|
||||
}
|
||||
else
|
||||
{
|
||||
$serviceName = '';
|
||||
}
|
||||
$methods = $reflection->getMethods();
|
||||
if ( is_array( $methods ) )
|
||||
{
|
||||
foreach( $methods as $method )
|
||||
{
|
||||
if ( substr( $method->name, 0, 1 ) != '_'
|
||||
&& !$method->isPrivate() && !$method->isProtected())
|
||||
{
|
||||
$rpcMethodName = $serviceName . $method->name;
|
||||
$this->addMethod(
|
||||
$rpcMethodName,
|
||||
array( $service, $method->name )
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows you to add a single method to the server after construction.
|
||||
* @param string $name The name of the method as exposed through the rpc server
|
||||
* @param callback $method The name of the method to call, or an array with classname or object and method name.
|
||||
*/
|
||||
public function addMethod($name, $method)
|
||||
{
|
||||
$this->methods[$name] = array(
|
||||
'name' => $name,
|
||||
'call' => $method
|
||||
);
|
||||
xmlrpc_server_register_method( $this->xmlrpc, $name, array( $this, 'call' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the rpc server. Automatically handles an incoming request.
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
if ($this->documentor) {
|
||||
$this->documentor->setMethodData( $this->methods );
|
||||
}
|
||||
$request_xml = file_get_contents( 'php://input' );
|
||||
if ( !$request_xml )
|
||||
{
|
||||
if ( ( $query = $_SERVER['QUERY_STRING'] )
|
||||
&& isset($this->wsdl[$query]) && $this->wsdl[$query] )
|
||||
{
|
||||
header('Content-type: text/xml');
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
$wsdl = $this->wsdl[$query];
|
||||
header('Content-Length: '.strlen($wsdl) );
|
||||
echo $wsdl;
|
||||
}
|
||||
else if ( $this->documentor )
|
||||
{
|
||||
header('Content-type: text/html; charset=' . $this->outputOptions['encoding']);
|
||||
$this->documentor->handle( $this, $this->methods );
|
||||
}
|
||||
else
|
||||
{
|
||||
// FIXME: add check for json-rpc protocol, if set and none of the xml protocols are set, use that
|
||||
header('Content-type: text/xml');
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
$result = xmlrpc_encode_request(
|
||||
null,
|
||||
ripcord::fault( -1, 'No request xml found.' ),
|
||||
$this->outputOptions
|
||||
);
|
||||
header('Content-Length: '.strlen( $result ) );
|
||||
echo $result;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// FIXME: add check for the protocol of the request, could be json-rpc, then check if it is supported.
|
||||
header('Content-type: text/xml');
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
$result = $this->handle( $request_xml );
|
||||
header('Content-Length: '.strlen($result) );
|
||||
echo $result;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method wraps around xmlrpc_decode_request, since it is borken in many ways. This wraps
|
||||
* around all the ugliness needed to make it not dump core and not print expat warnings.
|
||||
*/
|
||||
private function parseRequest( $request_xml ) {
|
||||
$xml = @simplexml_load_string($request_xml);
|
||||
if (!$xml && !$xml->getNamespaces()) {
|
||||
// FIXME: check for protocol json-rpc
|
||||
//simplexml in combination with namespaces (soap) lets $xml evaluate to false
|
||||
return xmlrpc_encode_request(
|
||||
null,
|
||||
ripcord::fault( -3, 'Invalid Method Call - Ripcord Server accepts only XML-RPC, SimpleRPC or SOAP 1.1 calls'),
|
||||
$this->outputOptions
|
||||
);
|
||||
} else {
|
||||
// prevent segmentation fault on incorrect xmlrpc request (without methodName)
|
||||
$methodCall = $xml->xpath('//methodCall');
|
||||
if ($methodCall) { //xml-rpc
|
||||
$methodName = $xml->xpath('//methodName');
|
||||
if (!$methodName) {
|
||||
return xmlrpc_encode_request(
|
||||
null,
|
||||
ripcord::fault( -3, 'Invalid Method Call - No methodName given'),
|
||||
$this->outputOptions
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
$method = null;
|
||||
ob_start(); // xmlrpc_decode echo expat errors if the xml is not valid, can't stop it.
|
||||
$params = xmlrpc_decode_request($request_xml, $method);
|
||||
ob_end_clean(); // clean up any xml errors
|
||||
return array( 'methodName' => $method, 'params' => $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* This method implements the system.multiCall method without dumping core. The built-in method from the
|
||||
* xmlrpc library dumps core when you have registered any php methods, fixed in php 5.3.2
|
||||
*/
|
||||
private function multiCall( $params = null ) {
|
||||
if ( $params && is_array( $params ) )
|
||||
{
|
||||
$result = array();
|
||||
$params = $params[0];
|
||||
foreach ( $params as $param ) {
|
||||
$method = $param['methodName'];
|
||||
$args = $param['params'];
|
||||
try {
|
||||
// XML-RPC specification says that non-fault results must be in a single item array
|
||||
$result[] = array( $this->call($method, $args) );
|
||||
} catch( Exception $e) {
|
||||
$result[] = ripcord::fault( $e->getCode(), $e->getMessage() );
|
||||
}
|
||||
}
|
||||
$result = xmlrpc_encode_request( null, $result, $this->outputOptions );
|
||||
} else {
|
||||
$result = xmlrpc_encode_request(
|
||||
null,
|
||||
ripcord::fault( -2, 'Illegal or no params set for system.multiCall'),
|
||||
$this->outputOptions
|
||||
);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the given request xml
|
||||
* @param string $request_xml The incoming request.
|
||||
* @return string
|
||||
*/
|
||||
public function handle($request_xml)
|
||||
{
|
||||
$result = $this->parseRequest( $request_xml );
|
||||
if (!$result || ripcord::isFault( $result ) )
|
||||
{
|
||||
return $result;
|
||||
}
|
||||
else
|
||||
{
|
||||
$method = $result['methodName'];
|
||||
$params = $result['params'];
|
||||
}
|
||||
if ( $method == 'system.multiCall' || $method == 'system.multicall' ) {
|
||||
// php's xml-rpc server (xmlrpc-epi) crashes on multicall, so handle it ourselves... fixed in php 5.3.2
|
||||
$result = $this->multiCall( $params );
|
||||
} else {
|
||||
try {
|
||||
$result = xmlrpc_server_call_method(
|
||||
$this->xmlrpc, $request_xml, null, $this->outputOptions
|
||||
);
|
||||
} catch( Exception $e) {
|
||||
$result = xmlrpc_encode_request(
|
||||
null,
|
||||
ripcord::fault( $e->getCode(), $e->getMessage() ),
|
||||
$this->outputOptions
|
||||
);
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls a method by its rpc name.
|
||||
* @param string $method The rpc name of the method
|
||||
* @param array $args The arguments to this method
|
||||
* @return mixed
|
||||
* @throws Ripcord_InvalidArgumentException (ripcord::cannotRecurse) when passed a recursive multiCall
|
||||
* @throws Ripcord_BadMethodCallException (ripcord::methodNotFound) when the requested method isn't available.
|
||||
*/
|
||||
public function call( $method, $args = null )
|
||||
{
|
||||
if ( isset( $this->methods[$method] ) )
|
||||
{
|
||||
$call = $this->methods[$method]['call'];
|
||||
return call_user_func_array( $call, $args);
|
||||
} else {
|
||||
if ( substr( $method, 0, 7 ) == 'system.' )
|
||||
{
|
||||
if ( $method == 'system.multiCall' ) {
|
||||
throw new Ripcord_InvalidArgumentException(
|
||||
'Cannot recurse system.multiCall', ripcord::cannotRecurse );
|
||||
}
|
||||
// system methods are handled internally by the xmlrpc server, so we've got to create a makebelieve request,
|
||||
// there is no other way because of a badly designed API
|
||||
$req = xmlrpc_encode_request( $method, $args, $this->outputOptions );
|
||||
$result = xmlrpc_server_call_method( $this->xmlrpc, $req, null,
|
||||
$this->outputOptions);
|
||||
return xmlrpc_decode( $result );
|
||||
} else {
|
||||
throw new Ripcord_BadMethodCallException( 'Method '.$method.' not found.',
|
||||
ripcord::methodNotFound );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows you to set specific output options of the server after construction.
|
||||
* @param string $option The name of the option
|
||||
* @param mixed $value The value of the option
|
||||
* The options are:
|
||||
* - output_type: Return data as either php native data or xml encoded. Can be either 'php' or 'xml'. 'xml' is the default.
|
||||
* - verbosity: Determines the compactness of generated xml. Can be either 'no_white_space', 'newlines_only' or 'pretty'.
|
||||
* 'pretty' is the default.
|
||||
* - escaping: Determines how/whether to escape certain characters. 1 or more values are allowed. If multiple, they need
|
||||
* to be specified as a sub-array. Options are: 'cdata', 'non-ascii', 'non-print' and 'markup'. Default is 'non-ascii',
|
||||
* 'non-print' and 'markup'.
|
||||
* - version: Version of the xml vocabulary to use. Currently, three are supported: 'xmlrpc', 'soap 1.1' and 'simple'. The
|
||||
* keyword 'auto' is also recognized and tells the server to respond in whichever version the request cam in. 'auto' is
|
||||
* the default.
|
||||
* - encoding: The character encoding that the data is in. Can be any supported character encoding. Default is 'utf-8'.
|
||||
*/
|
||||
public function setOutputOption($option, $value)
|
||||
{
|
||||
if ( isset($this->outputOptions[$option]) )
|
||||
{
|
||||
$this->outputOptions[$option] = $value;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
11
modules/prestaerp/Readme.md
Normal file
11
modules/prestaerp/Readme.md
Normal file
@ -0,0 +1,11 @@
|
||||
# Prestashop Odoo Bridge(POB)
|
||||
|
||||
## About
|
||||
|
||||
Module provides Bi-Directional sync between Odoo and Prestahsop
|
||||
|
||||
### Process in details
|
||||
|
||||
For installation and usage process visit http://webkul.com/blog/prestashop-openerp-bridge-2/
|
||||
|
||||
In case of any issue or doubt raise a ticket at http://webkul.com/ticket
|
213
modules/prestaerp/classes/ErpCarrier.php
Normal file
213
modules/prestaerp/classes/ErpCarrier.php
Normal file
@ -0,0 +1,213 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class ErpCarrier extends ObjectModel{
|
||||
|
||||
public $erp_carrier_id;
|
||||
public $prestashop_carrier_id;
|
||||
public $name ;
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'erp_carrier_merge',
|
||||
'primary' => 'id',
|
||||
'fields' => array(
|
||||
'erp_carrier_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'prestashop_carrier_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'name' => array('type' => self::TYPE_STRING, 'required' => true, 'size' => 64),
|
||||
),
|
||||
);
|
||||
|
||||
public function carrier_details($id){
|
||||
$carrier_info = Db::getInstance()->getRow("SELECT * from `" . _DB_PREFIX_ . "erp_carrier_merge` where `id`=" . $id . "");
|
||||
if ($carrier_info)
|
||||
return $carrier_info;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function check_carrier($id_carrier){
|
||||
$check_erp_id = Db::getInstance()->getRow("SELECT `is_synch`,`erp_carrier_id` from `" . _DB_PREFIX_ . "erp_carrier_merge` where `prestashop_carrier_id`=" . $id_carrier . "");
|
||||
if ($check_erp_id['erp_carrier_id'] > 0) {
|
||||
if ($check_erp_id['is_synch'] == 0)
|
||||
return array(
|
||||
-1,
|
||||
$check_erp_id['erp_carrier_id']
|
||||
);
|
||||
else
|
||||
return array(
|
||||
$check_erp_id['erp_carrier_id']
|
||||
);
|
||||
} else
|
||||
return array(
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
public function create_carrier($name, $userId, $client){
|
||||
$context = array(
|
||||
'prestashop' => new xmlrpcval('prestashop', "string")
|
||||
);
|
||||
$key = array(
|
||||
'name' => new xmlrpcval(str_replace('+', ' ',urlencode($name)), "string"),
|
||||
);
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("delivery.carrier", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("create", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($key, "struct"));
|
||||
$msg_ser->addParam(new xmlrpcval($context, "struct"));
|
||||
$resp = $client->send($msg_ser);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$log = new pob_log();
|
||||
$log->logMessage(__FILE__,__LINE__,$resp->raw_data,"CRITICAL");
|
||||
return array(
|
||||
'error_message' => $error_message,
|
||||
'erp_id' => -1
|
||||
);
|
||||
}
|
||||
else{
|
||||
$val = $resp->value()->me;
|
||||
$erp_id = $val['int'];
|
||||
return array(
|
||||
'erp_id' => $erp_id
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function addto_carrier_merge($carrier_id, $erp_carrier_id, $name, $presta_user = 'Front End'){
|
||||
$data = array(
|
||||
'erp_carrier_id' => $erp_carrier_id,
|
||||
'prestashop_carrier_id' => $carrier_id,
|
||||
'created_by' => $presta_user,
|
||||
'name' => $name
|
||||
);
|
||||
Db::getInstance()->insert('erp_carrier_merge', $data);
|
||||
}
|
||||
|
||||
public function update_carriers($erp_carrier_id, $id_carrier, $name, $userId, $client){
|
||||
$context = array(
|
||||
'prestashop' => new xmlrpcval('prestashop', "string")
|
||||
);
|
||||
$erp_carrier_list = array(
|
||||
new xmlrpcval($erp_carrier_id, 'int')
|
||||
);
|
||||
$key = array(
|
||||
'name' => new xmlrpcval($name, "string"),
|
||||
);
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("delivery.carrier", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("write", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($erp_carrier_list, "array"));
|
||||
$msg_ser->addParam(new xmlrpcval($key, "struct"));
|
||||
$msg_ser->addParam(new xmlrpcval($context, "struct"));
|
||||
$resp = $client->send($msg_ser);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$log = new pob_log();
|
||||
$log->logMessage(__FILE__,__LINE__,$resp->raw_data,"CRITICAL");
|
||||
|
||||
return array(
|
||||
'error_message' => $error_message,
|
||||
'value' => False
|
||||
);
|
||||
}
|
||||
else{
|
||||
Db::getInstance()->execute("UPDATE `" . _DB_PREFIX_ . "erp_carrier_merge` SET `is_synch`=1 where `prestashop_carrier_id`=" . $id_carrier . "");
|
||||
return array(
|
||||
'value' => True
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function check_all_carriers($userId, $client, $presta_user){
|
||||
$is_error = 0;
|
||||
$error_message = '';
|
||||
$ids = '';
|
||||
$check = Db::getInstance()->executeS("SELECT `id_carrier`,`name` from `" . _DB_PREFIX_ . "carrier` WHERE `id_carrier` NOT IN (SELECT `prestashop_carrier_id` FROM `" . _DB_PREFIX_ . "erp_carrier_merge` WHERE `is_synch` = 1) and `deleted`=0");
|
||||
|
||||
if (count($check) == 0) {
|
||||
return array(
|
||||
'is_error' => $is_error,
|
||||
'error_message' => $error_message,
|
||||
'value' => 0,
|
||||
'ids' => $ids
|
||||
);
|
||||
}
|
||||
foreach ($check as $data) {
|
||||
$erp_carrier_id = $this->check_carrier($data['id_carrier']);
|
||||
if ($erp_carrier_id[0] == 0) {
|
||||
$create = $this->create_carrier($data['name'], $userId, $client);
|
||||
if ($create['erp_id'] > 0)
|
||||
$this->addto_carrier_merge($data['id_carrier'], $create['erp_id'], $data['name'], $presta_user);
|
||||
else {
|
||||
$is_error = 1;
|
||||
$error_message .= $create['error_message'] . ',';
|
||||
$ids .= $data['id_carrier'] . ',';
|
||||
}
|
||||
}
|
||||
if ($erp_carrier_id[0] < 0) {
|
||||
$update = $this->update_carriers($erp_carrier_id[1], $data['id_carrier'], $data['name'], $userId, $client);
|
||||
if ($update['value'] != True) {
|
||||
$is_error = 1;
|
||||
$error_message .= $update['error_message'] . ',';
|
||||
$ids .= $data['id_carrier'] . ',';
|
||||
}
|
||||
}
|
||||
}
|
||||
return array(
|
||||
'is_error' => $is_error,
|
||||
'error_message' => $error_message,
|
||||
'value' => 1,
|
||||
'ids' => $ids
|
||||
);
|
||||
}
|
||||
|
||||
public function check_specific_carrier($carrier_id, $userId, $client){
|
||||
$erp = $this->check_carrier($carrier_id);
|
||||
$check = Db::getInstance()->getRow("SELECT `name` from `" . _DB_PREFIX_ . "carrier` where `id_carrier`=" . $carrier_id . "");
|
||||
if ($erp[0] == 0) {
|
||||
$create = $this->create_carrier($check['name'], $userId, $client);
|
||||
$this->addto_carrier_merge($carrier_id, $create['erp_id'], $check['name']);
|
||||
$erp_id=$create['erp_id'];
|
||||
}
|
||||
if ($erp[0] < 0) {
|
||||
$this->update_carriers($erp[1], $check['id_carrier'], $check['name'], $userId, $client);
|
||||
$erp_id=$erp[1];
|
||||
}
|
||||
if ($erp[0] > 0)
|
||||
$erp_id=$erp[0];
|
||||
return array('name'=>$check['name'],'erp_id'=>$erp_id);
|
||||
}
|
||||
|
||||
|
||||
}
|
1
modules/prestaerp/classes/ErpCountry.php
Normal file
1
modules/prestaerp/classes/ErpCountry.php
Normal file
@ -0,0 +1 @@
|
||||
<?php
/*
* 2007-2012 PrestaShop
* NOTICE OF LICENSE
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
* DISCLAIMER
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
* @version Release: $Revision: 14011 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class ErpCountry{
private function search_country($code, $userId, $client){
$key = array(
new xmlrpcval(array(
new xmlrpcval("code", "string"),
new xmlrpcval("=", "string"),
new xmlrpcval($code, "string")
), "array")
);
$msg_ser = new xmlrpcmsg('execute');
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
$msg_ser->addParam(new xmlrpcval($userId, "int"));
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
$msg_ser->addParam(new xmlrpcval("res.country", "string"));
$msg_ser->addParam(new xmlrpcval("search", "string"));
$msg_ser->addParam(new xmlrpcval($key, "array"));
$resp = $client->send($msg_ser);
if (!$resp->faultCode()){
$val_ser = $resp->value();
$ids = $val_ser->scalarval();
$id = $ids[0]->me;
if ($id > 0)
return $id['int'];
else
return 0;
}
else{
$log = new pob_log();
$log->logMessage(__FILE__,__LINE__,$resp->raw_data);
}
}
private function create_country($name, $code, $userId, $client){
$key = array(
'name' => new xmlrpcval($name, "string"),
'code' => new xmlrpcval($code, "string")
);
$msg_ser = new xmlrpcmsg('execute');
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
$msg_ser->addParam(new xmlrpcval($userId, "int"));
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
$msg_ser->addParam(new xmlrpcval("res.country", "string"));
$msg_ser->addParam(new xmlrpcval("create", "string"));
$msg_ser->addParam(new xmlrpcval($key, "struct"));
$resp = $client->send($msg_ser);
if (!$resp->faultCode()) {
$ct_id = $resp->value()->me;
$country_id = $ct_id["int"];
return $country_id;
}
else{
$log = new pob_log();
$log->logMessage(__FILE__,__LINE__,$resp->raw_data);
}
}
public function get_iso($id_country){
$country_iso_code = Db::getInstance()->getRow("SELECT `iso_code` from `" . _DB_PREFIX_ . "country` where `id_country`=" . $id_country . "");
return $country_iso_code['iso_code'];
}
public function get_country_name($id_country){
$country_name = Db::getInstance()->getRow("SELECT `name` from `" . _DB_PREFIX_ . "country_lang` where `id_country`=" . $id_country . " and `id_lang`=1");
return $country_name['name'];
}
public function get_country($iso_code, $name, $userId, $client){
$country_id = $this->search_country($iso_code, $userId, $client);
if ($country_id > 0) {
return $country_id;
}
else{
$country_id = $this->create_country($name, $iso_code, $userId, $client);
return $country_id;
}
}
}
?>
|
139
modules/prestaerp/classes/ErpCurrency.php
Normal file
139
modules/prestaerp/classes/ErpCurrency.php
Normal file
@ -0,0 +1,139 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class ErpCurrency extends ObjectModel{
|
||||
|
||||
public $erp_currency_id;
|
||||
public $prestashop_currency_id;
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'erp_currency_merge',
|
||||
'primary' => 'id',
|
||||
'fields' => array(
|
||||
'erp_currency_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'prestashop_currency_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
),
|
||||
);
|
||||
|
||||
public function currency_details($id){
|
||||
$currency_info = Db::getInstance()->getRow("SELECT * from `" . _DB_PREFIX_ . "erp_currency_merge` where `id`=" . $id . "");
|
||||
if ($currency_info)
|
||||
return $currency_info;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function check_currency($id_currency){
|
||||
$check = Db::getInstance()->getRow("SELECT `erp_currency_id` from `" . _DB_PREFIX_ . "erp_currency_merge` where `prestashop_currency_id`=" . $id_currency . "");
|
||||
if ($check['erp_currency_id'] > 0)
|
||||
return $check['erp_currency_id'];
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function create_currency($iso_code, $currency_name, $userId, $client){
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("force.done", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("pricelist_currency", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval('Pricelist_' . $currency_name, "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($iso_code, "string"));
|
||||
$resp = $client->send($msg_ser);
|
||||
if ($resp->faultCode()){
|
||||
$error_message = $resp->faultString();
|
||||
$log = new pob_log();
|
||||
$log->logMessage(__FILE__,__LINE__,$resp->raw_data,"CRITICAL");
|
||||
return array(
|
||||
'error_message' => $error_message,
|
||||
'erp_id' => -1
|
||||
);
|
||||
}
|
||||
else{
|
||||
$val = $resp->value()->me;
|
||||
$erp_id = $val['int'];
|
||||
return array(
|
||||
'erp_id' => $erp_id
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function addto_currency_merge($erp_currency_id, $currency_id, $presta_user = 'Front End'){
|
||||
$data = array(
|
||||
'erp_currency_id' => $erp_currency_id,
|
||||
'prestashop_currency_id' => $currency_id,
|
||||
'created_by' => $presta_user
|
||||
);
|
||||
Db::getInstance()->insert('erp_currency_merge', $data);
|
||||
}
|
||||
|
||||
public function check_all_currencies($userId, $client, $presta_user){
|
||||
$is_error = 0;
|
||||
$error_message = '';
|
||||
$ids = '';
|
||||
$data = Db::getInstance()->executeS("SELECT `id_currency`,`iso_code`,`name` from `" . _DB_PREFIX_ . "currency` WHERE `id_currency` NOT IN (SELECT `prestashop_currency_id` FROM `" . _DB_PREFIX_ . "erp_currency_merge`)");
|
||||
|
||||
if (count($data) == 0) {
|
||||
return array(
|
||||
'is_error' => $is_error,
|
||||
'error_message' => $error_message,
|
||||
'value' => 0,
|
||||
'$ids' => $ids
|
||||
);
|
||||
}
|
||||
foreach ($data as $currency) {
|
||||
$erp_currency_id = $this->check_currency($currency['id_currency']);
|
||||
if ($erp_currency_id <= 0) {
|
||||
$create = $this->create_currency($currency['iso_code'], $currency['name'], $userId, $client);
|
||||
if ($create['erp_id'] > 0)
|
||||
$this->addto_currency_merge($create['erp_id'], $currency['id_currency'], $presta_user);
|
||||
else{
|
||||
$is_error = 1;
|
||||
$error_message .= $create['error_message'] . ',';
|
||||
$ids .= $currency['id_currency'] . ',';
|
||||
}
|
||||
}
|
||||
}
|
||||
return array(
|
||||
'is_error' => $is_error,
|
||||
'error_message' => $error_message,
|
||||
'value' => 1,
|
||||
'ids' => $ids
|
||||
);
|
||||
}
|
||||
|
||||
public function check_specific_currency($currency_id, $userId, $client){
|
||||
$erp_currency_id = $this->check_currency($currency_id);
|
||||
if ($erp_currency_id > 0)
|
||||
return $erp_currency_id;
|
||||
else {
|
||||
$check = Db::getInstance()->getRow("SELECT `iso_code`,`name` from `" . _DB_PREFIX_ . "currency` where `id_currency`=" . $currency_id . "");
|
||||
$create = $this->create_currency($check['iso_code'], $check['name'], $userId, $client);
|
||||
if ($create['erp_id'] > 0)
|
||||
return $create['erp_id'];
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
211
modules/prestaerp/classes/ErpCustomer.php
Normal file
211
modules/prestaerp/classes/ErpCustomer.php
Normal file
@ -0,0 +1,211 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class ErpCustomer extends ObjectModel
|
||||
{
|
||||
public $erp_customer_id;
|
||||
public $prestashop_customer_id;
|
||||
public $created_by ;
|
||||
public $is_synch ;
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'erp_customer_merge',
|
||||
'primary' => 'id',
|
||||
'fields' => array(
|
||||
'erp_customer_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'prestashop_customer_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'created_by' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'is_synch' => array('type' => self::TYPE_BOOL),
|
||||
),
|
||||
);
|
||||
public function customer_details($id){
|
||||
$customer_info = Db::getInstance()->getRow("SELECT * from `" . _DB_PREFIX_ . "erp_customer_merge` where `id`=" . $id . "");
|
||||
if ($customer_info)
|
||||
return $customer_info;
|
||||
return false;
|
||||
}
|
||||
|
||||
public function update_customer($userId, $client, $erp_customer_id, $customer_id, $key){
|
||||
$context = array(
|
||||
'prestashop' => new xmlrpcval('prestashop', "string")
|
||||
);
|
||||
$erp_cust_id = array(
|
||||
new xmlrpcval($erp_customer_id, 'int')
|
||||
);
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("res.partner", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("write", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($erp_cust_id, "array"));
|
||||
$msg_ser->addParam(new xmlrpcval($key, "struct"));
|
||||
$msg_ser->addParam(new xmlrpcval($context, "struct"));
|
||||
$resp = $client->send($msg_ser);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$log = new pob_log();
|
||||
$log->logMessage(__FILE__,__LINE__,$resp->raw_data,"CRITICAL");
|
||||
return array(
|
||||
'error_message' => $error_message,
|
||||
'value' => False
|
||||
);
|
||||
} else {
|
||||
Db::getInstance()->execute("UPDATE `" . _DB_PREFIX_ . "erp_customer_merge` set `is_synch`=1 where `prestashop_customer_id`=" . $customer_id . "");
|
||||
return array(
|
||||
'value' => True
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function create_customer($userId, $client, $customer_id, $key, $presta_user='Front End'){
|
||||
$context = array(
|
||||
'prestashop' => new xmlrpcval('prestashop', "string"),
|
||||
'customer_id' => new xmlrpcval($customer_id, "int"),
|
||||
'address_id' => new xmlrpcval('-', "string"),
|
||||
);
|
||||
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("res.partner", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("create", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($key, "struct"));
|
||||
$msg_ser->addParam(new xmlrpcval($context, "struct"));
|
||||
$resp = $client->send($msg_ser);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$log = new pob_log();
|
||||
$log->logMessage(__FILE__,__LINE__,$resp->raw_data,"CRITICAL");
|
||||
return array(
|
||||
'error_message' => $error_message,
|
||||
'value' => False
|
||||
);
|
||||
}else{
|
||||
$erp_customer_id = $resp->value()->me['int'];
|
||||
$data = array(
|
||||
'erp_customer_id' => $erp_customer_id,
|
||||
'prestashop_customer_id' => $customer_id,
|
||||
'created_by' => $presta_user
|
||||
);
|
||||
Db::getInstance()->insert('erp_customer_merge', $data);
|
||||
return array(
|
||||
'value' => True,
|
||||
'erp_customer_id' => $erp_customer_id,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private function search_customer($customer_id){
|
||||
$check_arr = array();
|
||||
$check = Db::getInstance()->getRow("SELECT `is_synch`,`erp_customer_id` from `" . _DB_PREFIX_ . "erp_customer_merge` where `prestashop_customer_id`=" . $customer_id . "");
|
||||
if ($check['erp_customer_id'] > 0) {
|
||||
if ($check['is_synch'] == 0) {
|
||||
$check_arr[0] = -1;
|
||||
$check_arr[1] = $check['erp_customer_id'];
|
||||
return $check_arr;
|
||||
} else {
|
||||
$check_arr[0] = $check['erp_customer_id'];
|
||||
return $check_arr;
|
||||
}
|
||||
} else {
|
||||
$check_arr[0] = 0;
|
||||
return $check_arr;
|
||||
}
|
||||
}
|
||||
|
||||
public function check_all_customers($userId, $client, $presta_user){
|
||||
$is_error = 0;
|
||||
$error_message = '';
|
||||
$ids = '';
|
||||
$data = Db::getInstance()->executeS("SELECT cus.`id_customer`,cus.`firstname`,cus.`lastname`,cus.`email`, erp.`erp_customer_id`, erp.`is_synch`
|
||||
FROM `" . _DB_PREFIX_ . "customer` cus
|
||||
LEFT JOIN `"._DB_PREFIX_."erp_customer_merge` erp ON (erp.`prestashop_customer_id` = cus.`id_customer`)
|
||||
WHERE erp.`is_synch` IS NULL or erp.`is_synch` =0");
|
||||
if (count($data) == 0) {
|
||||
return array(
|
||||
'is_error' => $is_error,
|
||||
'error_message' => $error_message,
|
||||
'value' => 0,
|
||||
'ids' => $ids
|
||||
);
|
||||
}
|
||||
|
||||
foreach ($data as $customer_data) {
|
||||
$customer_data['firstname'] = urlencode($customer_data['firstname']);
|
||||
$customer_data['lastname'] = urlencode($customer_data['lastname']);
|
||||
$key = array(
|
||||
'name' => new xmlrpcval($customer_data['firstname'] .' '. $customer_data['lastname'], "string"),
|
||||
'email' => new xmlrpcval($customer_data['email'], "string"),
|
||||
);
|
||||
if ($customer_data['is_synch'] == NULL){
|
||||
$create = $this-> create_customer($userId, $client, $customer_data['id_customer'], $key, $presta_user);
|
||||
if (!$create['value']){
|
||||
$is_error = 1;
|
||||
$error_message .= $create['error_message'] . ',';
|
||||
$ids .= $customer_data['id_customer'] . ',';
|
||||
}
|
||||
}
|
||||
else
|
||||
$this->update_customer($userId, $client, $customer_data['erp_customer_id'], $customer_data['id_customer'],$key);
|
||||
}
|
||||
return array(
|
||||
'is_error' => $is_error,
|
||||
'error_message' => $error_message,
|
||||
'value' => 1,
|
||||
'ids' => $ids
|
||||
);
|
||||
}
|
||||
|
||||
public function check_specific_customer($userId, $client, $id_customer, $presta_user='Front End'){
|
||||
$check_customer_id = $this->search_customer($id_customer);
|
||||
if ($check_customer_id[0] > 0)
|
||||
return $check_customer_id[0];
|
||||
else{
|
||||
$customer_data = Db::getInstance()->getRow("SELECT `id_customer`,`firstname`,`lastname`,`email` FROM `" . _DB_PREFIX_ . "customer` WHERE `id_customer`=".$id_customer."");
|
||||
|
||||
$customer_data['firstname'] = urlencode($customer_data['firstname']);
|
||||
$customer_data['lastname'] = urlencode($customer_data['lastname']);
|
||||
$key = array(
|
||||
'name' => new xmlrpcval($customer_data['firstname'] .' '. $customer_data['lastname'], "string"),
|
||||
'email' => new xmlrpcval($customer_data['email'], "string"),
|
||||
);
|
||||
|
||||
if ($check_customer_id[0]==0){
|
||||
$create = $this-> create_customer($userId, $client, $id_customer, $key, $presta_user);
|
||||
if ($create['value']){
|
||||
$erp_customer_id = $create['erp_customer_id'];
|
||||
}
|
||||
else
|
||||
$erp_customer_id = -1;
|
||||
}
|
||||
else{
|
||||
$this->update_customer($userId, $client, $check_customer_id[1], $id_customer,$key);
|
||||
$erp_customer_id = $check_customer_id[1];
|
||||
|
||||
}
|
||||
return $erp_customer_id;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
285
modules/prestaerp/classes/ErpCustomerAddress.php
Normal file
285
modules/prestaerp/classes/ErpCustomerAddress.php
Normal file
@ -0,0 +1,285 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class ErpCustomerAddress extends ObjectModel{
|
||||
|
||||
public $erp_address_id;
|
||||
public $prestashop_address_id;
|
||||
public $created_by ;
|
||||
public $is_synch ;
|
||||
public $id_customer ;
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'erp_address_merge',
|
||||
'primary' => 'id',
|
||||
'fields' => array(
|
||||
'erp_address_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'prestashop_address_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'id_customer' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'created_by' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'is_synch' => array('type' => self::TYPE_BOOL),
|
||||
),
|
||||
);
|
||||
|
||||
public function address_details($id){
|
||||
$address_info = Db::getInstance()->getRow("SELECT * from `" . _DB_PREFIX_ . "erp_address_merge` where `id`=" . $id . "");
|
||||
if ($address_info)
|
||||
return $address_info;
|
||||
return false;
|
||||
}
|
||||
|
||||
public function check_all_addresses($userId, $client, $presta_user){
|
||||
$is_error = 0;
|
||||
$error_message = '';
|
||||
$ids = '';
|
||||
$bulk_data = Db::getInstance()->executeS("SELECT cus.*, erp.`erp_address_id`, erp.`is_synch`
|
||||
FROM `" . _DB_PREFIX_ . "address` cus
|
||||
LEFT JOIN `"._DB_PREFIX_."erp_address_merge` erp ON (erp.`prestashop_address_id` = cus.`id_address`)
|
||||
WHERE erp.`is_synch` IS NULL or erp.`is_synch` =0");
|
||||
|
||||
if (count($bulk_data) == 0) {
|
||||
return array(
|
||||
'is_error' => $is_error,
|
||||
'error_message' => $error_message,
|
||||
'value' => 0,
|
||||
'ids' => $ids
|
||||
);
|
||||
}
|
||||
|
||||
foreach ($bulk_data as $data) {
|
||||
$customer = new ErpCustomer();
|
||||
$erp_customer_id = $customer->check_specific_customer($userId, $client, $data['id_customer'], $presta_user);
|
||||
if ($erp_customer_id>0){
|
||||
$temp_data = $this->get_state_and_country_id($userId, $client, $data['id_country'], $data['id_state']);
|
||||
$erp_country_id = $temp_data['country_id'];
|
||||
$erp_state_id = $temp_data['state_id'];
|
||||
$data['alias'] = urlencode($data['alias']);
|
||||
$data['address1'] = urlencode($data['address1']);
|
||||
$data['address2'] = urlencode($data['address2']);
|
||||
$data['firstname'] = urlencode($data['firstname']);
|
||||
$data['lastname'] = urlencode($data['lastname']);
|
||||
$data['company'] = urlencode($data['company']);
|
||||
$data['city'] = urlencode($data['city']);
|
||||
$name = $data['firstname'] .' '. $data['lastname'];
|
||||
$key = array(
|
||||
'parent_id' => new xmlrpcval($erp_customer_id, "string"),
|
||||
'wk_address_alias' => new xmlrpcval($data['alias'], "string"),
|
||||
'wk_company' => new xmlrpcval($data['company'], "string"),
|
||||
'name' => new xmlrpcval($name, "string"),
|
||||
'street' => new xmlrpcval($data['address1'], "string"),
|
||||
'street2' => new xmlrpcval($data['address2'], "string"),
|
||||
'phone' => new xmlrpcval($data['phone'], "string"),
|
||||
'mobile' => new xmlrpcval($data['phone_mobile'], "string"),
|
||||
'zip' => new xmlrpcval($data['postcode'], "string"),
|
||||
'city' => new xmlrpcval($data['city'], "string"),
|
||||
'country_id' => new xmlrpcval($erp_country_id, "int"),
|
||||
'state_id' => new xmlrpcval($erp_state_id, "int"),
|
||||
'customer' => new xmlrpcval(false, "boolean"),
|
||||
'wk_address' => new xmlrpcval(true, "boolean"),
|
||||
'use_parent_address' => new xmlrpcval(false, "boolean")
|
||||
);
|
||||
|
||||
if ($data['is_synch'] == NULL){
|
||||
$create = $this-> create_address($userId, $client, $data['id_customer'], $data['id_address'], $key, $presta_user);
|
||||
if (!$create['value']){
|
||||
$is_error = 1;
|
||||
$error_message .= $create['error_message'] . ',';
|
||||
$ids .= $data['id_address'] . ',';
|
||||
}
|
||||
}
|
||||
else
|
||||
$this->update_address($userId, $client, $key, $data['erp_address_id'], $data['id_address']);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return array(
|
||||
'is_error' => $is_error,
|
||||
'error_message' => $error_message,
|
||||
'ids' => $ids,
|
||||
'value' => 1
|
||||
);
|
||||
}
|
||||
|
||||
public function get_state_and_country_id($userId, $client, $id_country, $id_state){
|
||||
$erp_country_id = false;
|
||||
$erp_state_id = false;
|
||||
if ($id_country != null && $id_country != "" && $id_country != 0) {
|
||||
$country = new ErpCountry();
|
||||
$country_iso_code = $country->get_iso($id_country);
|
||||
$country_name = $country->get_country_name($id_country);
|
||||
$erp_country_id = $country->get_country($country_iso_code, $country_name, $userId, $client);
|
||||
}
|
||||
if ($id_state != null && $id_state != "" && $id_state != 0) {
|
||||
$state = new ErpState();
|
||||
$state_dtls = $state->get_state_dtls($id_state);
|
||||
$erp_state_id = $state->check_state($userId, $client, $state_dtls['iso_code'], $state_dtls['name'], $state_dtls['id_country']);
|
||||
}
|
||||
return array(
|
||||
'state_id' => $erp_state_id,
|
||||
'country_id' => $erp_country_id,
|
||||
);
|
||||
}
|
||||
|
||||
public function create_address($userId, $client, $customer_id, $address_id, $key, $presta_user='Front End'){
|
||||
$context = array(
|
||||
'prestashop' => new xmlrpcval('prestashop', "string"),
|
||||
'customer_id' => new xmlrpcval($customer_id, "int"),
|
||||
'address_id' => new xmlrpcval($address_id, "string"),
|
||||
);
|
||||
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("res.partner", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("create", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($key, "struct"));
|
||||
$msg_ser->addParam(new xmlrpcval($context, "struct"));
|
||||
$resp = $client->send($msg_ser);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$log = new pob_log();
|
||||
$log->logMessage(__FILE__,__LINE__,$resp->raw_data,"CRITICAL");
|
||||
return array(
|
||||
'error_message' => $error_message,
|
||||
'value' => False
|
||||
);
|
||||
}else{
|
||||
$erp_address_id = $resp->value()->me['int'];
|
||||
$data = array(
|
||||
'erp_address_id' => $erp_address_id,
|
||||
'prestashop_address_id' => $address_id,
|
||||
'created_by' => $presta_user,
|
||||
'id_customer' => $customer_id
|
||||
);
|
||||
Db::getInstance()->insert('erp_address_merge', $data);
|
||||
return array(
|
||||
'value' => True,
|
||||
'erp_address_id' => $erp_address_id,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function update_address($userId, $client, $key, $erp_id, $id_address){
|
||||
$context = array(
|
||||
'prestashop' => new xmlrpcval('prestashop', "string")
|
||||
);
|
||||
$erp_address_id = array(
|
||||
new xmlrpcval($erp_id, 'int')
|
||||
);
|
||||
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("res.partner", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("write", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($erp_address_id, "array"));
|
||||
$msg_ser->addParam(new xmlrpcval($key, "struct"));
|
||||
$msg_ser->addParam(new xmlrpcval($context, "struct"));
|
||||
$resp = $client->send($msg_ser);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$log = new pob_log();
|
||||
$log->logMessage(__FILE__,__LINE__,$resp->raw_data,"CRITICAL");
|
||||
return array(
|
||||
'error_message' => $error_message,
|
||||
'value' => False
|
||||
);
|
||||
} else {
|
||||
Db::getInstance()->execute("UPDATE `" . _DB_PREFIX_ . "erp_address_merge` set `is_synch`=1 where `prestashop_address_id`=" . $id_address . "");
|
||||
return array(
|
||||
'value' => True
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function search_address($id_address){
|
||||
$arr = array();
|
||||
$erp_address = Db::getInstance()->getRow("SELECT `is_synch`,`erp_address_id` from `" . _DB_PREFIX_ . "erp_address_merge` where `prestashop_address_id`=" . $id_address . "");
|
||||
if ($erp_address['erp_address_id'] > 0) {
|
||||
if ($erp_address['is_synch'] == 1) {
|
||||
$arr[0] = $erp_address['erp_address_id'];
|
||||
return $arr;
|
||||
} else {
|
||||
$arr[0] = -1;
|
||||
$arr[1] = $erp_address['erp_address_id'];
|
||||
return $arr;
|
||||
}
|
||||
} else {
|
||||
$arr[0] = 0;
|
||||
return $arr;
|
||||
}
|
||||
}
|
||||
|
||||
public function check_specific_address($userId, $client, $id_address, $id_customer, $presta_user = 'Front End'){
|
||||
$erp_address = $this->search_address($id_address);
|
||||
if ($erp_address[0] > 0) {
|
||||
return $erp_address[0];
|
||||
}else {
|
||||
$customer = new ErpCustomer();
|
||||
$erp_customer_id = $customer->check_specific_customer($userId, $client, $id_customer, $presta_user);
|
||||
|
||||
$address_data = Db::getInstance()->getRow("SELECT * FROM `" . _DB_PREFIX_ . "address` where `id_address`=". $id_address."");
|
||||
$temp_data = $this->get_state_and_country_id($userId, $client, $address_data['id_country'], $address_data['id_state']);
|
||||
$erp_country_id = $temp_data['country_id'];
|
||||
$erp_state_id = $temp_data['state_id'];
|
||||
|
||||
$address_data['alias'] = urlencode($address_data['alias']);
|
||||
$address_data['address1'] = urlencode($address_data['address1']);
|
||||
$address_data['address2'] = urlencode($address_data['address2']);
|
||||
$address_data['firstname'] = urlencode($address_data['firstname']);
|
||||
$address_data['lastname'] = urlencode($address_data['lastname']);
|
||||
$address_data['company'] = urlencode($address_data['company']);
|
||||
$address_data['city'] = urlencode($address_data['city']);
|
||||
$name = $address_data['firstname'] .' '. $address_data['lastname'];
|
||||
$key = array(
|
||||
'parent_id' => new xmlrpcval($erp_customer_id, "string"),
|
||||
'wk_address_alias' => new xmlrpcval($address_data['alias'], "string"),
|
||||
'wk_company' => new xmlrpcval($address_data['company'], "string"),
|
||||
'name' => new xmlrpcval($name, "string"),
|
||||
'street' => new xmlrpcval($address_data['address1'], "string"),
|
||||
'street2' => new xmlrpcval($address_data['address2'], "string"),
|
||||
'phone' => new xmlrpcval($address_data['phone'], "string"),
|
||||
'mobile' => new xmlrpcval($address_data['phone_mobile'], "string"),
|
||||
'zip' => new xmlrpcval($address_data['postcode'], "string"),
|
||||
'city' => new xmlrpcval($address_data['city'], "string"),
|
||||
'country_id' => new xmlrpcval($erp_country_id, "int"),
|
||||
'state_id' => new xmlrpcval($erp_state_id, "int"),
|
||||
'customer' => new xmlrpcval(false, "boolean"),
|
||||
'wk_address' => new xmlrpcval(true, "boolean"),
|
||||
'use_parent_address' => new xmlrpcval(false, "boolean")
|
||||
);
|
||||
|
||||
if ($erp_address[0] == -1){
|
||||
$this->update_address($userId, $client, $key, $erp_address[1], $id_address);
|
||||
return $erp_address[1];
|
||||
}else{
|
||||
$create = $this-> create_address($userId, $client, $id_customer, $id_address, $key, $presta_user);
|
||||
if ($create['value'])
|
||||
return $create['erp_address_id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
49
modules/prestaerp/classes/ErpOrders.php
Normal file
49
modules/prestaerp/classes/ErpOrders.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class ErpOrders extends ObjectModel
|
||||
{
|
||||
public $erp_order_id;
|
||||
public $prst_order_id;
|
||||
public $erp_invoice_id ;
|
||||
public $erp_order_name ;
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'erp_order_merge',
|
||||
'primary' => 'id',
|
||||
'fields' => array(
|
||||
'erp_order_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'prst_order_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'erp_invoice_id' => array('type' => self::TYPE_INT, 'required' => false),
|
||||
'erp_order_name' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
),
|
||||
);
|
||||
|
||||
public function order_details($id){
|
||||
$order_info = Db::getInstance()->getRow("SELECT * from `" . _DB_PREFIX_ . "erp_order_merge` where `id`=" . $id . "");
|
||||
if ($order_info)
|
||||
return $order_info;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
128
modules/prestaerp/classes/ErpPaymentMethod.php
Normal file
128
modules/prestaerp/classes/ErpPaymentMethod.php
Normal file
@ -0,0 +1,128 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class ErpPaymentMethod extends ObjectModel{
|
||||
|
||||
public $erp_payment_id;
|
||||
public $prestashop_payment_id;
|
||||
public $name ;
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'erp_payment_merge',
|
||||
'primary' => 'id',
|
||||
'fields' => array(
|
||||
'erp_payment_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'prestashop_payment_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'name' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
),
|
||||
);
|
||||
public function payment_method_details($id){
|
||||
$payment_method_info = Db::getInstance()->getRow("SELECT * from `" . _DB_PREFIX_ . "erp_payment_merge` where `id`=" . $id . "");
|
||||
if ($payment_method_info)
|
||||
return $payment_method_info;
|
||||
return false;
|
||||
}
|
||||
|
||||
public function merge_payment_method($name, $userId, $client){
|
||||
$payment_arr = array(
|
||||
'name' => new xmlrpcval($name, "string")
|
||||
);
|
||||
$payment = new xmlrpcmsg('execute');
|
||||
$payment->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$payment->addParam(new xmlrpcval($userId, "int"));
|
||||
$payment->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$payment->addParam(new xmlrpcval("force.done", "string"));
|
||||
$payment->addParam(new xmlrpcval("create_payment_method", "string"));
|
||||
$payment->addParam(new xmlrpcval($payment_arr, "struct"));
|
||||
$resp = $client->send($payment);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$log = new pob_log();
|
||||
$log->logMessage(__FILE__,__LINE__,$resp->raw_data,"CRITICAL");
|
||||
return array(
|
||||
'error_message' => $error_message,
|
||||
'erp_id' => -1
|
||||
);
|
||||
} else {
|
||||
$val = $resp->value()->me;
|
||||
$erp_id = $val['int'];
|
||||
return array(
|
||||
'erp_id' => $erp_id
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function addto_payment_merge($erp_id, $name, $prst_id, $presta_user = 'Front End'){
|
||||
$data = array(
|
||||
'erp_payment_id' => $erp_id,
|
||||
'prestashop_payment_id' => $prst_id,
|
||||
'created_by' => $presta_user,
|
||||
'name' => $name
|
||||
);
|
||||
Db::getInstance()->insert('erp_payment_merge', $data);
|
||||
}
|
||||
|
||||
public function check_all_payment_methods($userId, $client, $presta_user){
|
||||
$is_error = 0;
|
||||
$error_message = '';
|
||||
$ids = '';
|
||||
$count = 0;
|
||||
foreach (PaymentModule::getInstalledPaymentModules() as $payment) {
|
||||
$prestashop_id = (int) $payment['id_module'];
|
||||
$check = Db::getInstance()->getRow("SELECT * from `" . _DB_PREFIX_ . "erp_payment_merge` where `prestashop_payment_id`=" . $prestashop_id . "");
|
||||
if ($check['erp_payment_id'] <= 0) {
|
||||
$module = Module::getInstanceByName($payment['name']);
|
||||
if ($module == false) {
|
||||
continue;
|
||||
}
|
||||
$create = $this->merge_payment_method($module->displayName, $userId, $client);
|
||||
if ($create['erp_id'] > 0) {
|
||||
$this->addto_payment_merge($create['erp_id'], $payment['name'], $prestashop_id, $presta_user);
|
||||
$count = 1;
|
||||
} else {
|
||||
$is_error = 1;
|
||||
$error_message .= $create['error_message'] . ',';
|
||||
$ids .= $prestashop_id . ',';
|
||||
}
|
||||
}
|
||||
}
|
||||
return array(
|
||||
'is_error' => $is_error,
|
||||
'error_message' => $error_message,
|
||||
'value' => $count,
|
||||
'ids' => $ids
|
||||
);
|
||||
}
|
||||
|
||||
public function check_specific_payment_method($name, $userId, $client){
|
||||
$check = Db::getInstance()->getRow("SELECT * from `" . _DB_PREFIX_ . "erp_payment_merge` where `name`='" . $name . "'");
|
||||
if ($check['erp_payment_id'] <= 0) {
|
||||
$module = Module::getInstanceByName($name);
|
||||
$create = $this->merge_payment_method($module->displayName, $userId, $client);
|
||||
$this->addto_payment_merge($create['erp_id'], $name, $module->id);
|
||||
return $create['erp_id'];
|
||||
} else {
|
||||
return $check['erp_payment_id'];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
255
modules/prestaerp/classes/ErpProductAttribute.php
Normal file
255
modules/prestaerp/classes/ErpProductAttribute.php
Normal file
@ -0,0 +1,255 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
|
||||
class ErpProductAttribute extends ObjectModel{
|
||||
|
||||
public $erp_attribute_id;
|
||||
public $prestashop_attribute_id;
|
||||
public $created_by ;
|
||||
public $translate_state ;
|
||||
public $color ;
|
||||
public $is_synch ;
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'erp_attributes_merge',
|
||||
'primary' => 'id',
|
||||
'fields' => array(
|
||||
'erp_attribute_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'prestashop_attribute_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'translate_state' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'color' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'created_by' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'is_synch' => array('type' => self::TYPE_BOOL),
|
||||
),
|
||||
);
|
||||
|
||||
public function check_attribute($id_attribute){
|
||||
$check_erp_id = Db::getInstance()->getRow("SELECT `is_synch`,`erp_attribute_id` from `"._DB_PREFIX_."erp_attributes_merge` where `prestashop_attribute_id`=".$id_attribute."");
|
||||
if ($check_erp_id['erp_attribute_id'] > 0) {
|
||||
if ($check_erp_id['is_synch'] == 0)
|
||||
return array(
|
||||
-1,
|
||||
$check_erp_id['erp_attribute_id']
|
||||
);
|
||||
else
|
||||
return array(
|
||||
$check_erp_id['erp_attribute_id']
|
||||
);
|
||||
} else
|
||||
return array(
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
public function create_attribute($attr_name, $userId, $client){
|
||||
$key = array(
|
||||
'name' => new xmlrpcval(str_replace('+', ' ',urlencode($attr_name)), "string"),
|
||||
);
|
||||
$context = array(
|
||||
'prestashop' => new xmlrpcval('prestashop', "string"),
|
||||
);
|
||||
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("product.attribute", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("create", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($key, "struct"));
|
||||
$msg_ser->addParam(new xmlrpcval($context, "struct"));
|
||||
$resp = $client->send($msg_ser);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
return array(
|
||||
'error_message' => $error_message,
|
||||
'erp_id' => -1
|
||||
);
|
||||
} else {
|
||||
$val = $resp->value()->me;
|
||||
$erp_id = $val['int'];
|
||||
return array(
|
||||
'erp_id' => $erp_id
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function attr_details($id){
|
||||
$attr_info = Db::getInstance()->getRow("SELECT * from `" . _DB_PREFIX_ . "erp_attributes_merge` where `id`=" . $id . "");
|
||||
if ($attr_info)
|
||||
return $attr_info;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public function addto_attribute_merge($attribute_id, $erp_attribute_id, $presta_user = 'Front End'){
|
||||
$data = array(
|
||||
'erp_attribute_id' => $erp_attribute_id,
|
||||
'prestashop_attribute_id' => $attribute_id,
|
||||
'created_by' => $presta_user,
|
||||
);
|
||||
Db::getInstance()->insert('erp_attributes_merge', $data);
|
||||
}
|
||||
|
||||
public function update_attribute($erp_attribute_id, $id_attribute, $attr_name, $userId, $client){
|
||||
$erp_attribute_list = array(
|
||||
new xmlrpcval($erp_attribute_id, 'int')
|
||||
);
|
||||
$key = array(
|
||||
'name' => new xmlrpcval(str_replace('+', ' ',urlencode($attr_name)), "string"),
|
||||
);
|
||||
$context = array(
|
||||
'prestashop' => new xmlrpcval('prestashop', "string"),
|
||||
);
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("product.attribute", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("write", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($erp_attribute_list, "array"));
|
||||
$msg_ser->addParam(new xmlrpcval($key, "struct"));
|
||||
$msg_ser->addParam(new xmlrpcval($context, "struct"));
|
||||
$resp = $client->send($msg_ser);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
return array(
|
||||
'error_message' => $error_message,
|
||||
'value' => False
|
||||
);
|
||||
} else {
|
||||
Db::getInstance()->execute("UPDATE `" . _DB_PREFIX_ . "erp_attributes_merge` SET `is_synch`=1 where `prestashop_attribute_id`=" . $id_attribute . "");
|
||||
return array(
|
||||
'value' => True
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function addto_openerp_merge($erp_id, $presta_id,$object,$userId, $client){
|
||||
$arrayVal = array(
|
||||
'name' => new xmlrpcval($erp_id, "int"),
|
||||
'erp_id' => new xmlrpcval($erp_id, "string"),
|
||||
'presta_id' => new xmlrpcval($presta_id, "string")
|
||||
);
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($object, "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("create", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($arrayVal, "struct"));
|
||||
$resp = $client->send($msg_ser);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
return array(
|
||||
'error_message' => $error_message,
|
||||
'is_error' => 1
|
||||
);
|
||||
} else {
|
||||
return array(
|
||||
'is_error' => 0
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function check_all_attributes($userId, $client, $presta_user){
|
||||
$is_error = 0;
|
||||
$error_message = '';
|
||||
$ids = '';
|
||||
$count = 0;
|
||||
$data = AttributeGroup::getAttributesGroups(Configuration::get('PS_LANG_DEFAULT'));
|
||||
foreach ($data as $attr_data){
|
||||
$erp_attribute_id = $this->check_attribute($attr_data['id_attribute_group']);
|
||||
if ($erp_attribute_id[0] == 0) {$count = $count+1;
|
||||
$attr_name = $attr_data['name'];
|
||||
$create = $this->create_attribute($attr_name, $userId, $client);
|
||||
if ($create['erp_id'] > 0){
|
||||
$this->addto_attribute_merge($attr_data['id_attribute_group'], $create['erp_id'],$presta_user);
|
||||
$this->addto_openerp_merge($create['erp_id'],$attr_data['id_attribute_group'],"prestashop.product.attribute",$userId, $client);
|
||||
}
|
||||
else {
|
||||
$is_error = 1;
|
||||
$error_message .= $create['error_message'] . ',';
|
||||
$ids .= $attr_data['id_attribute_group'] . ',';
|
||||
}
|
||||
|
||||
}
|
||||
elseif ($erp_attribute_id[0] < 0) {$count = $count+1;
|
||||
$attr_name = $attr_data['name'];
|
||||
$update = $this->update_attribute($erp_attribute_id[1], $attr_data['id_attribute_group'], $attr_name, $userId, $client);
|
||||
if ($update['value'] != True) {
|
||||
$is_error = 1;
|
||||
$error_message .= $update['error_message'] . ',';
|
||||
$ids .= $attr_data['id_attribute_group'] . ',';
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($count == 0) {
|
||||
//Nothing to export
|
||||
return array(
|
||||
'is_error' => $is_error,
|
||||
'error_message' => $error_message,
|
||||
'value' => 0,
|
||||
'$ids' => $ids
|
||||
);
|
||||
}
|
||||
else
|
||||
return array(
|
||||
'is_error' => $is_error,
|
||||
'error_message' => $error_message,
|
||||
'value' => 1,
|
||||
'ids' => $ids
|
||||
);
|
||||
}
|
||||
|
||||
public function check_specific_attribute($userId, $client, $presta_attribute_id, $presta_user){
|
||||
$check_attribute = $this->check_attribute($presta_attribute_id);
|
||||
if ($check_attribute[0] > 0)
|
||||
return $check_attribute[0];
|
||||
else {
|
||||
$id_lang = Configuration::get('PS_LANG_DEFAULT');
|
||||
$attr_data = Db::getInstance()->getRow('
|
||||
SELECT DISTINCT agl.`name`, ag.*, agl.*
|
||||
FROM `'._DB_PREFIX_.'attribute_group` ag
|
||||
'.Shop::addSqlAssociation('attribute_group', 'ag').'
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl
|
||||
ON (ag.`id_attribute_group` = agl.`id_attribute_group` AND `id_lang` = '.(int)$id_lang.')
|
||||
WHERE agl.id_attribute_group='.$presta_attribute_id);
|
||||
$attr_name = $attr_data['name'];
|
||||
if ($check_attribute[0] == 0) {
|
||||
$create = $this->create_attribute($attr_name ,$userId, $client);
|
||||
if ($create['erp_id'] > 0){
|
||||
$this->addto_attribute_merge($presta_attribute_id, $create['erp_id'],$presta_user);
|
||||
$this->addto_openerp_merge($create['erp_id'],$presta_attribute_id,"prestashop.product.attribute",$userId, $client);
|
||||
return $create['erp_id'];
|
||||
}
|
||||
else
|
||||
return False;
|
||||
} else {
|
||||
$this->update_attribute($check_attribute[1],$presta_attribute_id,$attr_name, $userId, $client);
|
||||
return $check_attribute[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
304
modules/prestaerp/classes/ErpProductAttributeValue.php
Normal file
304
modules/prestaerp/classes/ErpProductAttributeValue.php
Normal file
@ -0,0 +1,304 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
|
||||
class ErpProductAttributeValue extends ObjectModel{
|
||||
|
||||
public $erp_attribute_id;
|
||||
public $erp_attribute_value_id;
|
||||
public $prestashop_attribute_id;
|
||||
public $prestashop_attribute_value_id;
|
||||
public $translate_state ;
|
||||
public $color;
|
||||
public $created_by ;
|
||||
public $is_synch ;
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'erp_attribute_values_merge',
|
||||
'primary' => 'id',
|
||||
'fields' => array(
|
||||
'erp_attribute_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'erp_attribute_value_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'prestashop_attribute_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'prestashop_attribute_value_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'created_by' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'translate_state' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'color' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'is_synch' => array('type' => self::TYPE_BOOL),
|
||||
),
|
||||
);
|
||||
|
||||
public function map_attribute($ps_value_id,$erp_value_id,$ps_attribute_id,$erp_attr_id){
|
||||
if (!class_exists('xmlrpc_client'))
|
||||
include_once 'xmlrpc.inc';
|
||||
$client = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/object");
|
||||
$sock = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/common");
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpUsername"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), 'string'));
|
||||
$resp = $sock->send($msg);
|
||||
if (!$resp->faultCode()) {
|
||||
$userId = $resp->value()->scalarval();
|
||||
$arrayVal = array(
|
||||
'name' => new xmlrpcval($erp_value_id, "int"),
|
||||
'erp_id' => new xmlrpcval($erp_value_id, "string"),
|
||||
'presta_id' => new xmlrpcval($ps_value_id, "string"),
|
||||
'erp_attr_id' => new xmlrpcval($erp_attr_id, "string"),
|
||||
'presta_attr_id' => new xmlrpcval($ps_attribute_id, "string"),
|
||||
);
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval('prestashop.product.attribute.value', "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("create", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($arrayVal, "struct"));
|
||||
$resp = $client->send($msg_ser);
|
||||
if ($resp->faultCode()) {
|
||||
$this->errors[] = Tools::displayError('Error in creating mapping on Odoo End');
|
||||
$this->display = 'add';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function attribute_value_details($id){
|
||||
$attrribute_value_info = Db::getInstance()->getRow("SELECT * from `" . _DB_PREFIX_ . "erp_attribute_values_merge` where `id`=" . $id . "");
|
||||
if ($attrribute_value_info)
|
||||
return $attrribute_value_info;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function check_attribute_value($id_attribute_value){
|
||||
$check_erp_id = Db::getInstance()->getRow("SELECT `is_synch`,`erp_attribute_value_id` from `"._DB_PREFIX_."erp_attribute_values_merge` where `prestashop_attribute_value_id`=".$id_attribute_value."");
|
||||
if ($check_erp_id['erp_attribute_value_id'] > 0) {
|
||||
if ($check_erp_id['is_synch'] == 0)
|
||||
return array(
|
||||
-1,
|
||||
$check_erp_id['erp_attribute_value_id']
|
||||
);
|
||||
else
|
||||
return array(
|
||||
$check_erp_id['erp_attribute_value_id']
|
||||
);
|
||||
} else
|
||||
return array(
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
public function create_attribute_value($name,$erp_attribute_id,$presta_attribute_id,$presta_attribute_value_id,$sequence,$userId, $client){
|
||||
$key = array(
|
||||
'name' => new xmlrpcval(str_replace('+', ' ',urlencode($name)), "string"),
|
||||
'erp_attribute_id' => new xmlrpcval($erp_attribute_id, "int"),
|
||||
'presta_attribute_id' => new xmlrpcval($presta_attribute_id, "int"),
|
||||
'presta_attribute_value_id' => new xmlrpcval($presta_attribute_value_id, "int"),
|
||||
'sequence' => new xmlrpcval($sequence, "int")
|
||||
);
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("force.done", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("create_attribute_value", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($key, "struct"));
|
||||
$resp = $client->send($msg_ser);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
return array(
|
||||
'error_message' => $error_message,
|
||||
'erp_id' => -1
|
||||
);
|
||||
} else {
|
||||
$val = $resp->value()->me;
|
||||
$erp_id = $val['int'];
|
||||
return array(
|
||||
'erp_id' => $erp_id
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function addto_attribute_value_merge($prestashop_attribute_value_id,$erp_attribute_value_id,$prestashop_attribute_id,$erp_attribute_id,$presta_user = 'Front End'){
|
||||
$data = array(
|
||||
'erp_attribute_value_id' => $erp_attribute_value_id,
|
||||
'prestashop_attribute_value_id' => $prestashop_attribute_value_id,
|
||||
'created_by' => $presta_user,
|
||||
'prestashop_attribute_id' => $prestashop_attribute_id,
|
||||
'erp_attribute_id' => $erp_attribute_id,
|
||||
);
|
||||
Db::getInstance()->insert('erp_attribute_values_merge', $data);
|
||||
}
|
||||
|
||||
public function update_attribute_value($erp_attribute_value_id, $id_attribute_value,$erp_attribute_id,$name,$sequence, $userId, $client){
|
||||
$erp_attribute_value_list = array(
|
||||
new xmlrpcval($erp_attribute_value_id, 'int')
|
||||
);
|
||||
$key = array(
|
||||
'name' => new xmlrpcval(str_replace('+', ' ',urlencode($name)), "string"),
|
||||
'attribute_id' => new xmlrpcval($erp_attribute_id, "string"),
|
||||
'sequence' => new xmlrpcval($sequence, "int")
|
||||
);
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("product.attribute.value", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("write", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($erp_attribute_value_list, "array"));
|
||||
$msg_ser->addParam(new xmlrpcval($key, "struct"));
|
||||
$resp = $client->send($msg_ser);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
return array(
|
||||
'error_message' => $error_message,
|
||||
'value' => False
|
||||
);
|
||||
} else {
|
||||
Db::getInstance()->execute("UPDATE `" . _DB_PREFIX_ . "erp_attribute_values_merge` SET `is_synch`=1 where `prestashop_attribute_value_id`=" . $id_attribute_value . "");
|
||||
return array(
|
||||
'value' => True
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function addto_openerp_merge($erp_id, $presta_id,$object,$userId, $client){
|
||||
$arrayVal = array(
|
||||
'name' => new xmlrpcval($erp_id, "int"),
|
||||
'erp_id' => new xmlrpcval($erp_id, "string"),
|
||||
'presta_id' => new xmlrpcval($presta_id, "string")
|
||||
);
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($object, "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("create", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($arrayVal, "struct"));
|
||||
$resp = $client->send($msg_ser);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
return array(
|
||||
'error_message' => $error_message,
|
||||
'is_error' => 1
|
||||
);
|
||||
} else {
|
||||
return array(
|
||||
'is_error' => 0
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function check_all_attribute_values($userId, $client, $presta_user){
|
||||
$is_error = 0;
|
||||
$error_message = '';
|
||||
$ids = '';
|
||||
$count = 0;
|
||||
$data = AttributeGroup::getAttributesGroups(Configuration::get('PS_LANG_DEFAULT'));
|
||||
$attributes = new ErpProductAttribute();
|
||||
foreach ($data as $attr_data){
|
||||
$erp_attribute_id = $attributes->check_specific_attribute($userId, $client,$attr_data['id_attribute_group'], $presta_user);
|
||||
if ($erp_attribute_id){
|
||||
$data_attr_value = AttributeGroup::getAttributes(Configuration::get('PS_LANG_DEFAULT'),$attr_data['id_attribute_group']);
|
||||
foreach ($data_attr_value as $attr_value_data){
|
||||
$erp_attribute_value_id = $this->check_attribute_value($attr_value_data['id_attribute']);
|
||||
if ($erp_attribute_value_id[0] == 0) {$count = $count+1;
|
||||
$name = $attr_value_data['name'];
|
||||
$sequence = $attr_value_data['position'];
|
||||
|
||||
$create = $this->create_attribute_value($name,$erp_attribute_id,$attr_data['id_attribute_group'],$attr_value_data['id_attribute'],$sequence,$userId, $client);
|
||||
if ($create['erp_id'] > 0){
|
||||
$this->addto_attribute_value_merge($attr_value_data['id_attribute'], $create['erp_id'],$attr_value_data['id_attribute_group'],$erp_attribute_id,$presta_user);
|
||||
}
|
||||
else {
|
||||
$is_error = 1;
|
||||
$error_message .= $create['error_message'] . ',';
|
||||
$ids .= $attr_value_data['id_attribute'] . ',';
|
||||
}
|
||||
|
||||
}
|
||||
if ($erp_attribute_value_id[0] < 0) {
|
||||
$count = $count+1;
|
||||
$name = $attr_value_data['name'];
|
||||
$sequence = $attr_value_data['position'];
|
||||
$this->update_attribute_value($erp_attribute_value_id[1],$attr_value_data['id_attribute'],$erp_attribute_id,$name,$sequence,$userId, $client);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if ($count == 0) {
|
||||
//Nothing to export
|
||||
return array(
|
||||
'is_error' => $is_error,
|
||||
'error_message' => $error_message,
|
||||
'value' => 0,
|
||||
'$ids' => $ids
|
||||
);
|
||||
}
|
||||
else
|
||||
return array(
|
||||
'is_error' => $is_error,
|
||||
'error_message' => $error_message,
|
||||
'value' => 1,
|
||||
'ids' => $ids
|
||||
);
|
||||
}
|
||||
|
||||
public function check_specific_attribute_value($userId, $client, $presta_attribute_id,$presta_attribute_value_id, $presta_user){
|
||||
$attributes = new ErpProductAttribute();
|
||||
$erp_attribute_id = $attributes->check_specific_attribute($userId, $client,$presta_attribute_id, $presta_user);
|
||||
$check = $this->check_attribute_value($presta_attribute_value_id);
|
||||
if ($check[0] <=0){
|
||||
if ($erp_attribute_id){
|
||||
$data_attr_value = AttributeGroup::getAttributes(Configuration::get('PS_LANG_DEFAULT'),$presta_attribute_id);
|
||||
foreach ($data_attr_value as $attr_value_data){
|
||||
$erp_attribute_value_id = $this->check_attribute_value($attr_value_data['id_attribute']);
|
||||
$name = $attr_value_data['name'];
|
||||
$sequence = $attr_value_data['position'];
|
||||
if ($erp_attribute_value_id[0] == 0) {
|
||||
$create = $this->create_attribute_value($name,$erp_attribute_id,$attr_value_data['id_attribute_group'],$attr_value_data['id_attribute'],$sequence,$userId, $client);
|
||||
if ($create['erp_id'] > 0){
|
||||
$erp_value_id =$create['erp_id'];
|
||||
$this->addto_attribute_value_merge($attr_value_data['id_attribute'], $create['erp_id'],$attr_value_data['id_attribute_group'],$erp_attribute_id,$presta_user);
|
||||
|
||||
}
|
||||
else
|
||||
$erp_value_id = -1;
|
||||
}
|
||||
if ($erp_attribute_value_id[0] < 0) {$count = $count+1;
|
||||
$name = $attr_value_data['name'];
|
||||
$sequence = $attr_value_data['position'];
|
||||
$erp_value_id = $erp_attribute_value_id[0];
|
||||
$this->update_attribute_value($erp_attribute_value_id[1],$attr_value_data['id_attribute'],$erp_attribute_id,$name,$sequence,$userId, $client);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
$erp_value_id = -1;
|
||||
}
|
||||
else
|
||||
$erp_value_id = $check[0];
|
||||
return array('erp_attribute_id'=>(string)$erp_attribute_id,'erp_attr_value_id'=>$erp_value_id);
|
||||
}
|
||||
|
||||
}
|
273
modules/prestaerp/classes/ErpProductCategory.php
Normal file
273
modules/prestaerp/classes/ErpProductCategory.php
Normal file
@ -0,0 +1,273 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
|
||||
class ErpProductCategory extends ObjectModel{
|
||||
|
||||
public $erp_category_id;
|
||||
public $prestashop_category_id;
|
||||
public $created_by ;
|
||||
public $is_synch ;
|
||||
public $translate_state ;
|
||||
public $color;
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'erp_category_merge',
|
||||
'primary' => 'id',
|
||||
'fields' => array(
|
||||
'erp_category_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'prestashop_category_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'created_by' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'translate_state' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'color' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'is_synch' => array('type' => self::TYPE_BOOL),
|
||||
),
|
||||
);
|
||||
|
||||
public function map_cat($erp_cat_id, $prestashop_cat_id, $presta_user){
|
||||
$log = new pob_log();
|
||||
if (!class_exists('xmlrpc_client'))
|
||||
include_once 'xmlrpc.inc';
|
||||
$client = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/object");
|
||||
$sock = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/common");
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpUsername"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), 'string'));
|
||||
$resp = $sock->send($msg);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,'Connection Error : Invalid Odoo Information.','ERROR');
|
||||
$this->errors[] = Tools::displayError($this->l('Connection Error : Invalid Odoo Information.' . $error_message));
|
||||
} else {
|
||||
$userId = $resp->value()->scalarval();
|
||||
if ($userId <= 0){
|
||||
$log->logMessage(__FILE__,__LINE__,'Invalid UserName or Password. Please check the Odoo configuration.','ERROR');
|
||||
$this->errors[] = Tools::displayError($this->l('Invalid UserName or Password. Please check the Odoo configuration.'));}
|
||||
else {
|
||||
$presta_user = $this->context->employee->firstname . ' ' . $this->context->employee->lastname . ' (' . $this->context->employee->email . ')';
|
||||
$this->addto_category_merge($erp_cat_id, $prestashop_cat_id, $presta_user, $userId, $client);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function get_cat_info($presta_id){
|
||||
$db_object = Db::getInstance()->getRow("SELECT `id_parent`,`id_shop_default` from `" . _DB_PREFIX_ . "category` where `id_category`=" . $presta_id . "");
|
||||
if ($db_object)
|
||||
$db_object1 = Db::getInstance()->getRow("SELECT `name` from `" . _DB_PREFIX_ . "category_lang` where `id_category`=".$presta_id ." and `id_shop`=".$db_object['id_shop_default']."");
|
||||
else
|
||||
$db_object1 = Db::getInstance()->getRow("SELECT `name` from `" . _DB_PREFIX_ . "category_lang` where `id_category`=".$presta_id ."");
|
||||
return array(
|
||||
'id_parent' => $db_object['id_parent'],
|
||||
'name' => $db_object1['name']
|
||||
);
|
||||
}
|
||||
|
||||
public function check_home(){
|
||||
$home_id = Db::getInstance()->getRow("SELECT `erp_category_id` from `" . _DB_PREFIX_ . "erp_category_merge` where `prestashop_category_id`=2");
|
||||
if ($home_id['erp_category_id'] > 0)
|
||||
return $home_id['erp_category_id'];
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
public function cat_details($id){
|
||||
$cat_info = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow("SELECT * from `" . _DB_PREFIX_ . "erp_category_merge` where `id` = " . $id . "");
|
||||
if ($cat_info)
|
||||
return $cat_info;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function check_category($prestashop_id){
|
||||
$categ_obj = Db::getInstance()->getRow("SELECT `erp_category_id`,`is_synch` from `" . _DB_PREFIX_ . "erp_category_merge` where `prestashop_category_id` = " . $prestashop_id . "");
|
||||
if ($categ_obj['erp_category_id'] > 0) {
|
||||
if ($categ_obj['is_synch'] == 0)
|
||||
return array(
|
||||
-1,
|
||||
$categ_obj['erp_category_id']
|
||||
);
|
||||
else
|
||||
return array(
|
||||
$categ_obj['erp_category_id']
|
||||
);
|
||||
} else
|
||||
return array(
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
private function create_category($presta_id, $id_parent, $name, $userId, $client, $presta_user){
|
||||
$context = array(
|
||||
'prestashop' => new xmlrpcval('prestashop', "string")
|
||||
);
|
||||
$arrayVal = array(
|
||||
'name' => new xmlrpcval($name, "string"),
|
||||
'type' => new xmlrpcval("normal", "string"),
|
||||
'parent_id' => new xmlrpcval($id_parent, "int")
|
||||
);
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("product.category", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("create", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($arrayVal, "struct"));
|
||||
$msg_ser->addParam(new xmlrpcval($context, "struct"));
|
||||
$resp = $client->send($msg_ser);
|
||||
if (!$resp->faultCode()) {
|
||||
$val = $resp->value()->me;
|
||||
$erp_id = $val['int'];
|
||||
$this->addto_category_merge($erp_id, $presta_id, $presta_user, $userId, $client);
|
||||
return array(
|
||||
'erp_id' => $erp_id
|
||||
);
|
||||
}
|
||||
else{
|
||||
$error_message = $resp->faultString();
|
||||
$log = new pob_log();
|
||||
$log->logMessage(__FILE__,__LINE__,$resp->raw_data,"CRITICAL");
|
||||
return array(
|
||||
'error_message' => $error_message,
|
||||
'value' => False
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function update_category($presta_id, $id_parent, $name, $erp_id, $userId, $client){
|
||||
$context = array(
|
||||
'prestashop' => new xmlrpcval('prestashop', "string")
|
||||
);
|
||||
$erp_cat_id = array(
|
||||
new xmlrpcval($erp_id, 'int')
|
||||
);
|
||||
$arrayVal = array(
|
||||
'name' => new xmlrpcval($name, "string"),
|
||||
'type' => new xmlrpcval("normal", "string"),
|
||||
'parent_id' => new xmlrpcval($id_parent, "int")
|
||||
);
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("product.category", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("write", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($erp_cat_id, "array"));
|
||||
$msg_ser->addParam(new xmlrpcval($arrayVal, "struct"));
|
||||
$msg_ser->addParam(new xmlrpcval($context, "struct"));
|
||||
$resp = $client->send($msg_ser);
|
||||
if (!$resp->faultCode()) {
|
||||
Db::getInstance()->execute("UPDATE `" . _DB_PREFIX_ . "erp_category_merge` set `is_synch`=1 where `prestashop_category_id`=" . $presta_id . "");
|
||||
}
|
||||
else{
|
||||
$log = new pob_log();
|
||||
$log->logMessage(__FILE__,__LINE__,$resp->raw_data,"CRITICAL");
|
||||
}
|
||||
}
|
||||
|
||||
public function addto_category_merge($erp_id, $presta_id, $presta_user, $userId, $client){
|
||||
$data = array(
|
||||
'erp_category_id' => $erp_id,
|
||||
'prestashop_category_id' => $presta_id,
|
||||
'created_by' => $presta_user
|
||||
);
|
||||
Db::getInstance()->insert('erp_category_merge', $data);
|
||||
$this->addto_openerp_merge($erp_id, $presta_id, $userId, $client);
|
||||
}
|
||||
|
||||
public function addto_openerp_merge($erp_id, $presta_id, $userId, $client){
|
||||
$arrayVal = array(
|
||||
'category_name' => new xmlrpcval($erp_id, "int"),
|
||||
'erp_category_id' => new xmlrpcval($erp_id, "int"),
|
||||
'presta_category_id' => new xmlrpcval($presta_id, "int")
|
||||
);
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("prestashop.category", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("create", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($arrayVal, "struct"));
|
||||
$resp = $client->send($msg_ser);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$log = new pob_log();
|
||||
$log->logMessage(__FILE__,__LINE__,$resp->raw_data,"CRITICAL");
|
||||
return array(
|
||||
'error_message' => $error_message,
|
||||
'is_error' => 1
|
||||
);
|
||||
} else {
|
||||
return array(
|
||||
'is_error' => 0
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function sync_categories($presta_id, $erp_home_id, $userId, $client, $presta_user = 'Front End'){
|
||||
$check_obj = $this->check_category($presta_id);
|
||||
if ($check_obj[0] == 0) {
|
||||
$db_object = $this->get_cat_info($presta_id);
|
||||
$name = urlencode($db_object['name']);
|
||||
$presta_parent_id = $db_object['id_parent'];
|
||||
if ($presta_parent_id > 2)
|
||||
$erp_parent_id = $this->sync_categories($presta_parent_id, $erp_home_id, $userId, $client, $presta_user);
|
||||
else {
|
||||
$erp_id = $this->create_category($presta_id, $erp_home_id, $name, $userId, $client, $presta_user);
|
||||
return $erp_id['erp_id'];
|
||||
}
|
||||
$erp_id = $this->create_category($presta_id, $erp_parent_id, $name, $userId, $client, $presta_user);
|
||||
return $erp_id['erp_id'];
|
||||
} elseif ($check_obj[0] == -1) {
|
||||
$db_object = $this->get_cat_info($presta_id);
|
||||
$name = urlencode($db_object['name']);
|
||||
$presta_parent_id = $db_object['id_parent'];
|
||||
if ($presta_parent_id > 2)
|
||||
$erp_parent_id = $this->sync_categories($presta_parent_id, $erp_home_id, $userId, $client, $presta_user);
|
||||
else
|
||||
$erp_parent_id = false;
|
||||
$this->update_category($presta_id, $erp_parent_id, $name, $check_obj[1], $userId, $client);
|
||||
return $check_obj[1];
|
||||
} else
|
||||
return $check_obj[0];
|
||||
}
|
||||
|
||||
public function check_all_categories($userId, $client, $presta_user){
|
||||
$data = Db::getInstance()->executeS("SELECT `id_category` FROM `" . _DB_PREFIX_ . "category` WHERE `id_category` NOT IN (SELECT `prestashop_category_id` FROM `" . _DB_PREFIX_ . "erp_category_merge` WHERE `is_synch` = 1)");
|
||||
$erp_home_id = $this->check_home();
|
||||
foreach ($data as $cat_id) {
|
||||
if (!in_array($cat_id['id_category'], array(
|
||||
1,
|
||||
2
|
||||
)))
|
||||
$this->sync_categories($cat_id['id_category'], $erp_home_id, $userId, $client, $presta_user);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
public function check_specific_category($presta_id, $userId, $client, $presta_user='Front End'){
|
||||
$erp_home_id = $this->check_home();
|
||||
$erp_id = $this->sync_categories($presta_id, $erp_home_id, $userId, $client, $presta_user);
|
||||
return $erp_id;
|
||||
}
|
||||
|
||||
}
|
470
modules/prestaerp/classes/ErpProductCombination.php
Normal file
470
modules/prestaerp/classes/ErpProductCombination.php
Normal file
@ -0,0 +1,470 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
class ErpProductCombination extends ObjectModel{
|
||||
public $erp_product_id;
|
||||
public $erp_template_id;
|
||||
public $prestashop_product_id;
|
||||
public $prestashop_product_attribute_id;
|
||||
public $created_by ;
|
||||
public $is_synch ;
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'erp_product_merge',
|
||||
'primary' => 'id',
|
||||
'fields' => array(
|
||||
'erp_product_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'erp_template_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'prestashop_product_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'prestashop_product_attribute_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'created_by' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'is_synch' => array('type' => self::TYPE_BOOL),
|
||||
),
|
||||
);
|
||||
|
||||
public function check_product($prestashop_product_id,$prestashop_product_attribute_id){
|
||||
$check_erp_id = Db::getInstance()->getRow("SELECT `is_synch`,`erp_product_id` from `" . _DB_PREFIX_ . "erp_product_merge` where `prestashop_product_id`=".$prestashop_product_id." and `prestashop_product_attribute_id`=".$prestashop_product_attribute_id."");
|
||||
if ($check_erp_id['erp_product_id'] > 0) {
|
||||
if ($check_erp_id['is_synch'] == 0)
|
||||
return array(
|
||||
-1,
|
||||
$check_erp_id['erp_product_id']
|
||||
);
|
||||
else
|
||||
return array(
|
||||
$check_erp_id['erp_product_id']
|
||||
);
|
||||
} else
|
||||
return array(
|
||||
0
|
||||
);
|
||||
}
|
||||
public function product_details($id){
|
||||
$product_info = Db::getInstance()->getRow("SELECT * from `" . _DB_PREFIX_ . "erp_product_merge` where `id`=" . $id . "");
|
||||
if ($product_info)
|
||||
return $product_info;
|
||||
}
|
||||
|
||||
public function update_product($userId,$client,$ps_product_id,$ps_product_attr_id,$erp_product_id,$image_variant,$default_code,$ean13,$attr_value_ids,$price_extra){
|
||||
$context = array(
|
||||
'prestashop_variant' => new xmlrpcval('prestashop_variant', "string"),
|
||||
'presta_id' => new xmlrpcval($ps_product_id, "string"),
|
||||
'presta_attr_id' => new xmlrpcval($ps_product_attr_id, "string"),
|
||||
'erp_product_id' => new xmlrpcval($erp_product_id, "int"),
|
||||
'create_product_variant' => new xmlrpcval('create_product_variant', "string"),
|
||||
'prestashop' => new xmlrpcval('prestashop', "string"),
|
||||
);
|
||||
$erp_product_key = array(
|
||||
new xmlrpcval($erp_product_id, 'int')
|
||||
);
|
||||
$arrayVal = array(
|
||||
'default_code' => new xmlrpcval($default_code,"string"),
|
||||
'image_variant' => new xmlrpcval($image_variant,"string"),
|
||||
'ps_attributes' => new xmlrpcval($attr_value_ids,"struct"),
|
||||
'wk_extra_price' => new xmlrpcval($price_extra,"double"),
|
||||
);
|
||||
if ($ean13 != ''){
|
||||
$arrayVal['ean13'] = new xmlrpcval($ean13,"string");
|
||||
}
|
||||
|
||||
$msg_server = new xmlrpcmsg('execute');
|
||||
$msg_server->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_server->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_server->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_server->addParam(new xmlrpcval("product.product", "string"));
|
||||
$msg_server->addParam(new xmlrpcval("write", "string"));
|
||||
$msg_server->addParam(new xmlrpcval($erp_product_key, "array"));
|
||||
$msg_server->addParam(new xmlrpcval($arrayVal, "struct"));
|
||||
$msg_server->addParam(new xmlrpcval($context, "struct"));
|
||||
$resp = $client->send($msg_server);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
return array(
|
||||
'error_message' => $error_message,
|
||||
'erp_id' => -1,
|
||||
'is_error'=>True
|
||||
);
|
||||
} else {
|
||||
Db::getInstance()->execute("UPDATE `" . _DB_PREFIX_ . "erp_product_merge` set `is_synch`=1 where `erp_product_id`=". $erp_product_id. "");
|
||||
return array(
|
||||
'erp_id' => $erp_product_id,
|
||||
'is_error'=>False
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function create_product($userId,$client,$presta_user,$ps_product_id,$ps_product_attr_id,$erp_template_id,$image_variant,$default_code,$ean13,$attr_value_ids,$price_extra){
|
||||
$context = array(
|
||||
'prestashop_variant' => new xmlrpcval('prestashop_variant', "string"),
|
||||
'presta_id' => new xmlrpcval($ps_product_id, "string"),
|
||||
'presta_attr_id' => new xmlrpcval($ps_product_attr_id, "string"),
|
||||
'create_product_variant' => new xmlrpcval('create_product_variant', "string")
|
||||
);
|
||||
|
||||
$arrayVal = array(
|
||||
'product_tmpl_id' => new xmlrpcval($erp_template_id,"int"),
|
||||
'default_code' => new xmlrpcval($default_code,"string"),
|
||||
'image_variant' => new xmlrpcval($image_variant,"string"),
|
||||
'ps_attributes' => new xmlrpcval($attr_value_ids,"struct"),
|
||||
'wk_extra_price' => new xmlrpcval($price_extra,"double"),
|
||||
);
|
||||
if ($ean13 != ''){
|
||||
$arrayVal['ean13'] = new xmlrpcval($ean13,"string");
|
||||
}
|
||||
|
||||
$msg_server = new xmlrpcmsg('execute');
|
||||
$msg_server->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_server->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_server->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_server->addParam(new xmlrpcval("product.product", "string"));
|
||||
$msg_server->addParam(new xmlrpcval("create", "string"));
|
||||
$msg_server->addParam(new xmlrpcval($arrayVal, "struct"));
|
||||
$msg_server->addParam(new xmlrpcval($context, "struct"));
|
||||
$resp = $client->send($msg_server);
|
||||
// echo "<pre>";
|
||||
// var_dump($arrayVal);
|
||||
// var_dump($resp);
|
||||
// die;
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
return array(
|
||||
'error_message' => $error_message,
|
||||
'erp_id' => -1
|
||||
);
|
||||
} else {
|
||||
$val = $resp->value()->me;
|
||||
$erp_product_id = $val['int'];
|
||||
$this->addto_ps_merge($erp_template_id,$ps_product_id,$erp_product_id,$ps_product_attr_id,$presta_user);
|
||||
return array(
|
||||
'erp_id' => $erp_product_id
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function addto_ps_merge($erp_template_id,$ps_product_id,$erp_product_id,$ps_product_attr_id,$presta_user = 'Front End')
|
||||
{
|
||||
$data = array(
|
||||
'erp_product_id' => $erp_product_id,
|
||||
'prestashop_product_id' => $ps_product_id,
|
||||
'prestashop_product_attribute_id' => $ps_product_attr_id,
|
||||
'erp_template_id' => $erp_template_id,
|
||||
'created_by' => $presta_user,
|
||||
);
|
||||
Db::getInstance()->insert('erp_product_merge', $data);
|
||||
Db::getInstance()->delete('erp_product_merge','erp_template_id='.$erp_template_id.' and prestashop_product_attribute_id=0');
|
||||
}
|
||||
|
||||
public function check_all_products($userId, $client, $presta_user,$id_product=False,$id_attribute=False){
|
||||
$template = new ErpProductTemplate();
|
||||
$id_lang = (int)Configuration::get('PS_LANG_DEFAULT');
|
||||
$is_error = 0;
|
||||
$error_message = '';
|
||||
$ids = '';
|
||||
$query = "SELECT p.`id_shop_default`,p.`id_product`,p.`id_category_default`,p.`price`,p.`ean13`,p.`reference`,p.`id_tax_rules_group`,pl.`name`,pl.`description`, pl.`id_shop`,pl.`link_rewrite`,pl.`description_short`,IFNULL(pa.id_product_attribute,0) as id_product_attribute,erp.is_synch,erp.erp_product_id
|
||||
FROM ". _DB_PREFIX_."product p
|
||||
LEFT JOIN `"._DB_PREFIX_."product_lang` pl ON (pl.`id_product` = p.`id_product` and pl.id_shop=p.id_shop_default and pl.id_lang=".$id_lang.")
|
||||
LEFT JOIN `"._DB_PREFIX_."product_attribute` pa ON (p.`id_product` = pa.`id_product`)
|
||||
LEFT JOIN `"._DB_PREFIX_."erp_product_merge` erp ON (erp.`prestashop_product_id` = p.id_product AND erp.prestashop_product_attribute_id = IFNULL(pa.id_product_attribute,0))
|
||||
WHERE (erp.`is_synch` IS NULL or erp.`is_synch` =0)";
|
||||
|
||||
if ($id_product)
|
||||
$query = $query." and p.`id_product` = ".$id_product;
|
||||
if ($id_attribute)
|
||||
$query = $query." and pa.`id_product_attribute` = ".$id_attribute;
|
||||
$data = Db::getInstance()->executeS($query);
|
||||
|
||||
if (count($data) == 0) {
|
||||
//Nothing to export
|
||||
return array(
|
||||
'is_error' => $is_error,
|
||||
'error_message' => $error_message,
|
||||
'value' => 0,
|
||||
'ids' => $ids
|
||||
);
|
||||
}
|
||||
|
||||
foreach ($data as $product_data){
|
||||
$erp_template_id = $template->check_specific_template($product_data['id_product'],$userId, $client,$presta_user,$product_data['id_product_attribute']);
|
||||
if ($erp_template_id > 0){
|
||||
if ($product_data['id_product_attribute']!=0){
|
||||
$attr_detail=$this->getAttributesDetails($id_lang,$product_data['id_product_attribute']);
|
||||
$price_extra = (float)$attr_detail[0]['attribute_price'];
|
||||
$product_quantity=$attr_detail[0]['attribute_quantity'];
|
||||
$image_variant = $template->get_image_link($product_data['id_product'], $product_data['link_rewrite'],$attr_detail[0]['id_image']);
|
||||
$reference = urlencode($attr_detail[0]['reference']);
|
||||
$ean13 = $this->validate_ean13($attr_detail[0]['ean13']);
|
||||
|
||||
$check_all_attribute = $this->getAllERPAttributesID($product_data['id_product'],$product_data['id_product_attribute'],$userId, $client, $presta_user);
|
||||
if (!$check_all_attribute['status']){
|
||||
$is_error = 1;
|
||||
$error_message .= 'Error in creating Attribute Values for this product,';
|
||||
$ids .= $product_data['id_product'].',';
|
||||
continue ;
|
||||
}
|
||||
else {
|
||||
$attr_value_ids = $check_all_attribute['erp_attr_values_ids'];
|
||||
}
|
||||
if ($product_data['is_synch']==NULL){
|
||||
$create = $this->create_product($userId,$client,$presta_user,$product_data['id_product'],$product_data['id_product_attribute'],$erp_template_id,$image_variant,$reference,$ean13,$attr_value_ids,$price_extra);
|
||||
if ($create['erp_id'] < 0){
|
||||
$is_error = 1;
|
||||
$error_message .= $create['error_message'] . ',';
|
||||
$ids .= $product_data['id_product'] . ',';
|
||||
}else{
|
||||
$this->create_product_quantity($create['erp_id'],$product_quantity,$userId, $client);
|
||||
}
|
||||
}
|
||||
else{
|
||||
$update = $this->update_product($userId,$client,$product_data['id_product'],$product_data['id_product_attribute'],$product_data['erp_product_id'],$image_variant,$reference,$ean13,$attr_value_ids,$price_extra);
|
||||
if ($update['is_error']) {
|
||||
$is_error = 1;
|
||||
$error_message .= $update['error_message'].',';
|
||||
$ids .= $product_data['id_product'].',';
|
||||
}else{
|
||||
// $this->create_product_quantity($product_data['erp_product_id'],$product_quantity,$userId, $client);
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
if ($product_data['is_synch']=='0'){
|
||||
// $quantity = StockAvailable::getQuantityAvailableByProduct($product_data['id_product']);
|
||||
// $this->create_product_quantity($product_data['erp_product_id'],$quantity,$userId, $client);
|
||||
Db::getInstance()->execute("UPDATE `" . _DB_PREFIX_ . "erp_product_merge` set `is_synch`=1 where `erp_product_id`=".$product_data['erp_product_id']."");
|
||||
|
||||
}
|
||||
continue ;
|
||||
}
|
||||
}
|
||||
else{
|
||||
$is_error = 1;
|
||||
$error_message .= 'Error in creating Template for this product,';
|
||||
$ids .= $product_data['id_product'].',';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return array(
|
||||
'is_error' => $is_error,
|
||||
'error_message' => $error_message,
|
||||
'value' => 1,
|
||||
'ids' => $ids
|
||||
);
|
||||
}
|
||||
|
||||
public function create_product_quantity($erp_product_id,$product_quantity,$userId, $client) {
|
||||
$arrayVal = array(
|
||||
'product_id' => new xmlrpcval($erp_product_id, "int"),
|
||||
'new_quantity' => new xmlrpcval($product_quantity, "string"),
|
||||
);
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("force.done", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("update_quantity", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($arrayVal, "struct"));
|
||||
$resp = $client->send($msg_ser);
|
||||
if ($resp->faultCode()) {
|
||||
$log = new pob_log();
|
||||
$log->logMessage(__FILE__,__LINE__,$resp->raw_data,"CRITICAL");
|
||||
return;
|
||||
}
|
||||
else{
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function check_specific_product($ps_product_id,$ps_product_attr_id,$userId, $client,$presta_user='Front End'){
|
||||
$template = new ErpProductTemplate();
|
||||
$erp = $this->check_product($ps_product_id,$ps_product_attr_id);
|
||||
if ($erp[0] <= 0){
|
||||
$erp_template_id = $template->check_specific_template($ps_product_id,$userId, $client,$presta_user,$ps_product_attr_id);
|
||||
if ($erp_template_id > 0){
|
||||
$id_lang = (int)Configuration::get('PS_LANG_DEFAULT');
|
||||
$q = "SELECT p.* , pl.`link_rewrite`
|
||||
FROM ". _DB_PREFIX_."product p
|
||||
LEFT JOIN `"._DB_PREFIX_."product_lang` pl ON (pl.`id_product` = p.`id_product` and pl.`id_shop`=p.`id_shop_default` and pl.`id_lang`=".$id_lang.") where p.id_product=".$ps_product_id;
|
||||
|
||||
$product_data = Db::getInstance()->getRow($q);
|
||||
if ($ps_product_attr_id!=0){
|
||||
$attr_detail=$this->getAttributesDetails($id_lang,$ps_product_attr_id);
|
||||
$product_quantity=$attr_detail[0]['attribute_quantity'];
|
||||
$price_extra = $attr_detail[0]['attribute_price'];
|
||||
$image_variant = $template->get_image_link($ps_product_id, $product_data['link_rewrite'],$attr_detail[0]['id_image']);
|
||||
$reference = urlencode($attr_detail[0]['reference']);
|
||||
$ean13 = $this->validate_ean13($attr_detail[0]['ean13']);
|
||||
|
||||
$check_all_attribute = $this->getAllERPAttributesID($ps_product_id,$ps_product_attr_id,$userId, $client, $presta_user);
|
||||
if (!$check_all_attribute['status']){
|
||||
return -1;
|
||||
}
|
||||
else{
|
||||
$attr_value_ids = $check_all_attribute['erp_attr_values_ids'];
|
||||
}
|
||||
if ($erp[0] == 0){
|
||||
$create = $this->create_product($userId,$client,$presta_user,$ps_product_id,$ps_product_attr_id,$erp_template_id,$image_variant,$reference,$ean13,$attr_value_ids,$price_extra);
|
||||
|
||||
if ($create['erp_id'] < 0){
|
||||
$erp_product_id=-1;
|
||||
}
|
||||
else{
|
||||
$erp_product_id=$create['erp_id'];
|
||||
$this->create_product_quantity($create['erp_id'],$product_quantity,$userId, $client);
|
||||
}
|
||||
}
|
||||
else{
|
||||
$erp_product_id=$erp[1];
|
||||
$this->update_product($userId,$client,$ps_product_id,$ps_product_attr_id,$erp_product_id,$image_variant,$reference,$ean13,$attr_value_ids,$price_extra);
|
||||
// $this->create_product_quantity($erp_product_id,$product_quantity,$userId, $client);
|
||||
}
|
||||
}
|
||||
else{
|
||||
//update product if needed
|
||||
if ($erp[0] < 0){
|
||||
$product_quantity=StockAvailable::getQuantityAvailableByProduct($ps_product_id);
|
||||
$image_variant = $template->get_image_link($ps_product_id, $product_data['link_rewrite']);
|
||||
$reference = urlencode($product_data['reference']);
|
||||
$ean13 = $this->validate_ean13($product_data['ean13']);
|
||||
|
||||
|
||||
$this->update_product($userId,$client,$ps_product_id,$ps_product_attr_id,$erp[1],$image_variant,$reference,$ean13,$attr_value_ids);
|
||||
// $this->create_product_quantity($erp[1],$product_quantity,$userId, $client);
|
||||
$erp_product_id = $erp[1];
|
||||
}else{
|
||||
|
||||
$data = Db::getInstance()->getRow("SELECT erp_product_id from ". _DB_PREFIX_."erp_product_merge where erp_template_id=".$erp_template_id." and prestashop_product_attribute_id=0");
|
||||
$erp_product_id=$data['erp_product_id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
$erp_product_id=-1;
|
||||
}
|
||||
else
|
||||
$erp_product_id=$erp[0];
|
||||
return $erp_product_id;
|
||||
}
|
||||
|
||||
|
||||
public function getAllERPAttributesID($ps_product_id,$ps_product_attr_id,$userId, $client, $presta_user){
|
||||
$status=True;
|
||||
$attr_value = new ErpProductAttributeValue();
|
||||
$attr_value_ids = array();
|
||||
$data = $this->getAttributesParams($ps_product_id,$ps_product_attr_id);
|
||||
foreach ($data as $attr_data){
|
||||
$erp = $attr_value->check_specific_attribute_value($userId, $client, $attr_data['id_attribute_group'],$attr_data['id_attribute'], $presta_user);
|
||||
if ($erp['erp_attr_value_id']==-1)
|
||||
$status=False;
|
||||
else{
|
||||
$price_impact = Db::getInstance()->getRow("SELECT price from `"._DB_PREFIX_."product_attribute` where `id_product`=".$ps_product_id." and `id_product_attribute`=".$ps_product_attr_id."");
|
||||
|
||||
if (!$price_impact)
|
||||
$price_impact = 0.0;
|
||||
else
|
||||
$price_impact = $price_impact['price'];
|
||||
$attr_value_ids[$erp['erp_attribute_id']] = new xmlrpcval(array(
|
||||
new xmlrpcval($erp['erp_attr_value_id'],"int"),
|
||||
new xmlrpcval($price_impact,"double")
|
||||
), "array");
|
||||
}
|
||||
}
|
||||
return array('status'=>$status, 'erp_attr_values_ids'=>$attr_value_ids);
|
||||
}
|
||||
|
||||
public function getAttributesParams($id_product, $id_product_attribute){
|
||||
$query = '
|
||||
SELECT DISTINCT a.`id_attribute`,a.`id_attribute_group`
|
||||
FROM `'._DB_PREFIX_.'attribute` a
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al
|
||||
ON (al.`id_attribute` = a.`id_attribute` AND al.`id_lang` = '.(int)Context::getContext()->language->id.')
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac
|
||||
ON (pac.`id_attribute` = a.`id_attribute`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa
|
||||
ON (pa.`id_product_attribute` = pac.`id_product_attribute`)
|
||||
'.Shop::addSqlAssociation('product_attribute', 'pa').'
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl
|
||||
ON (a.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)Context::getContext()->language->id.')
|
||||
WHERE pa.`id_product` = '.(int)$id_product.'
|
||||
AND pac.`id_product_attribute` = '.(int)$id_product_attribute;
|
||||
$result = Db::getInstance()->executeS($query);
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function getAttributesDetails($id_lang,$id_attribute,$attribute_value_separator = ' - ', $attribute_separator = ', '){
|
||||
$data = Db::getInstance()->executeS('SELECT a.`id_attribute`, a.`id_attribute_group`,pac.id_product_attribute, GROUP_CONCAT(agl.`name`, \''.pSQL($attribute_value_separator).'\',al.`name` ORDER BY agl.`id_attribute_group` SEPARATOR \''.pSQL($attribute_separator).'\') as attribute_name,attr.price as attribute_price,attr.reference,attr.ean13,stk.quantity as attribute_quantity,pai.`id_image`
|
||||
FROM `'._DB_PREFIX_.'product_attribute_combination` pac
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute` a ON a.`id_attribute` = pac.`id_attribute`
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute_group` ag ON ag.`id_attribute_group` = a.`id_attribute_group`
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute_lang` al ON (a.`id_attribute` = al.`id_attribute` AND al.`id_lang` = '.(int)$id_lang.')
|
||||
LEFT JOIN `'._DB_PREFIX_.'attribute_group_lang` agl ON (ag.`id_attribute_group` = agl.`id_attribute_group` AND agl.`id_lang` = '.(int)$id_lang.')
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute` attr ON (pac.id_product_attribute = attr.id_product_attribute)
|
||||
LEFT JOIN `'._DB_PREFIX_.'stock_available` stk ON (attr.id_product = stk.id_product and attr.id_product_attribute = stk.id_product_attribute)
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute_image` pai ON (pai.`id_product_attribute`= '.$id_attribute.')
|
||||
WHERE pac.id_product_attribute = '.$id_attribute.'') ;
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function validate_ean13($barcode){
|
||||
// check to see if barcode is 13 digits long
|
||||
if (!preg_match("/^[0-9]{13}$/", $barcode)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$digits = $barcode;
|
||||
|
||||
// 1. Add the values of the digits in the
|
||||
// even-numbered positions: 2, 4, 6, etc.
|
||||
$even_sum = $digits[1] + $digits[3] + $digits[5] +
|
||||
$digits[7] + $digits[9] + $digits[11];
|
||||
|
||||
// 2. Multiply this result by 3.
|
||||
$even_sum_three = $even_sum * 3;
|
||||
|
||||
// 3. Add the values of the digits in the
|
||||
// odd-numbered positions: 1, 3, 5, etc.
|
||||
$odd_sum = $digits[0] + $digits[2] + $digits[4] +
|
||||
$digits[6] + $digits[8] + $digits[10];
|
||||
|
||||
// 4. Sum the results of steps 2 and 3.
|
||||
$total_sum = $even_sum_three + $odd_sum;
|
||||
|
||||
// 5. The check character is the smallest number which,
|
||||
// when added to the result in step 4, produces a multiple of 10.
|
||||
$next_ten = (ceil($total_sum / 10)) * 10;
|
||||
$check_digit = $next_ten - $total_sum;
|
||||
|
||||
// if the check digit and the last digit of the
|
||||
// barcode are OK return true;
|
||||
if ($check_digit == $digits[12]) {
|
||||
return $barcode;
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
}
|
327
modules/prestaerp/classes/ErpProductTemplate.php
Normal file
327
modules/prestaerp/classes/ErpProductTemplate.php
Normal file
@ -0,0 +1,327 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
|
||||
class ErpProductTemplate extends ObjectModel{
|
||||
|
||||
public $presta_product_id;
|
||||
public $erp_template_id;
|
||||
public $translate_state ;
|
||||
public $color;
|
||||
public $created_by ;
|
||||
public $is_synch ;
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'erp_product_template_merge',
|
||||
'primary' => 'id',
|
||||
'fields' => array(
|
||||
'erp_template_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'presta_product_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'created_by' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'translate_state' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'color' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'is_synch' => array('type' => self::TYPE_BOOL),
|
||||
),
|
||||
);
|
||||
|
||||
public function check_template($ps_product_id){
|
||||
$check_erp_id = Db::getInstance()->getRow("SELECT `is_synch`,`erp_template_id` from `" . _DB_PREFIX_ . "erp_product_template_merge` where `presta_product_id`=" . $ps_product_id . "");
|
||||
if ($check_erp_id['erp_template_id'] > 0) {
|
||||
if ($check_erp_id['is_synch'] == 0)
|
||||
return array(
|
||||
-1,
|
||||
$check_erp_id['erp_template_id']
|
||||
);
|
||||
else
|
||||
return array(
|
||||
$check_erp_id['erp_template_id']
|
||||
);
|
||||
} else{
|
||||
return array(
|
||||
0
|
||||
);
|
||||
}
|
||||
}
|
||||
public function product_details($id){
|
||||
$product_info = Db::getInstance()->getRow("SELECT * from `" . _DB_PREFIX_ . "erp_product_template_merge` where `id`=" . $id . "");
|
||||
if ($product_info)
|
||||
return $product_info;
|
||||
return false;
|
||||
}
|
||||
|
||||
public function create_template($userId, $client, $name, $description, $description_short, $erp_category_id, $base_price, $wholesale_price, $weight, $image, $ps_product_id, $reference, $presta_user, $ean13, $type = "product"){
|
||||
$context = array(
|
||||
'prestashop' => new xmlrpcval('prestashop', "string"),
|
||||
'presta_id' => new xmlrpcval($ps_product_id, "string"),
|
||||
);
|
||||
$arrayVal = array(
|
||||
'name' => new xmlrpcval($name, "string"),
|
||||
'description' => new xmlrpcval($description, "string"),
|
||||
'description_sale' => new xmlrpcval($description_short, "string"),
|
||||
'type' => new xmlrpcval($type, "string"),
|
||||
'categ_id' => new xmlrpcval($erp_category_id, "string"),
|
||||
'list_price' => new xmlrpcval($base_price, "double"),
|
||||
'standard_price' => new xmlrpcval($wholesale_price, "double"),
|
||||
'weight' => new xmlrpcval($weight, "double"),
|
||||
'weight_net' => new xmlrpcval($weight, "double"),
|
||||
'default_code' => new xmlrpcval($reference, "string"),
|
||||
);
|
||||
if ($ean13 != ''){
|
||||
$arrayVal['ean13'] = new xmlrpcval($ean13, "string");
|
||||
}
|
||||
if ($image){
|
||||
$arrayVal['image'] = new xmlrpcval($image, "string");
|
||||
}
|
||||
|
||||
|
||||
$msg_server = new xmlrpcmsg('execute');
|
||||
$msg_server->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_server->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_server->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_server->addParam(new xmlrpcval("product.template", "string"));
|
||||
$msg_server->addParam(new xmlrpcval("create", "string"));
|
||||
$msg_server->addParam(new xmlrpcval($arrayVal, "struct"));
|
||||
$msg_server->addParam(new xmlrpcval($context, "struct"));
|
||||
$resp = $client->send($msg_server);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
return array(
|
||||
'error_message' => $error_message,
|
||||
'erp_id' => -1,
|
||||
'product_id' => -1
|
||||
);
|
||||
} else {
|
||||
$temp_dic = $resp->value()->me['struct'];
|
||||
$erp_template_id = $temp_dic['template_id']->me['int'];
|
||||
$erp_product_id = $temp_dic['product_id']->me['int'];
|
||||
$this->addto_ps_merge($erp_template_id, $ps_product_id, $erp_product_id, $presta_user);
|
||||
return array(
|
||||
'erp_id' => $erp_template_id,
|
||||
'product_id' => $erp_product_id
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function update_template($userId, $client, $name, $description, $description_short, $erp_category_id, $base_price, $wholesale_price, $weight, $image, $ps_product_id, $erp_template_id, $reference, $ean13, $type = "product"){
|
||||
$context = array(
|
||||
'prestashop' => new xmlrpcval('prestashop', "string"),
|
||||
'presta_id' => new xmlrpcval($ps_product_id, "string")
|
||||
);
|
||||
$erp_template_key = array(
|
||||
new xmlrpcval($erp_template_id, 'int')
|
||||
);
|
||||
|
||||
$arrayVal = array(
|
||||
'name' => new xmlrpcval($name, "string"),
|
||||
'description' => new xmlrpcval($description, "string"),
|
||||
'description_sale' => new xmlrpcval($description_short, "string"),
|
||||
'type' => new xmlrpcval($type, "string"),
|
||||
'categ_id' => new xmlrpcval($erp_category_id, "string"),
|
||||
'list_price' => new xmlrpcval($base_price, "double"),
|
||||
'standard_price' => new xmlrpcval($wholesale_price, "double"),
|
||||
'weight' => new xmlrpcval($weight, "double"),
|
||||
'weight_net' => new xmlrpcval($weight, "double"),
|
||||
'image' => new xmlrpcval($image, "string"),
|
||||
'default_code' => new xmlrpcval($reference, "string"),
|
||||
|
||||
);
|
||||
if ($ean13 != ''){
|
||||
$arrayVal['ean13'] = new xmlrpcval($ean13, "string");
|
||||
}
|
||||
|
||||
$msg_server = new xmlrpcmsg('execute');
|
||||
$msg_server->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_server->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_server->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_server->addParam(new xmlrpcval("product.template", "string"));
|
||||
$msg_server->addParam(new xmlrpcval("write", "string"));
|
||||
$msg_server->addParam(new xmlrpcval($erp_template_key, "array"));
|
||||
$msg_server->addParam(new xmlrpcval($arrayVal, "struct"));
|
||||
$msg_server->addParam(new xmlrpcval($context, "struct"));
|
||||
$resp = $client->send($msg_server);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
return array(
|
||||
'error_message' => $error_message,
|
||||
'erp_id' => $erp_template_id,
|
||||
'is_error'=>True
|
||||
);
|
||||
} else {
|
||||
Db::getInstance()->execute("UPDATE `" . _DB_PREFIX_ . "erp_product_template_merge` set `is_synch`=1 where `erp_template_id`=" . $erp_template_id . "");
|
||||
return array(
|
||||
'erp_id' => $erp_template_id,
|
||||
'is_error'=>False
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function addto_ps_merge($erp_template_id, $ps_product_id, $erp_product_id, $presta_user = 'Front End'){
|
||||
$data = array(
|
||||
'erp_template_id' => $erp_template_id,
|
||||
'presta_product_id' => $ps_product_id,
|
||||
'created_by' => $presta_user,
|
||||
);
|
||||
Db::getInstance()->insert('erp_product_template_merge', $data);
|
||||
$data = array(
|
||||
'erp_product_id' => $erp_product_id,
|
||||
'prestashop_product_id' => $ps_product_id,
|
||||
'prestashop_product_attribute_id' => 0,
|
||||
'erp_template_id' => $erp_template_id,
|
||||
'created_by' => $presta_user,
|
||||
);
|
||||
Db::getInstance()->insert('erp_product_merge', $data);
|
||||
}
|
||||
|
||||
public function validate_ean13($barcode){
|
||||
// check to see if barcode is 13 digits long
|
||||
if (!preg_match("/^[0-9]{13}$/", $barcode)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$digits = $barcode;
|
||||
|
||||
// 1. Add the values of the digits in the
|
||||
// even-numbered positions: 2, 4, 6, etc.
|
||||
$even_sum = $digits[1] + $digits[3] + $digits[5] +
|
||||
$digits[7] + $digits[9] + $digits[11];
|
||||
|
||||
// 2. Multiply this result by 3.
|
||||
$even_sum_three = $even_sum * 3;
|
||||
|
||||
// 3. Add the values of the digits in the
|
||||
// odd-numbered positions: 1, 3, 5, etc.
|
||||
$odd_sum = $digits[0] + $digits[2] + $digits[4] +
|
||||
$digits[6] + $digits[8] + $digits[10];
|
||||
|
||||
// 4. Sum the results of steps 2 and 3.
|
||||
$total_sum = $even_sum_three + $odd_sum;
|
||||
|
||||
// 5. The check character is the smallest number which,
|
||||
// when added to the result in step 4, produces a multiple of 10.
|
||||
$next_ten = (ceil($total_sum / 10)) * 10;
|
||||
$check_digit = $next_ten - $total_sum;
|
||||
|
||||
// if the check digit and the last digit of the
|
||||
// barcode are OK return true;
|
||||
if ($check_digit == $digits[12]) {
|
||||
return $barcode;
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
public function check_specific_template($ps_product_id, $userId, $client, $presta_user='Front End', $id_product_attribute=-1){
|
||||
$erp = $this->check_template($ps_product_id);
|
||||
if ($erp[0] <= 0){
|
||||
$id_lang = (int)Configuration::get('PS_LANG_DEFAULT');
|
||||
$category = new ErpProductCategory();
|
||||
$product_data = Db::getInstance()->getRow("SELECT p.`reference`,p.`id_product`,p.`id_category_default`,p.`ean13`,p.`price`,p.`wholesale_price`,p.`weight`,pl.`name`,pl.`description`,pl.`link_rewrite`,pl.`description_short`
|
||||
FROM "._DB_PREFIX_."product p
|
||||
LEFT JOIN `"._DB_PREFIX_."product_lang` pl ON (pl.`id_product` = p.`id_product` and pl.id_shop=p.id_shop_default and pl.id_lang=".$id_lang.")
|
||||
WHERE p.`id_product`=".$ps_product_id."");
|
||||
|
||||
$erp_category_id = $category->check_specific_category($product_data['id_category_default'], $userId, $client, $presta_user);
|
||||
$name = urlencode($product_data['name']);
|
||||
$description = urlencode($product_data['description']);
|
||||
$description_short = urlencode($product_data['description_short']);
|
||||
$base_price = $product_data['price'];
|
||||
$wholesale_price = $product_data['wholesale_price'];
|
||||
$weight = $product_data['weight'];
|
||||
$ean13 = $this->validate_ean13($product_data['ean13']);
|
||||
$image = $this->get_image_link($product_data['id_product'], $product_data['link_rewrite']);
|
||||
|
||||
if ($erp[0] == 0) {
|
||||
$create = $this->create_template($userId, $client, $name, $description, $description_short, $erp_category_id, $base_price, $wholesale_price, $weight, $image, $product_data['id_product'], $product_data['reference'], $presta_user, $ean13);
|
||||
$erp_template_id=$create['erp_id'];
|
||||
$erp_product_id = $create['product_id'];
|
||||
if ($id_product_attribute == 0){
|
||||
$quantity = StockAvailable::getQuantityAvailableByProduct($ps_product_id);
|
||||
$this->create_product_quantity($erp_product_id, $quantity, $userId, $client);
|
||||
}
|
||||
}
|
||||
if ($erp[0] < 0) {
|
||||
$erp_template_id = $erp[1];
|
||||
$this->update_template($userId, $client, $name, $description, $description_short, $erp_category_id, $base_price, $wholesale_price, $weight, $image, $product_data['id_product'], $erp_template_id, $product_data['reference'], $ean13);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
$erp_template_id = $erp[0];
|
||||
return $erp_template_id;
|
||||
}
|
||||
|
||||
|
||||
public function get_image_link($id_product, $link_rewrite,$id_image=False){
|
||||
$protocol = Tools::getCurrentUrlProtocolPrefix();
|
||||
if (!$id_image){
|
||||
$prd_img = Db::getInstance()->getRow("SELECT `id_image` from `" . _DB_PREFIX_ . "image` where `id_product`=" . $id_product . " and `cover`=1");
|
||||
$id_image=$prd_img['id_image'];
|
||||
}
|
||||
$link = new LinkCore();
|
||||
$image_url = $protocol . $link->getImageLink($link_rewrite, $id_image, 'home_default');
|
||||
if (Tools::file_get_contents($image_url)) {
|
||||
$content = Tools::file_get_contents($image_url);
|
||||
$imageData = base64_encode($content);
|
||||
} else {
|
||||
$image_url = $protocol . $link->getImageLink($link_rewrite, $id_product.'-'.$id_image, 'home_default');
|
||||
if (Tools::file_get_contents($image_url)) {
|
||||
$content = Tools::file_get_contents($image_url);
|
||||
$imageData = base64_encode($content);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return $imageData;
|
||||
}
|
||||
|
||||
|
||||
public function create_product_quantity($erp_product_id, $product_quantity, $userId, $client){
|
||||
$arrayVal = array(
|
||||
'product_id' => new xmlrpcval($erp_product_id, "int"),
|
||||
'new_quantity' => new xmlrpcval($product_quantity, "string"),
|
||||
'erp_instance_id' => new xmlrpcval(Configuration::getGlobalValue("erp_instance_conf_id"), "int"),
|
||||
);
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("force.done", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("update_quantity", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($arrayVal, "struct"));
|
||||
$resp = $client->send($msg_ser);
|
||||
if ($resp->faultCode()){
|
||||
$log = new pob_log();
|
||||
$log->logMessage(__FILE__,__LINE__,$resp->raw_data,"CRITICAL");
|
||||
return;
|
||||
}
|
||||
else{
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
1
modules/prestaerp/classes/ErpState.php
Normal file
1
modules/prestaerp/classes/ErpState.php
Normal file
@ -0,0 +1 @@
|
||||
<?php
/*
* 2007-2012 PrestaShop
* NOTICE OF LICENSE
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
* DISCLAIMER
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
* @version Release: $Revision: 14011 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
class ErpState{
private function search_state($code, $userId, $client){
$key = array(
new xmlrpcval(array(
new xmlrpcval("code", "string"),
new xmlrpcval("=", "string"),
new xmlrpcval($code, "string")
), "array")
);
$msg_ser = new xmlrpcmsg('execute');
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
$msg_ser->addParam(new xmlrpcval($userId, "int"));
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
$msg_ser->addParam(new xmlrpcval("res.country.state", "string"));
$msg_ser->addParam(new xmlrpcval("search", "string"));
$msg_ser->addParam(new xmlrpcval($key, "array"));
$resp = $client->send($msg_ser);
if (!$resp->faultCode()) {
$val_ser = $resp->value();
$ids = $val_ser->scalarval();
$id = $ids[0]->me;
if ($id > 0)
return $id['int'];
else
return 0;
}
else{
$log = new pob_log();
$log->logMessage(__FILE__,__LINE__,$resp->raw_data,"CRITICAL");
return 0;
}
}
private function create_state($userId, $client, $code, $name, $id_country){
$key = array(
'name' => new xmlrpcval($name, "string"),
'code' => new xmlrpcval($code, "string"),
'country_id' => new xmlrpcval($id_country, "string")
);
$msg_ser = new xmlrpcmsg('execute');
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
$msg_ser->addParam(new xmlrpcval($userId, "int"));
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
$msg_ser->addParam(new xmlrpcval("res.country.state", "string"));
$msg_ser->addParam(new xmlrpcval("create", "string"));
$msg_ser->addParam(new xmlrpcval($key, "struct"));
$resp = $client->send($msg_ser);
if (!$resp->faultCode()) {
$st_id = $resp->value()->me;
$state_id = $st_id["int"];
return $state_id;
}
else{
$log = new pob_log();
$log->logMessage(__FILE__,__LINE__,$resp->raw_data,"CRITICAL");
}
}
public function get_state_dtls($id_state){
$state_dtls = Db::getInstance()->getRow("SELECT * from `" . _DB_PREFIX_ . "state` where `id_state`=" . $id_state . "");
return $state_dtls;
}
public function check_state($userId, $client, $iso_code, $name, $id_country){
$erp_state_id = $this->search_state($iso_code, $userId, $client);
if ($erp_state_id > 0)
return $erp_state_id;
else {
$erp_state_id = $this->create_state($userId, $client, $iso_code, $name, $id_country);
return $erp_state_id;
}
}
}
?>
|
212
modules/prestaerp/classes/ErpTaxes.php
Normal file
212
modules/prestaerp/classes/ErpTaxes.php
Normal file
@ -0,0 +1,212 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
|
||||
class ErpTaxes extends ObjectModel{
|
||||
|
||||
public $erp_tax_id;
|
||||
public $prestashop_tax_id;
|
||||
public $rate ;
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'erp_tax_merge',
|
||||
'primary' => 'id',
|
||||
'fields' => array(
|
||||
'erp_tax_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'prestashop_tax_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'rate' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
),
|
||||
);
|
||||
public function tax_details($id){
|
||||
$tax_info = Db::getInstance()->getRow("SELECT * from `" . _DB_PREFIX_ . "erp_tax_merge` where `id`=" . $id . "");
|
||||
if ($tax_info)
|
||||
return $tax_info;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function check_tax($tax_id){
|
||||
$check_tax = Db::getInstance()->getRow("SELECT `is_synch`,`erp_tax_id` from `" . _DB_PREFIX_ . "erp_tax_merge` where `prestashop_tax_id`=" . $tax_id . "");
|
||||
if ($check_tax) {
|
||||
if ($check_tax['is_synch'] == 0)
|
||||
return array(
|
||||
-1,
|
||||
$check_tax['erp_tax_id']
|
||||
);
|
||||
else
|
||||
return array(
|
||||
$check_tax['erp_tax_id']
|
||||
);
|
||||
} else
|
||||
return array(
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
public function create_tax($tax_rate, $prst_tax_id, $client, $userId){
|
||||
$log = new pob_log();
|
||||
$key = array(
|
||||
'name' => new xmlrpcval("PS_" . $tax_rate . "_" . $prst_tax_id . "", "string"),
|
||||
'amount' => new xmlrpcval($tax_rate, "string")
|
||||
);
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("account.tax", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("create", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($key, "struct"));
|
||||
$resp = $client->send($msg_ser);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,$resp->raw_data);
|
||||
return array(
|
||||
'error_message' => $error_message,
|
||||
'erp_id' => -1
|
||||
);
|
||||
} else {
|
||||
$val = $resp->value()->me;
|
||||
$erp_id = $val['int'];
|
||||
return array(
|
||||
'erp_id' => $erp_id
|
||||
);
|
||||
}
|
||||
return $val['int'];
|
||||
}
|
||||
|
||||
public function addto_tax_merge($erp_tax_id, $tax_id, $presta_user = 'Front End'){
|
||||
$db_tax = Db::getInstance()->getRow("SELECT `rate` from `" . _DB_PREFIX_ . "tax` where `id_tax`=" . $tax_id . "");
|
||||
$rate = $db_tax['rate'];
|
||||
$data = array(
|
||||
'erp_tax_id' => $erp_tax_id,
|
||||
'prestashop_tax_id' => $tax_id,
|
||||
'created_by' => $presta_user,
|
||||
'rate'=>$rate
|
||||
);
|
||||
Db::getInstance()->insert('erp_tax_merge', $data);
|
||||
}
|
||||
|
||||
public function update_taxes($erp_tax_id, $tax_rate, $prst_tax_id, $client, $userId){
|
||||
$log = new pob_log();
|
||||
$key = array(
|
||||
'amount' => new xmlrpcval($tax_rate, "string")
|
||||
);
|
||||
$erp_tax_list = array(
|
||||
new xmlrpcval($erp_tax_id, 'int')
|
||||
);
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("account.tax", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("write", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($erp_tax_list, "array"));
|
||||
$msg_ser->addParam(new xmlrpcval($key, "struct"));
|
||||
$resp = $client->send($msg_ser);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,$resp->raw_data,"CRITICAL");
|
||||
return array(
|
||||
'error_message' => $error_message,
|
||||
'value' => False
|
||||
);
|
||||
} else {
|
||||
Db::getInstance()->execute("UPDATE `" . _DB_PREFIX_ . "erp_tax_merge` SET `is_synch`=1 where `prestashop_tax_id`=" . $prst_tax_id . "");
|
||||
return array(
|
||||
'value' => True
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function check_all_taxes($client, $userId, $presta_user){
|
||||
$is_error = 0;
|
||||
$error_message = '';
|
||||
$ids = '';
|
||||
$data = Db::getInstance()->executeS("SELECT `id_tax`,`rate` FROM " . _DB_PREFIX_ . "tax WHERE `id_tax` NOT IN (SELECT `prestashop_tax_id` FROM `" . _DB_PREFIX_ . "erp_tax_merge` WHERE `is_synch` = 1) and active=1 and deleted = 0");
|
||||
|
||||
if (count($data) == 0) {
|
||||
//Nothing to export
|
||||
return array(
|
||||
'is_error' => $is_error,
|
||||
'error_message' => $error_message,
|
||||
'value' => 0,
|
||||
'$ids' => $ids
|
||||
);
|
||||
}
|
||||
foreach ($data as $tax) {
|
||||
$check_tax = $this->check_tax($tax['id_tax']);
|
||||
if ($check_tax[0] <= 0) {
|
||||
$cal_tax = $tax['rate']/100;
|
||||
if ($check_tax[0] == 0) {
|
||||
$create = $this->create_tax($cal_tax, $tax['id_tax'], $client, $userId);
|
||||
if ($create['erp_id'] > 0)
|
||||
$this->addto_tax_merge($create['erp_id'], $tax['id_tax'], $presta_user);
|
||||
else {
|
||||
$is_error = 1;
|
||||
$error_message .= $create['error_message'] . ',';
|
||||
$ids .= $tax['id_tax'] . ',';
|
||||
}
|
||||
} else {
|
||||
$update = $this->update_taxes($check_tax[1], $cal_tax, $tax['id_tax'], $client, $userId);
|
||||
if ($update['value'] != True) {
|
||||
$is_error = 1;
|
||||
$error_message .= $update['error_message'] . ',';
|
||||
$ids .= $tax['id_tax'] . ',';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return array(
|
||||
'is_error' => $is_error,
|
||||
'error_message' => $error_message,
|
||||
'value' => 1,
|
||||
'ids' => $ids
|
||||
);
|
||||
}
|
||||
|
||||
public function check_specific_tax($id_tax, $client, $userId){
|
||||
$check_tax = $this->check_tax($id_tax);
|
||||
if ($check_tax[0] > 0)
|
||||
return $check_tax[0];
|
||||
else {
|
||||
$db_tax = Db::getInstance()->getRow("SELECT `rate` from `" . _DB_PREFIX_ . "tax` where `id_tax`=" . $id_tax . "");
|
||||
$cal_tax = $db_tax['rate']/100;
|
||||
if ($check_tax[0] == 0) {
|
||||
$create = $this->create_tax($cal_tax, $id_tax, $client, $userId);
|
||||
$this->addto_tax_merge($create['erp_id'], $id_tax, 'Front End');
|
||||
return $create['erp_id'];
|
||||
} else {
|
||||
$this->update_taxes($check_tax[1], $cal_tax, $id_tax, $client, $userId);
|
||||
return $check_tax[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function check_specific_rule($id_country, $id_tax_rule_group){
|
||||
$tax_id = Db::getInstance()->getRow("SELECT `id_tax` from `" . _DB_PREFIX_ . "tax_rule` where `id_country`=" . $id_country . " and `id_tax_rules_group`=" . $id_tax_rule_group . "");
|
||||
if ($tax_id['id_tax'] > 0)
|
||||
return $tax_id['id_tax'];
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
42
modules/prestaerp/classes/PrestaerpClassInclude.php
Normal file
42
modules/prestaerp/classes/PrestaerpClassInclude.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
|
||||
include_once 'ErpCarrier.php';
|
||||
include_once 'WkErpConfiguration.php';
|
||||
include_once 'ErpCurrency.php';
|
||||
include_once 'ErpCustomer.php';
|
||||
include_once 'ErpCustomerAddress.php';
|
||||
include_once 'ErpOrders.php';
|
||||
include_once 'ErpPaymentMethod.php';
|
||||
include_once 'ErpProductAttribute.php';
|
||||
include_once 'ErpProductAttributeValue.php';
|
||||
include_once 'ErpProductCategory.php';
|
||||
include_once 'ErpProductCombination.php';
|
||||
include_once 'ErpProductTemplate.php';
|
||||
include_once 'ErpTaxes.php';
|
||||
include_once 'ErpCountry.php';
|
||||
include_once 'ErpState.php';
|
||||
include_once 'pob_log.php';
|
||||
include_once 'xmlrpc.inc';
|
||||
|
||||
?>
|
320
modules/prestaerp/classes/WkErpConfiguration.php
Normal file
320
modules/prestaerp/classes/WkErpConfiguration.php
Normal file
@ -0,0 +1,320 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class WkErpConfiguration extends ObjectModel{
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'configuration',
|
||||
'primary' => 'id_configuration'
|
||||
);
|
||||
|
||||
public function AllowChanges(){
|
||||
if (Configuration::getGlobalValue('ErpUrl') || Configuration::getGlobalValue('ErpPort') || Configuration::getGlobalValue('ErpDatabase')){
|
||||
if ((Configuration::getGlobalValue('ErpUrl')!=Tools::getValue('ErpUrl')) || (Configuration::getGlobalValue('ErpPort')!=Tools::getValue('ErpPort')) || (Configuration::getGlobalValue('ErpDatabase')!=Tools::getValue('ErpDatabase'))){
|
||||
$chk_customer_merge=Db::getInstance()->getRow("select * from `"._DB_PREFIX_."erp_customer_merge`");
|
||||
$chk_address_merge=Db::getInstance()->getRow("select * from `"._DB_PREFIX_."erp_address_merge`");
|
||||
$chk_product_merge=Db::getInstance()->getRow("select * from `"._DB_PREFIX_."erp_product_merge`");
|
||||
$chk_carrier_merge=Db::getInstance()->getRow("select * from `"._DB_PREFIX_."erp_carrier_merge`");
|
||||
$chk_order_merge=Db::getInstance()->getRow("select * from `"._DB_PREFIX_."erp_order_merge`");
|
||||
if ($chk_customer_merge>0 || $chk_address_merge>0 || $chk_product_merge>0|| $chk_carrier_merge>0|| $chk_order_merge>0){
|
||||
$log = new pob_log();
|
||||
$log->logMessage(__FILE__,__LINE__,'OpenERP Credentials Has been updated.','WARN');
|
||||
return True;
|
||||
}
|
||||
else
|
||||
return True;
|
||||
}
|
||||
else
|
||||
return True;
|
||||
}
|
||||
else
|
||||
return True;
|
||||
}
|
||||
|
||||
public function CheckOrderInvoice(){
|
||||
$flag=True;
|
||||
$check_order_confirm = Configuration::getGlobalValue('ErpConfirmOrder');
|
||||
if (!$check_order_confirm){
|
||||
$flag=False;
|
||||
Configuration::updateGlobalValue('ErpAutoInvoice',False);
|
||||
}
|
||||
return $flag;
|
||||
}
|
||||
|
||||
public function CheckMultiShop(){
|
||||
$flag=True;
|
||||
$check_presta_end = Db::getInstance()->getRow("select `id_module` from `"._DB_PREFIX_."module` where `name`='prestaerpmultishop' and `active`=1");
|
||||
if (!$check_presta_end){
|
||||
$flag=False;
|
||||
Configuration::updateGlobalValue('ErpMultiShop',False);
|
||||
}
|
||||
$check_data=$this->CheckErpEnd('prestashop_bridge_multishop');
|
||||
if($check_data['is_error']){
|
||||
$flag=False;
|
||||
Configuration::updateGlobalValue('ErpMultiShop',False);
|
||||
$this->errors[] = Tools::displayError($this->l("Login Error: Invalid OpenERP Information."));
|
||||
}
|
||||
elseif(!$check_data['is_error'] and !$check_data['is_installed']){
|
||||
$flag=False;
|
||||
Configuration::updateGlobalValue('ErpMultiShop',False);
|
||||
|
||||
}
|
||||
return $flag;
|
||||
}
|
||||
|
||||
public function CheckErpEnd($module) {
|
||||
if (!class_exists('xmlrpc_client'))
|
||||
include_once 'xmlrpc.inc';
|
||||
$sock = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl").":".Configuration::getGlobalValue("ErpPort")."/xmlrpc/common");
|
||||
$client = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl").":".Configuration::getGlobalValue("ErpPort")."/xmlrpc/object");
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpUsername"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), 'string'));
|
||||
$response = $sock->send($msg);
|
||||
if (!$response->faultCode()){
|
||||
$condition=array(new xmlrpcval(
|
||||
array(
|
||||
new xmlrpcval('state', "string"),
|
||||
new xmlrpcval('=', "string"),
|
||||
new xmlrpcval('installed', "string")),
|
||||
"array"),
|
||||
new xmlrpcval(
|
||||
array(
|
||||
new xmlrpcval('name', "string"),
|
||||
new xmlrpcval('=', "string"),
|
||||
new xmlrpcval($module, "string")),
|
||||
"array")
|
||||
);
|
||||
$userId = $response->value()->scalarval();
|
||||
$msg1 = new xmlrpcmsg('execute');
|
||||
$msg1->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg1->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg1->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg1->addParam(new xmlrpcval("ir.module.module", "string"));
|
||||
$msg1->addParam(new xmlrpcval("search", "string"));
|
||||
$msg1->addParam(new xmlrpcval($condition,"array"));
|
||||
$response1 = $client->send($msg1);
|
||||
if (!$response1->faultCode()){
|
||||
$value = $response1->value()->scalarval();
|
||||
if ($value)
|
||||
return array('is_error'=>False,'is_installed'=>True);
|
||||
else
|
||||
return array('is_error'=>False,'is_installed'=>False);
|
||||
|
||||
}
|
||||
else{
|
||||
$error_message = $response1->faultString();
|
||||
return array('is_error'=>True,'error_message'=>$error_message);
|
||||
}
|
||||
}
|
||||
else{
|
||||
$error_message = $response->faultString();
|
||||
return array('is_error'=>True,'error_message'=>$error_message);
|
||||
}
|
||||
}
|
||||
|
||||
public function CheckMultiLanguage(){
|
||||
$flag=True;
|
||||
$check_presta_end = Db::getInstance()->getRow("select `id_module` from `"._DB_PREFIX_."module` where `name`='prestaerpmultilang' and `active`=1");
|
||||
if (!$check_presta_end){
|
||||
$flag=False;
|
||||
Configuration::updateGlobalValue('ErpMultiLang',False);
|
||||
}
|
||||
$check_data=$this->CheckErpEnd('pob_extension_multilang');
|
||||
if($check_data['is_error']){
|
||||
$flag=False;
|
||||
Configuration::updateGlobalValue('ErpMultiLang',False);
|
||||
$this->errors[] = Tools::displayError($this->l("Login Error: Invalid OpenERP Information."));
|
||||
}
|
||||
elseif(!$check_data['is_error'] and !$check_data['is_installed']){
|
||||
$flag=False;
|
||||
Configuration::updateGlobalValue('ErpMultiLang',False);
|
||||
|
||||
}
|
||||
return $flag;
|
||||
}
|
||||
|
||||
public function TestConnection(){
|
||||
if (Configuration::getGlobalValue('ErpUrl') && Configuration::getGlobalValue('ErpPort') && Configuration::getGlobalValue('ErpDatabase') && Configuration::getGlobalValue('ErpUsername') && Configuration::getGlobalValue('ErpPassword')){
|
||||
$sock = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl").":".Configuration::getGlobalValue("ErpPort")."/xmlrpc/common");
|
||||
$client = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl").":".Configuration::getGlobalValue("ErpPort")."/xmlrpc/object");
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpUsername"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), 'string'));
|
||||
$response = $sock->send($msg);
|
||||
if (!$response->faultCode()){
|
||||
$userId = $response->value()->scalarval();
|
||||
if (!$userId){
|
||||
return array(
|
||||
'status' => false,
|
||||
'message' => "Invalid Credentials for Connection!!!"
|
||||
);
|
||||
}
|
||||
|
||||
$condition=array(new xmlrpcval('lang', "string"));
|
||||
|
||||
$msg1 = new xmlrpcmsg('execute');
|
||||
$msg1->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg1->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg1->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg1->addParam(new xmlrpcval("res.users", "string"));
|
||||
$msg1->addParam(new xmlrpcval("read", "string"));
|
||||
$msg1->addParam(new xmlrpcval($userId,"int"));
|
||||
$msg1->addParam(new xmlrpcval($condition,"array"));
|
||||
$response1 = $client->send($msg1);
|
||||
if (!$response1->faultCode()){
|
||||
$value = $response1->value()->scalarval();
|
||||
$lang_code=$value['lang']->me['string'];
|
||||
$condition1=array(new xmlrpcval(
|
||||
array(
|
||||
new xmlrpcval('code', "string"),
|
||||
new xmlrpcval('=', "string"),
|
||||
new xmlrpcval($lang_code, "string")),
|
||||
"array"),
|
||||
);
|
||||
$msg2 = new xmlrpcmsg('execute');
|
||||
$msg2->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg2->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg2->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg2->addParam(new xmlrpcval("res.lang", "string"));
|
||||
$msg2->addParam(new xmlrpcval("search", "string"));
|
||||
$msg2->addParam(new xmlrpcval($condition1,"array"));
|
||||
$response2 = $client->send($msg2);
|
||||
if (!$response2->faultCode()){
|
||||
$value = $response2->value()->scalarval();
|
||||
$lang_id=$value[0]->me['int'];
|
||||
|
||||
$msg3 = new xmlrpcmsg('execute');
|
||||
$msg3->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg3->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg3->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg3->addParam(new xmlrpcval("res.lang", "string"));
|
||||
$msg3->addParam(new xmlrpcval("name_get", "string"));
|
||||
$msg3->addParam(new xmlrpcval($lang_id,"int"));
|
||||
$response3 = $client->send($msg3);
|
||||
if (!$response3->faultCode()){
|
||||
$value = $response3->value()->scalarval();
|
||||
$lang_name=$value[0]->me['array'][1]->me['string'];
|
||||
return array(
|
||||
'status' => true,
|
||||
'message' => "Successfully connected.(Default Language: ".$lang_name." )"
|
||||
);
|
||||
}
|
||||
else{
|
||||
$error_message = $response3->faultString();
|
||||
$log = new pob_log();
|
||||
$log->logMessage(__FILE__,__LINE__,$response3->raw_data);
|
||||
return array(
|
||||
'status' => true,
|
||||
'message' => "Connected but with Error(You can ignore and continue)"
|
||||
);
|
||||
}
|
||||
}
|
||||
else{
|
||||
$error_message = $response2->faultString();
|
||||
$log = new pob_log();
|
||||
$log->logMessage(__FILE__,__LINE__,$response2->raw_data);
|
||||
return array(
|
||||
'status' => true,
|
||||
'message' => "Connected but with Error(You can ignore and continue)"
|
||||
);
|
||||
}
|
||||
}
|
||||
else{
|
||||
$error_message = $response1->faultString();
|
||||
$log = new pob_log();
|
||||
$log->logMessage(__FILE__,__LINE__,$response1->raw_data);
|
||||
return $error_message;
|
||||
}
|
||||
}
|
||||
else{
|
||||
$error_message = $response->faultString();
|
||||
$log = new pob_log();
|
||||
$log->logMessage(__FILE__,__LINE__,$response->raw_data);
|
||||
return array(
|
||||
'status' => false,
|
||||
'message' => 'Error in Connection with Odoo'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function UpdateConfig(){
|
||||
if (!Tools::getValue('ErpUrl') || !Tools::getValue('ErpPort') || !Tools::getValue('ErpDatabase') || !Tools::getValue('ErpUsername') || !Tools::getValue('ErpPassword')){
|
||||
return False;
|
||||
}
|
||||
else{
|
||||
$Url = Tools::getValue('ErpUrl');
|
||||
$Port = Tools::getValue('ErpPort');
|
||||
$Database = Tools::getValue('ErpDatabase');
|
||||
$Username = Tools::getValue('ErpUsername');
|
||||
$Password = Tools::getValue('ErpPassword');
|
||||
$DropT = Tools::getValue('ErpDropTables');
|
||||
$MultiShop= Tools::getValue('ErpMultiShop');
|
||||
$MultiLang= Tools::getValue('ErpMultiLang');
|
||||
$Confirm_order= Tools::getValue('ErpConfirmOrder');
|
||||
$Auto_gen_inv= Tools::getValue('ErpAutoInvoice');
|
||||
$Auto_upd_status= Tools::getValue('ErpAutoStatusUpdate');
|
||||
|
||||
Configuration::updateGlobalValue('ErpUrl', $Url);
|
||||
Configuration::updateGlobalValue('ErpPort', $Port);
|
||||
Configuration::updateGlobalValue('ErpDatabase', $Database);
|
||||
Configuration::updateGlobalValue('ErpUsername', $Username);
|
||||
Configuration::updateGlobalValue('ErpPassword', $Password);
|
||||
Configuration::updateGlobalValue('ErpDropTables', $DropT);
|
||||
Configuration::updateGlobalValue('ErpMultiShop',$MultiShop);
|
||||
Configuration::updateGlobalValue('ErpMultiLang',$MultiLang);
|
||||
Configuration::updateGlobalValue('ErpConfirmOrder',$Confirm_order);
|
||||
Configuration::updateGlobalValue('ErpAutoInvoice',$Auto_gen_inv);
|
||||
Configuration::updateGlobalValue('ErpAutoStatusUpdate',$Auto_upd_status);
|
||||
return True;
|
||||
}
|
||||
}
|
||||
|
||||
public function deletePOBTables(){
|
||||
$d1=Db::getInstance()->execute('TRUNCATE TABLE '._DB_PREFIX_.'erp_customer_merge');
|
||||
$d2=Db::getInstance()->execute('TRUNCATE TABLE '._DB_PREFIX_.'erp_address_merge');
|
||||
$d3=Db::getInstance()->execute('TRUNCATE TABLE '._DB_PREFIX_.'erp_product_merge');
|
||||
$d4=Db::getInstance()->execute('TRUNCATE TABLE '._DB_PREFIX_.'erp_category_merge');
|
||||
$d5=Db::getInstance()->execute('TRUNCATE TABLE '._DB_PREFIX_.'erp_tax_merge');
|
||||
$d6=Db::getInstance()->execute('TRUNCATE TABLE '._DB_PREFIX_.'erp_payment_merge');
|
||||
$d7=Db::getInstance()->execute('TRUNCATE TABLE '._DB_PREFIX_.'erp_currency_merge');
|
||||
$d8=Db::getInstance()->execute('TRUNCATE TABLE '._DB_PREFIX_.'erp_carrier_merge');
|
||||
$d9=Db::getInstance()->execute('TRUNCATE TABLE '._DB_PREFIX_.'erp_attributes_merge');
|
||||
$d10=Db::getInstance()->execute('TRUNCATE TABLE '._DB_PREFIX_.'erp_attribute_values_merge');
|
||||
$d11=Db::getInstance()->execute('TRUNCATE TABLE '._DB_PREFIX_.'erp_product_template_merge');
|
||||
$d12=Db::getInstance()->execute('TRUNCATE TABLE '._DB_PREFIX_.'erp_order_merge');
|
||||
if(Configuration::getGlobalValue('ErpMultiShop'))
|
||||
Db::getInstance()->execute('TRUNCATE TABLE '._DB_PREFIX_.'erp_shop_merge');
|
||||
if(Configuration::getGlobalValue('ErpMultiLang'))
|
||||
Db::getInstance()->execute('TRUNCATE TABLE '._DB_PREFIX_.'erp_language_merge');
|
||||
|
||||
|
||||
if(!$d1 || !$d2 || !$d3 || !$d4 || !$d5 || !$d6 || !$d7 || !$d8 || !$d9 || !$d10 || !$d11 || !$d12)
|
||||
return False;
|
||||
else
|
||||
return True;
|
||||
}
|
||||
|
||||
}
|
35
modules/prestaerp/classes/index.php
Normal file
35
modules/prestaerp/classes/index.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
36
modules/prestaerp/classes/pob_log.php
Normal file
36
modules/prestaerp/classes/pob_log.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class pob_log{
|
||||
|
||||
public function getFilename(){
|
||||
$name='log_'.date('m-d-Y').'.log';
|
||||
return $name;
|
||||
}
|
||||
|
||||
public function logMessage($fname,$lineno,$message,$level='ERROR'){
|
||||
$filename = $this->getFilename();
|
||||
|
||||
$formatted_message = '*'.$level.'*'."\t".date('Y/m/d - H:i:s').': '.'File name: '.basename($fname)." - ".'Line No: '.$lineno."\r\nMessage: ".$message."\r\n";
|
||||
return (bool)file_put_contents(_PS_MODULE_DIR_.'prestaerp/logs/'.$filename, $formatted_message, FILE_APPEND);
|
||||
}
|
||||
}
|
3804
modules/prestaerp/classes/xmlrpc.inc
Normal file
3804
modules/prestaerp/classes/xmlrpc.inc
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,328 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class AdminErpCarrierController extends ModuleAdminController{
|
||||
|
||||
public function __construct(){
|
||||
$this->bootstrap = true;
|
||||
$this->table = 'erp_carrier_merge';
|
||||
$this->className = 'ErpCarrier';
|
||||
$this->lang = false;
|
||||
$this->add = true;
|
||||
$this->edit = true;
|
||||
$this->delete = true;
|
||||
$this->view = true;
|
||||
$this->imageType = 'jpg';
|
||||
$this->context = Context::getContext();
|
||||
$this->addRowAction('delete');
|
||||
$this->addRowAction('view');
|
||||
// $this->list_no_link = true;
|
||||
$this->fields_list = array(
|
||||
'id' => array(
|
||||
'title' => 'Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'erp_carrier_id' => array(
|
||||
'title' => 'Erp Carrier Id',
|
||||
'width' => 'auto',
|
||||
'align' => 'center'
|
||||
),
|
||||
'prestashop_carrier_id' => array(
|
||||
'title' => 'Prestashop Carrier Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'name' => array(
|
||||
'title' => 'Carrier Name',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'created_by' => array(
|
||||
'title' => 'Created By',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'created_on' => array(
|
||||
'title' => 'Created on',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'is_synch' => array(
|
||||
'title' => $this->l('Is Synchronised'),
|
||||
'align' => 'center',
|
||||
'type' => 'bool',
|
||||
'width' => 'auto',
|
||||
'icon' => array(
|
||||
1 => array(
|
||||
'src' => 'enabled-2.gif',
|
||||
'alt' => $this->l('Synchronized')
|
||||
),
|
||||
0 => array(
|
||||
'src' => 'disabled.gif',
|
||||
'alt' => $this->l('Need Synchronization')
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
$this->bulk_actions = array(
|
||||
'delete' => array(
|
||||
'text' => $this->l('Delete selected'),
|
||||
'confirm' => $this->l('Delete selected items?')
|
||||
)
|
||||
);
|
||||
$this->identifier = 'id';
|
||||
parent::__construct();
|
||||
$index = count($this->_conf)+1;
|
||||
$this->_conf[$index] = $this->l('All Carriers(s) successfully exported to Odoo.');
|
||||
}
|
||||
|
||||
public function postProcess(){
|
||||
if (!$this->loadObject(true))
|
||||
return;
|
||||
if (Tools::getValue('synchronize')) {
|
||||
$log = new pob_log();
|
||||
if (!class_exists('xmlrpc_client'))
|
||||
include_once 'xmlrpc.inc';
|
||||
$client = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/object");
|
||||
$sock = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/common");
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpUsername"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), 'string'));
|
||||
$resp = $sock->send($msg);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,'Connection Error : Invalid Odoo Information.',"ERROR");
|
||||
$this->errors[] = Tools::displayError($this->l('Connection Error : Invalid Odoo Information.' . $error_message));
|
||||
} else {
|
||||
$userId = $resp->value()->scalarval();
|
||||
if ($userId <= 0){
|
||||
$log->logMessage(__FILE__,__LINE__,'Invalid UserName or Password. Please check the Odoo configuration.',"ERROR");
|
||||
$this->errors[] = Tools::displayError($this->l('Invalid UserName or Password. Please check the Odoo configuration.'));}
|
||||
else {
|
||||
$presta_user = $this->context->employee->firstname . ' ' . $this->context->employee->lastname . ' (' . $this->context->employee->email . ')';
|
||||
$carrier = new ErpCarrier();
|
||||
$check = $carrier->check_all_carriers($userId, $client, $presta_user);
|
||||
$index = count($this->_conf);
|
||||
if ($check['is_error'] == 0 && $check['value'] == 1) {
|
||||
Tools::redirectAdmin(self::$currentIndex . '&conf=' . $index . '&token=' . $this->token);
|
||||
$log->logMessage(__FILE__,__LINE__,'All Carrier(s) successfully exported to Odoo.','INFO');
|
||||
} elseif ($check['is_error'] == 0 && $check['value'] == 0) {
|
||||
Tools::redirectAdmin(self::$currentIndex . '&conf=' . $index . '&token=' . $this->token);
|
||||
} else {
|
||||
$this->errors[] = Tools::displayError($this->l('Error in Prestashop`s Id : ' . $check['ids']));
|
||||
$log->logMessage(__FILE__,__LINE__,'Error in Prestashop`s Id : ' . $check['ids'].'/n'.'Error Message(s):' . $check['error_message'],"CRITICAL");
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
return parent::postProcess();
|
||||
}
|
||||
|
||||
public function processDelete(){
|
||||
$record_id = Tools::getValue('id');
|
||||
if ($record_id){
|
||||
Db::getInstance()->delete('erp_carrier_merge','id='.$record_id);
|
||||
}
|
||||
}
|
||||
|
||||
public function initToolbar(){
|
||||
$this->page_header_toolbar_btn['refresh'] = array(
|
||||
'href' => self::$currentIndex.'&synchronize=1&token=' . $this->token . '',
|
||||
'desc' => $this->l('Synchronize')
|
||||
);
|
||||
|
||||
$this->page_header_toolbar_btn['manual_map'] = array(
|
||||
'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token.'&manualmap=1',
|
||||
'desc' => $this->l('Manual Mapping'),
|
||||
'imgclass' => 'new'
|
||||
);
|
||||
parent::initToolbar();
|
||||
unset($this->toolbar_btn['new']);
|
||||
$this->toolbar_btn['wk_hide'] = array(
|
||||
'desc' => $this->l('')
|
||||
);
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar(){
|
||||
parent::initPageHeaderToolbar();
|
||||
$this->context->smarty->clearAssign('help_link');
|
||||
}
|
||||
|
||||
public function setMedia(){
|
||||
parent::setMedia();
|
||||
$this->addJS(_MODULE_DIR_.'prestaerp/views/js/pob_js.js');
|
||||
}
|
||||
|
||||
public function processBulkDelete(){
|
||||
$result = true;
|
||||
if (is_array($this->boxes) && !empty($this->boxes)){
|
||||
foreach ($this->boxes as $id_data) {
|
||||
Db::getInstance()->delete('erp_carrier_merge', 'id = ' . (int) $id_data);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You must select at least one element to delete.');
|
||||
}
|
||||
|
||||
public function renderView(){
|
||||
$id = Tools::getValue('id');
|
||||
$id_lang = $this->context->language->id;
|
||||
if ($id)
|
||||
{
|
||||
$obj_ps_erp_carrier = new ErpCarrier();
|
||||
$carrier_tpl = $obj_ps_erp_carrier->carrier_details($id);
|
||||
$this->context->smarty->assign('carrier_tpl', $carrier_tpl);
|
||||
$this->context->smarty->assign('modules_dir', _MODULE_DIR_);
|
||||
}
|
||||
return parent::renderView();
|
||||
}
|
||||
|
||||
public function renderForm(){
|
||||
$log = new pob_log();
|
||||
if (!class_exists('xmlrpc_client'))
|
||||
include_once 'xmlrpc.inc';
|
||||
$client = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/object");
|
||||
$sock = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/common");
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpUsername"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), 'string'));
|
||||
$resp = $sock->send($msg);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,'Connection Error : Invalid Odoo Information.',"CRITICAL");
|
||||
$this->errors[] = Tools::displayError($this->l('Connection Error : Invalid Odoo Information.' . $error_message));
|
||||
} else {
|
||||
$userId = $resp->value()->scalarval();
|
||||
$key = array();
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("delivery.carrier", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("search", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($key, "array"));
|
||||
$resp0 = $client->send($msg_ser);
|
||||
if ($resp0->faultCode()) {
|
||||
$error_message = $resp0->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,$error_message,"CRITICAL");
|
||||
$this->errors[] = Tools::displayError($this->l('Error : ' . $error_message));
|
||||
} else {
|
||||
$val = $resp0->value()->me['array'];
|
||||
$key1 = array(
|
||||
new xmlrpcval('id', 'integer'),
|
||||
new xmlrpcval('name', 'string'),
|
||||
new xmlrpcval('amount', 'string')
|
||||
);
|
||||
$msg_ser1 = new xmlrpcmsg('execute');
|
||||
$msg_ser1->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser1->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval("delivery.carrier", "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval("read", "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval($val, "array"));
|
||||
$msg_ser1->addParam(new xmlrpcval($key1, "array"));
|
||||
$resp1 = $client->send($msg_ser1);
|
||||
if ($resp1->faultCode()) {
|
||||
$error_message = $resp1->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,$error_message,"CRITICAL");
|
||||
$this->errors[] = Tools::displayError($this->l('Error : ' . $error_message));
|
||||
} else {
|
||||
$value_array = $resp1->value()->scalarval();
|
||||
$count = count($value_array);
|
||||
if ($count==0)
|
||||
$arr = false;
|
||||
for ($x = 0; $x < $count; $x++) {
|
||||
$arr[$x]['id'] = $value_array[$x]->me['struct']['id']->me['int'];
|
||||
$arr[$x]['name'] = $value_array[$x]->me['struct']['name']->me['string'];
|
||||
}
|
||||
$this->fields_form = array(
|
||||
'legend' => array(
|
||||
'title' => $this->l('Manual Carrier Mapping'),
|
||||
'image' => '../modules/prestaerp/views/img/ErpProducts.png'
|
||||
),
|
||||
'input' => array(
|
||||
array(
|
||||
'type' => 'select',
|
||||
'label' => $this->l('Odoo Carrier'),
|
||||
'name' => 'erpname',
|
||||
'lang' => true,
|
||||
'width' => 13,
|
||||
'options' => array(
|
||||
'query' => $arr,
|
||||
'id' => 'id',
|
||||
'name' => 'name'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'type' => 'select',
|
||||
'label' => $this->l('Prestashop Carrier'),
|
||||
'name' => 'prestaname',
|
||||
'lang' => true,
|
||||
'width' => 1000,
|
||||
'options' => array(
|
||||
'query' => Db::getInstance()->executeS("SELECT * from `" . _DB_PREFIX_ . "carrier` where `deleted`=0 and `active`=1"),
|
||||
'id' => 'id_carrier',
|
||||
'name' => 'name'
|
||||
)
|
||||
)
|
||||
),
|
||||
'submit' => array(
|
||||
'title' => $this->l('Save'),
|
||||
'class' => 'button'
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
return parent::renderForm();
|
||||
}
|
||||
|
||||
public function processSave(){
|
||||
$erp_carrier_id = Tools::getValue('erpname');
|
||||
$prestashop_carrier_id = Tools::getValue('prestaname');
|
||||
|
||||
$e_count = Db::getInstance()->executeS("SELECT * from `" . _DB_PREFIX_ . "erp_carrier_merge` where `erp_carrier_id`=" . $erp_carrier_id);
|
||||
$p_count = Db::getInstance()->executeS("SELECT * from `" . _DB_PREFIX_ . "erp_carrier_merge` where `prestashop_carrier_id`=" . $prestashop_carrier_id);
|
||||
if (count($e_count) > 0) {
|
||||
$this->errors[] = Tools::displayError($this->l('This Odoo Id has been already mapped.'));
|
||||
$this->display = 'add';
|
||||
}
|
||||
if (count($p_count) > 0) {
|
||||
$this->errors[] = Tools::displayError($this->l('This PrestaShop Id has been already mapped.'));
|
||||
$this->display = 'add';
|
||||
}
|
||||
if ((count($p_count) <= 0) && (count($e_count) <= 0)){
|
||||
$presta_user = $this->context->employee->firstname . ' ' . $this->context->employee->lastname . ' (' . $this->context->employee->email . ')';
|
||||
$data = Db::getInstance()->getRow("SELECT name from ". _DB_PREFIX_."carrier where id_carrier=".$prestashop_carrier_id."");
|
||||
$name = $data['name'];
|
||||
$carrier = new ErpCarrier();
|
||||
$carrier->addto_carrier_merge($prestashop_carrier_id, $erp_carrier_id, $name, $presta_user);
|
||||
Tools::redirectAdmin(self::$currentIndex . '&conf=' . 3 . '&token=' . $this->token);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
@ -0,0 +1,324 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class AdminErpCurrencyController extends ModuleAdminController{
|
||||
|
||||
public function __construct(){
|
||||
$this->bootstrap = true;
|
||||
$this->table = 'erp_currency_merge';
|
||||
$this->className = 'ErpCurrency';
|
||||
$this->lang = false;
|
||||
$this->add = true;
|
||||
$this->edit = true;
|
||||
$this->delete = true;
|
||||
$this->view = true;
|
||||
$this->imageType = 'jpg';
|
||||
// $this->list_no_link = true;
|
||||
$this->context = Context::getContext();
|
||||
$this->addRowAction('delete');
|
||||
$this->addRowAction('view');
|
||||
|
||||
$this->fields_list = array(
|
||||
'id' => array(
|
||||
'title' => 'Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'erp_currency_id' => array(
|
||||
'title' => 'Erp Currency Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'prestashop_currency_id' => array(
|
||||
'title' => 'Prestashop Currency Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'created_by' => array(
|
||||
'title' => 'Created By',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'created_on' => array(
|
||||
'title' => 'Created on',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'is_synch' => array(
|
||||
'title' => $this->l('Is Synchronised'),
|
||||
'align' => 'center',
|
||||
'type' => 'bool',
|
||||
'width' => 'auto',
|
||||
'icon' => array(
|
||||
1 => array(
|
||||
'src' => 'enabled-2.gif',
|
||||
'alt' => $this->l('Synchronized')
|
||||
),
|
||||
0 => array(
|
||||
'src' => 'disabled.gif',
|
||||
'alt' => $this->l('Need Synchronization')
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
$this->bulk_actions = array(
|
||||
'delete' => array(
|
||||
'text' => $this->l('Delete selected'),
|
||||
'confirm' => $this->l('Delete selected items?')
|
||||
)
|
||||
);
|
||||
$this->identifier = 'id';
|
||||
parent::__construct();
|
||||
$index = count($this->_conf)+1;
|
||||
$this->_conf[$index] = $this->l('All Currency(es) successfully exported to Odoo.');
|
||||
}
|
||||
|
||||
public function postProcess(){
|
||||
if (!$this->loadObject(true))
|
||||
return;
|
||||
if (Tools::getValue('synchronize')) {
|
||||
if (!class_exists('xmlrpc_client'))
|
||||
include_once 'xmlrpc.inc';
|
||||
$log = new pob_log();
|
||||
$client = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/object");
|
||||
$sock = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/common");
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpUsername"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), 'string'));
|
||||
$resp = $sock->send($msg);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,'Connection Error : Invalid Odoo Information.');
|
||||
$this->errors[] = Tools::displayError($this->l('Connection Error : Invalid Odoo Information.' . $error_message,"ERROR"));
|
||||
} else {
|
||||
$userId = $resp->value()->scalarval();
|
||||
if ($userId <= 0){
|
||||
$log->logMessage(__FILE__,__LINE__,'Invalid UserName or Password. Please check the Odoo configuration.',"ERROR");
|
||||
$this->errors[] = Tools::displayError($this->l('Invalid UserName or Password. Please check the Odoo configuration.'));}
|
||||
else {
|
||||
$presta_user = $this->context->employee->firstname . ' ' . $this->context->employee->lastname . ' (' . $this->context->employee->email . ')';
|
||||
$currency = new ErpCurrency();
|
||||
$check = $currency->check_all_currencies($userId, $client, $presta_user);
|
||||
$index = count($this->_conf);
|
||||
if ($check['is_error'] == 0 && $check['value'] == 1) {
|
||||
Tools::redirectAdmin(self::$currentIndex . '&conf=' . $index . '&token=' . $this->token);
|
||||
$log->logMessage(__FILE__,__LINE__,'All Currency(s) successfully exported to Odoo.','INFO');
|
||||
} elseif ($check['is_error'] == 0 && $check['value'] == 0) {
|
||||
Tools::redirectAdmin(self::$currentIndex . '&conf=' . $index . '&token=' . $this->token);
|
||||
} else {
|
||||
$this->errors[] = Tools::displayError($this->l('Error in Prestashop`s Id : ' . $check['ids']));
|
||||
$log->logMessage(__FILE__,__LINE__,'Error in Prestashop`s Id : ' . $check['ids'].'/n'.'Error Message(s):' . $check['error_message'],"CRITICAL");
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
return parent::postProcess();
|
||||
}
|
||||
|
||||
public function processDelete(){
|
||||
$record_id = Tools::getValue('id');
|
||||
if ($record_id){
|
||||
Db::getInstance()->delete('erp_currency_merge','id='.$record_id);
|
||||
}
|
||||
}
|
||||
|
||||
public function initToolbar(){
|
||||
$this->page_header_toolbar_btn['refresh'] = array(
|
||||
'href' => self::$currentIndex.'&synchronize=1&token=' . $this->token . '',
|
||||
'desc' => $this->l('Synchronize')
|
||||
);
|
||||
|
||||
$this->page_header_toolbar_btn['manual_map'] = array(
|
||||
'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token.'&manualmap=1',
|
||||
'desc' => $this->l('Manual Mapping'),
|
||||
'imgclass' => 'new'
|
||||
);
|
||||
parent::initToolbar();
|
||||
unset($this->toolbar_btn['new']);
|
||||
$this->toolbar_btn['wk_hide'] = array(
|
||||
'desc' => $this->l('')
|
||||
);
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar(){
|
||||
parent::initPageHeaderToolbar();
|
||||
$this->context->smarty->clearAssign('help_link');
|
||||
}
|
||||
|
||||
public function setMedia(){
|
||||
parent::setMedia();
|
||||
$this->addJS(_MODULE_DIR_.'prestaerp/views/js/pob_js.js');
|
||||
}
|
||||
|
||||
public function processBulkDelete(){
|
||||
$result = true;
|
||||
if (is_array($this->boxes) && !empty($this->boxes)){
|
||||
foreach ($this->boxes as $id_data) {
|
||||
Db::getInstance()->delete('erp_currency_merge', 'id = ' . (int) $id_data);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You must select at least one element to delete.');
|
||||
}
|
||||
|
||||
public function renderView(){
|
||||
$id = Tools::getValue('id');
|
||||
$id_lang = $this->context->language->id;
|
||||
if ($id)
|
||||
{
|
||||
$obj_currency = new ErpCurrency();
|
||||
$currency_tpl = $obj_currency->currency_details($id);
|
||||
$this->context->smarty->assign('currency_tpl', $currency_tpl);
|
||||
$this->context->smarty->assign('modules_dir', _MODULE_DIR_);
|
||||
}
|
||||
return parent::renderView();
|
||||
}
|
||||
|
||||
public function renderForm(){
|
||||
$log = new pob_log();
|
||||
if (!class_exists('xmlrpc_client'))
|
||||
include_once 'xmlrpc.inc';
|
||||
if (Configuration::getGlobalValue("ErpUrl") and Configuration::getGlobalValue("ErpPort") and Configuration::getGlobalValue("ErpDatabase") and Configuration::getGlobalValue("ErpUsername") and Configuration::getGlobalValue("ErpPassword")){
|
||||
$client = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/object");
|
||||
$sock = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/common");
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpUsername"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), 'string'));
|
||||
$resp = $sock->send($msg);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,'Connection Error : Invalid Odoo Information .',"ERROR");
|
||||
$this->errors[] = Tools::displayError($this->l('Connection Error : Invalid Odoo Information.' . $error_message));
|
||||
} else {
|
||||
$userId = $resp->value()->scalarval();
|
||||
$key = array();
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("product.pricelist", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("search", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($key, "array"));
|
||||
$resp0 = $client->send($msg_ser);
|
||||
if ($resp0->faultCode()) {
|
||||
$error_message = $resp0->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,$error_message,"CRITICAL");
|
||||
$this->errors[] = Tools::displayError($this->l('Error : ' . $error_message));
|
||||
} else {
|
||||
$val = $resp0->value()->me['array'];
|
||||
$key1 = array(
|
||||
new xmlrpcval('id', 'integer'),
|
||||
new xmlrpcval('name', 'string')
|
||||
);
|
||||
$msg_ser1 = new xmlrpcmsg('execute');
|
||||
$msg_ser1->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser1->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval("product.pricelist", "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval("read", "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval($val, "array"));
|
||||
$msg_ser1->addParam(new xmlrpcval($key1, "array"));
|
||||
$resp1 = $client->send($msg_ser1);
|
||||
if ($resp1->faultCode()) {
|
||||
$error_message = $resp1->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,$error_message,"CRITICAL");
|
||||
$this->errors[] = Tools::displayError($this->l('Error : ' . $error_message));
|
||||
} else {
|
||||
$value_array = $resp1->value()->scalarval();
|
||||
$count = count($value_array);
|
||||
$arr = array();
|
||||
for ($x = 0; $x < $count; $x++) {
|
||||
$arr[$x]['id'] = $value_array[$x]->me['struct']['id']->me['int'];
|
||||
$arr[$x]['name'] = $value_array[$x]->me['struct']['name']->me['string'];
|
||||
}
|
||||
$this->fields_form = array(
|
||||
'legend' => array(
|
||||
'title' => $this->l('Manual Currency Mapping'),
|
||||
'image' => '../modules/prestaerp/views/img/ErpProducts.png'
|
||||
),
|
||||
'input' => array(
|
||||
array(
|
||||
'type' => 'select',
|
||||
'label' => $this->l('Odoo Pricelist'),
|
||||
'name' => 'erpname',
|
||||
'lang' => true,
|
||||
'width' => 13,
|
||||
'options' => array(
|
||||
'query' => $arr,
|
||||
'id' => 'id',
|
||||
'name' => 'name'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'type' => 'select',
|
||||
'label' => $this->l('Prestashop Currency'),
|
||||
'name' => 'prestaname',
|
||||
'lang' => true,
|
||||
'width' => 1000,
|
||||
'options' => array(
|
||||
'query' => Db::getInstance()->executeS("SELECT * from `" . _DB_PREFIX_ . "currency` where active=1"),
|
||||
'id' => 'id_currency',
|
||||
'name' => 'name'
|
||||
)
|
||||
)
|
||||
),
|
||||
'submit' => array(
|
||||
'title' => $this->l('Save'),
|
||||
'class' => 'button'
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
$log->logMessage(__FILE__,__LINE__,'Connection Error : Invalid Odoo Information.',"ERROR");
|
||||
$this->errors[] = Tools::displayError($this->l('Connection Error : Invalid Odoo Information.'));}
|
||||
return parent::renderForm();
|
||||
}
|
||||
|
||||
public function processSave(){
|
||||
$erp_currency_id = Tools::getValue('erpname');
|
||||
$prestashop_currency_id = Tools::getValue('prestaname');
|
||||
$e_count = Db::getInstance()->executeS("SELECT * from `" . _DB_PREFIX_ . "erp_currency_merge` where `erp_currency_id`=" . $erp_currency_id);
|
||||
$p_count = Db::getInstance()->executeS("SELECT * from `" . _DB_PREFIX_ . "erp_currency_merge` where `prestashop_currency_id`=" . $prestashop_currency_id);
|
||||
if (count($e_count) > 0) {
|
||||
$this->errors[] = Tools::displayError($this->l('This Odoo Id has been already mapped.'));
|
||||
$this->display = 'add';
|
||||
}
|
||||
if (count($p_count) > 0) {
|
||||
$this->errors[] = Tools::displayError($this->l('This prestaShop Id has been already mapped.'));
|
||||
$this->display = 'add';
|
||||
}
|
||||
if ((count($p_count) <= 0) && (count($e_count) <= 0)){
|
||||
$presta_user = $this->context->employee->firstname . ' ' . $this->context->employee->lastname . ' (' . $this->context->employee->email . ')';
|
||||
$currency = new ErpCurrency();
|
||||
$currency->addto_currency_merge($erp_currency_id, $prestashop_currency_id, $presta_user);
|
||||
Tools::redirectAdmin(self::$currentIndex . '&conf=' . 3 . '&token=' . $this->token);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
@ -0,0 +1,199 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class AdminErpCustomerAddressController extends ModuleAdminController{
|
||||
|
||||
public function __construct(){
|
||||
$this->bootstrap = true;
|
||||
$this->table = 'erp_address_merge';
|
||||
$this->className = 'ErpCustomerAddress';
|
||||
$this->lang = false;
|
||||
$this->add = true;
|
||||
$this->edit = true;
|
||||
$this->delete = true;
|
||||
$this->view = true;
|
||||
$this->imageType = 'jpg';
|
||||
// $this->list_no_link = true;
|
||||
$this->context = Context::getContext();
|
||||
$this->addRowAction('delete');
|
||||
$this->addRowAction('view');
|
||||
|
||||
$this->fields_list = array(
|
||||
'id' => array(
|
||||
'title' => 'Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'erp_address_id' => array(
|
||||
'title' => 'Erp Address Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'prestashop_address_id' => array(
|
||||
'title' => 'Prestashop Address Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'id_customer' => array(
|
||||
'title' => 'Prestashop Customer Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'created_by' => array(
|
||||
'title' => 'Created By',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'created_on' => array(
|
||||
'title' => 'Created on',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'is_synch' => array(
|
||||
'title' => $this->l('Is Synchronised'),
|
||||
'align' => 'center',
|
||||
'type' => 'bool',
|
||||
'width' => 'auto',
|
||||
'icon' => array(
|
||||
1 => array(
|
||||
'src' => 'enabled-2.gif',
|
||||
'alt' => $this->l('Synchronized')
|
||||
),
|
||||
0 => array(
|
||||
'src' => 'disabled.gif',
|
||||
'alt' => $this->l('Need Synchronization')
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
$this->bulk_actions = array(
|
||||
'delete' => array(
|
||||
'text' => $this->l('Delete selected'),
|
||||
'confirm' => $this->l('Delete selected items?')
|
||||
)
|
||||
);
|
||||
$this->identifier = 'id';
|
||||
parent::__construct();
|
||||
$index = count($this->_conf)+1;
|
||||
$this->_conf[$index] = $this->l('All Address(es) successfully exported to Odoo.');
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar(){
|
||||
parent::initPageHeaderToolbar();
|
||||
$this->context->smarty->clearAssign('help_link');
|
||||
}
|
||||
|
||||
public function postProcess(){
|
||||
if (!$this->loadObject(true))
|
||||
return;
|
||||
$log = new pob_log();
|
||||
if (Tools::getValue('synchronize')) {
|
||||
if (!class_exists('xmlrpc_client'))
|
||||
include_once 'xmlrpc.inc';
|
||||
$client = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/object");
|
||||
$sock = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/common");
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpUsername"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), 'string'));
|
||||
$resp = $sock->send($msg);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,'Connection Error : Invalid Odoo Information.',"CRITICAL");
|
||||
$this->errors[] = Tools::displayError($this->l('Connection Error : Invalid Odoo Information.' . $error_message));
|
||||
} else {
|
||||
$userId = $resp->value()->scalarval();
|
||||
if ($userId <= 0){
|
||||
$log->logMessage(__FILE__,__LINE__,'Invalid UserName or Password. Please check the Odoo configuration.',"CRITICAL");
|
||||
$this->errors[] = Tools::displayError($this->l('Invalid UserName or Password. Please check the Odoo configuration.'));}
|
||||
else {
|
||||
$presta_user = $this->context->employee->firstname . ' ' . $this->context->employee->lastname . ' (' . $this->context->employee->email . ')';
|
||||
$address = new ErpCustomerAddress();
|
||||
$check = $address->check_all_addresses($userId, $client, $presta_user);
|
||||
$index = count($this->_conf);
|
||||
if ($check['is_error'] == 0 && $check['value'] == 1) {
|
||||
Tools::redirectAdmin(self::$currentIndex . '&conf=' . $index . '&token=' . $this->token);
|
||||
$log->logMessage(__FILE__,__LINE__,'All Address(s) successfully exported to Odoo.','INFO');
|
||||
} elseif ($check['is_error'] == 0 && $check['value'] == 0)
|
||||
$this->displayInformation($this->l('No new Address(s) found.'));
|
||||
else {
|
||||
$this->errors[] = Tools::displayError($this->l('Error in Prestashop`s Id : ' . $check['ids']));
|
||||
$this->errors[] = Tools::displayError($this->l('Error Message(s):' . $check['error_message']));
|
||||
$log->logMessage(__FILE__,__LINE__,'Error in Prestashop`s Id : ' . $check['ids'].'/n'.'Error Message(s):' . $check['error_message'],"CRITICAL");
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
return parent::postProcess();
|
||||
}
|
||||
|
||||
public function processDelete(){
|
||||
$record_id = Tools::getValue('id');
|
||||
if ($record_id){
|
||||
Db::getInstance()->delete('erp_address_merge','id='.$record_id);
|
||||
}
|
||||
}
|
||||
|
||||
public function initToolbar(){
|
||||
$this->page_header_toolbar_btn['refresh'] = array(
|
||||
'href' => self::$currentIndex.'&synchronize=1&token=' . $this->token . '',
|
||||
'desc' => $this->l('Synchronize')
|
||||
);
|
||||
|
||||
unset($this->toolbar_btn['new']);
|
||||
$this->toolbar_btn['wk_hide'] = array(
|
||||
'desc' => $this->l('')
|
||||
);
|
||||
}
|
||||
|
||||
public function setMedia(){
|
||||
parent::setMedia();
|
||||
$this->addJS(_MODULE_DIR_.'prestaerp/views/js/pob_js.js');
|
||||
}
|
||||
|
||||
public function processBulkDelete(){
|
||||
$result = true;
|
||||
if (is_array($this->boxes) && !empty($this->boxes)){
|
||||
foreach ($this->boxes as $id_data) {
|
||||
Db::getInstance()->delete('erp_address_merge', 'id = ' . (int) $id_data);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You must select at least one element to delete.');
|
||||
}
|
||||
|
||||
public function renderView(){
|
||||
$id = Tools::getValue('id');
|
||||
$id_lang = $this->context->language->id;
|
||||
if ($id)
|
||||
{
|
||||
$obj_cust_address = new ErpCustomerAddress();
|
||||
$cust_address_tpl = $obj_cust_address->address_details($id);
|
||||
$this->context->smarty->assign('cust_address_tpl', $cust_address_tpl);
|
||||
$this->context->smarty->assign('modules_dir', _MODULE_DIR_);
|
||||
}
|
||||
return parent::renderView();
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
@ -0,0 +1,194 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class AdminErpCustomerController extends ModuleAdminController{
|
||||
|
||||
public function __construct(){
|
||||
$this->bootstrap = true;
|
||||
$this->table = 'erp_customer_merge';
|
||||
$this->className = 'ErpCustomer';
|
||||
$this->lang = false;
|
||||
$this->add = true;
|
||||
$this->edit = true;
|
||||
$this->delete = true;
|
||||
$this->view = true;
|
||||
$this->imageType = 'jpg';
|
||||
// $this->list_no_link = true;
|
||||
$this->context = Context::getContext();
|
||||
$this->addRowAction('delete');
|
||||
$this->addRowAction('view');
|
||||
$this->fields_list = array(
|
||||
'id' => array(
|
||||
'title' => 'Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'erp_customer_id' => array(
|
||||
'title' => 'Erp Customer Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'prestashop_customer_id' => array(
|
||||
'title' => 'Prestashop Customer Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'created_by' => array(
|
||||
'title' => 'Created By',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'created_on' => array(
|
||||
'title' => 'Created on',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'is_synch' => array(
|
||||
'title' => $this->l('Is Synchronised'),
|
||||
'align' => 'center',
|
||||
'type' => 'bool',
|
||||
'width' => 'auto',
|
||||
'icon' => array(
|
||||
1 => array(
|
||||
'src' => 'enabled-2.gif',
|
||||
'alt' => $this->l('Synchronized')
|
||||
),
|
||||
0 => array(
|
||||
'src' => 'disabled.gif',
|
||||
'alt' => $this->l('Need Synchronization')
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
$this->bulk_actions = array(
|
||||
'delete' => array(
|
||||
'text' => $this->l('Delete selected'),
|
||||
'confirm' => $this->l('Delete selected items?')
|
||||
)
|
||||
);
|
||||
$this->identifier = 'id';
|
||||
parent::__construct();
|
||||
$index = count($this->_conf)+1;
|
||||
$this->_conf[$index] = $this->l('All Customers(s) successfully exported to Odoo.');
|
||||
}
|
||||
|
||||
public function postProcess(){
|
||||
if (!$this->loadObject(true))
|
||||
return;
|
||||
$log = new pob_log();
|
||||
if (Tools::getValue('synchronize')) {
|
||||
if (!class_exists('xmlrpc_client'))
|
||||
include_once 'xmlrpc.inc';
|
||||
$client = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/object");
|
||||
$sock = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/common");
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpUsername"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), 'string'));
|
||||
$resp = $sock->send($msg);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,'Connection Error : Invalid Odoo Information.','ERROR');
|
||||
$this->errors[] = Tools::displayError($this->l('Connection Error : Invalid Odoo Information.' . $error_message));
|
||||
} else {
|
||||
$userId = $resp->value()->scalarval();
|
||||
if ($userId <= 0){
|
||||
$log->logMessage(__FILE__,__LINE__,'Invalid UserName or Password. Please check the Odoo configuration.','ERROR');
|
||||
$this->errors[] = Tools::displayError($this->l('Invalid UserName or Password. Please check the Odoo configuration.'));}
|
||||
else {
|
||||
$presta_user = $this->context->employee->firstname . ' ' . $this->context->employee->lastname . ' (' . $this->context->employee->email . ')';
|
||||
$customer = new ErpCustomer();
|
||||
$check = $customer->check_all_customers($userId, $client, $presta_user);
|
||||
$index = count($this->_conf);
|
||||
if ($check['is_error'] == 0 && $check['value'] == 1) {
|
||||
Tools::redirectAdmin(self::$currentIndex . '&conf=' . $index . '&token=' . $this->token);
|
||||
$log->logMessage(__FILE__,__LINE__,'All Customer(s) successfully exported to Odoo.','INFO');
|
||||
} elseif ($check['is_error'] == 0 && $check['value'] == 0)
|
||||
$this->displayInformation($this->l('No new Customer(s) found.'));
|
||||
else {
|
||||
$this->errors[] = Tools::displayError($this->l('Error in Prestashop`s Id : ' . $check['ids']));
|
||||
$this->errors[] = Tools::displayError($this->l('Error Message(s):' . $check['error_message']));
|
||||
$log->logMessage(__FILE__,__LINE__,'Error in Prestashop`s Id : ' . $check['ids'].'/n'.'Error Message(s):' . $check['error_message'],'CRITICAL');
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
return parent::postProcess();
|
||||
}
|
||||
|
||||
public function processDelete(){
|
||||
$record_id = Tools::getValue('id');
|
||||
if ($record_id){
|
||||
Db::getInstance()->delete('erp_customer_merge','id='.$record_id);
|
||||
}
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar(){
|
||||
parent::initPageHeaderToolbar();
|
||||
$this->context->smarty->clearAssign('help_link');
|
||||
}
|
||||
|
||||
public function initToolbar(){
|
||||
$this->page_header_toolbar_btn['refresh'] = array(
|
||||
'href' => self::$currentIndex.'&synchronize=1&token=' . $this->token . '',
|
||||
'desc' => $this->l('Synchronize')
|
||||
);
|
||||
parent::initToolbar();
|
||||
unset($this->toolbar_btn['new']);
|
||||
$this->toolbar_btn['wk_hide'] = array(
|
||||
'desc' => $this->l('')
|
||||
);
|
||||
}
|
||||
|
||||
public function setMedia(){
|
||||
parent::setMedia();
|
||||
$this->addJS(_MODULE_DIR_.'prestaerp/views/js/pob_js.js');
|
||||
}
|
||||
|
||||
public function processBulkDelete(){
|
||||
$result = true;
|
||||
if (is_array($this->boxes) && !empty($this->boxes)){
|
||||
foreach ($this->boxes as $id_data) {
|
||||
Db::getInstance()->delete('erp_customer_merge', 'id = ' . (int) $id_data);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You must select at least one element to delete.');
|
||||
|
||||
}
|
||||
|
||||
public function renderView(){
|
||||
$id = Tools::getValue('id');
|
||||
$id_lang = $this->context->language->id;
|
||||
if ($id)
|
||||
{
|
||||
$obj_customer = new ErpCustomer();
|
||||
$customer_tpl = $obj_customer->customer_details($id);
|
||||
$this->context->smarty->assign('customer_tpl', $customer_tpl);
|
||||
$this->context->smarty->assign('modules_dir', _MODULE_DIR_);
|
||||
}
|
||||
return parent::renderView();
|
||||
}
|
||||
}
|
||||
?>
|
126
modules/prestaerp/controllers/admin/AdminErpOrdersController.php
Normal file
126
modules/prestaerp/controllers/admin/AdminErpOrdersController.php
Normal file
@ -0,0 +1,126 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class AdminErpOrdersController extends ModuleAdminController
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->bootstrap = true;
|
||||
$this->table = 'erp_order_merge';
|
||||
$this->className = 'ErpOrders';
|
||||
$this->lang = false;
|
||||
$this->add = true;
|
||||
$this->edit = true;
|
||||
$this->delete = true;
|
||||
$this->view = true;
|
||||
// $this->list_no_link = true;
|
||||
$this->imageType = 'jpg';
|
||||
$this->context = Context::getContext();
|
||||
$this->addRowAction('delete');
|
||||
$this->addRowAction('view');
|
||||
|
||||
$this->fields_list = array(
|
||||
'id' => array(
|
||||
'title' => 'Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'prst_order_id' => array(
|
||||
'title' => 'Prestashop Order Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'erp_order_id' => array(
|
||||
'title' => 'Erp Order Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'erp_order_name' => array(
|
||||
'title' => 'Erp Order Reference',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'created_on' => array(
|
||||
'title' => 'Created on',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
);
|
||||
$this->bulk_actions = array(
|
||||
'delete' => array(
|
||||
'text' => $this->l('Delete selected'),
|
||||
'confirm' => $this->l('Delete selected items?')
|
||||
)
|
||||
);
|
||||
$this->identifier = 'id';
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function processDelete(){
|
||||
$record_id = Tools::getValue('id');
|
||||
if ($record_id){
|
||||
Db::getInstance()->delete('erp_order_merge','id='.$record_id);
|
||||
}
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
parent::initPageHeaderToolbar();
|
||||
$this->context->smarty->clearAssign('help_link');
|
||||
}
|
||||
|
||||
public function initToolbar(){
|
||||
parent::initToolbar();
|
||||
|
||||
unset($this->toolbar_btn['new']);
|
||||
$this->toolbar_btn['wk_hide'] = array(
|
||||
'desc' => $this->l('')
|
||||
);
|
||||
}
|
||||
|
||||
public function processBulkDelete(){
|
||||
$result = true;
|
||||
if (is_array($this->boxes) && !empty($this->boxes)){
|
||||
foreach ($this->boxes as $id_data) {
|
||||
Db::getInstance()->delete('erp_order_merge', 'id = ' . (int) $id_data);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You must select at least one element to delete.');
|
||||
|
||||
}
|
||||
public function renderView(){
|
||||
$id = Tools::getValue('id');
|
||||
$id_lang = $this->context->language->id;
|
||||
if ($id)
|
||||
{
|
||||
$obj_ps_erp_order = new ErpOrders();
|
||||
$order_tpl = $obj_ps_erp_order->order_details($id);
|
||||
$this->context->smarty->assign('order_tpl', $order_tpl);
|
||||
$this->context->smarty->assign('modules_dir', _MODULE_DIR_);
|
||||
}
|
||||
return parent::renderView();
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
@ -0,0 +1,310 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class AdminErpPaymentMethodController extends ModuleAdminController
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->bootstrap = true;
|
||||
$this->table = 'erp_payment_merge';
|
||||
$this->className = 'ErpPaymentMethod';
|
||||
$this->lang = false;
|
||||
$this->add = true;
|
||||
$this->edit = true;
|
||||
$this->delete = true;
|
||||
$this->view = true;
|
||||
// $this->list_no_link = true;
|
||||
$this->imageType = 'jpg';
|
||||
$this->context = Context::getContext();
|
||||
$this->addRowAction('delete');
|
||||
$this->addRowAction('view');
|
||||
|
||||
$this->fields_list = array(
|
||||
'id' => array(
|
||||
'title' => 'Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'erp_payment_id' => array(
|
||||
'title' => 'Erp Payment Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'prestashop_payment_id' => array(
|
||||
'title' => 'Prestashop Payment Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'created_by' => array(
|
||||
'title' => 'Created By',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'created_on' => array(
|
||||
'title' => 'Created on',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
)
|
||||
);
|
||||
$this->bulk_actions = array(
|
||||
'delete' => array(
|
||||
'text' => $this->l('Delete selected'),
|
||||
'confirm' => $this->l('Delete selected items?')
|
||||
)
|
||||
);
|
||||
$this->identifier = 'id';
|
||||
parent::__construct();
|
||||
$index = count($this->_conf)+1;
|
||||
$this->_conf[$index] = $this->l('All Payment method(s) successfully exported to Odoo.');
|
||||
}
|
||||
|
||||
public function postProcess() {
|
||||
if (!$this->loadObject(true))
|
||||
return;
|
||||
if (Tools::getValue('synchronize')) {
|
||||
if (!class_exists('xmlrpc_client'))
|
||||
include_once 'xmlrpc.inc';
|
||||
$log = new pob_log();
|
||||
$client = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/object");
|
||||
$sock = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/common");
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpUsername"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), 'string'));
|
||||
$resp = $sock->send($msg);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,'Connection Error : Invalid Odoo Information.',"ERROR");
|
||||
$this->errors[] = Tools::displayError($this->l('Connection Error : Invalid Odoo Information.' . $error_message));
|
||||
} else {
|
||||
$userId = $resp->value()->scalarval();
|
||||
if ($userId <= 0){
|
||||
$log->logMessage(__FILE__,__LINE__,'Invalid UserName or Password. Please check the Odoo configuration.',"ERROR");
|
||||
$this->errors[] = Tools::displayError($this->l('Invalid UserName or Password. Please check the Odoo configuration.'));}
|
||||
else {
|
||||
$presta_user = $this->context->employee->firstname . ' ' . $this->context->employee->lastname . ' (' . $this->context->employee->email . ')';
|
||||
$payment = new ErpPaymentMethod();
|
||||
$check = $payment->check_all_payment_methods($userId, $client, $presta_user);
|
||||
$index = count($this->_conf);
|
||||
if ($check['is_error'] == 0 && $check['value'] == 1) {
|
||||
Tools::redirectAdmin(self::$currentIndex . '&conf=' . $index . '&token=' . $this->token);
|
||||
$log->logMessage(__FILE__,__LINE__,'All Payment Method(s) successfully exported to Odoo.','INFO');
|
||||
} elseif ($check['is_error'] == 0 && $check['value'] == 0) {
|
||||
Tools::redirectAdmin(self::$currentIndex . '&conf=' . $index . '&token=' . $this->token);
|
||||
} else {
|
||||
$this->errors[] = Tools::displayError($this->l('Error in Prestashop`s Id : ' . $check['ids']));
|
||||
$this->errors[] = Tools::displayError($this->l('Error Message(s):' . $check['error_message']));
|
||||
$log->logMessage(__FILE__,__LINE__,'Error in Prestashop`s Id : ' . $check['ids'].'/n'.'Error Message(s):' . $check['error_message'],"CRITICAL");
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
return parent::postProcess();
|
||||
}
|
||||
|
||||
public function processDelete(){
|
||||
$record_id = Tools::getValue('id');
|
||||
if ($record_id){
|
||||
Db::getInstance()->delete('erp_payment_merge','id='.$record_id);
|
||||
}
|
||||
}
|
||||
|
||||
public function initToolbar(){
|
||||
$this->page_header_toolbar_btn['refresh'] = array(
|
||||
'href' => self::$currentIndex.'&synchronize=1&token=' . $this->token . '',
|
||||
'desc' => $this->l('Synchronize')
|
||||
);
|
||||
|
||||
$this->page_header_toolbar_btn['manual_map'] = array(
|
||||
'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token.'&manualmap=1',
|
||||
'desc' => $this->l('Manual Mapping'),
|
||||
'imgclass' => 'new'
|
||||
);
|
||||
parent::initToolbar();
|
||||
unset($this->toolbar_btn['new']);
|
||||
$this->toolbar_btn['wk_hide'] = array(
|
||||
'desc' => $this->l('')
|
||||
);
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar() {
|
||||
parent::initPageHeaderToolbar();
|
||||
$this->context->smarty->clearAssign('help_link');
|
||||
}
|
||||
|
||||
public function setMedia(){
|
||||
parent::setMedia();
|
||||
$this->addJS(_MODULE_DIR_.'prestaerp/views/js/pob_js.js');
|
||||
}
|
||||
|
||||
public function processBulkDelete(){
|
||||
$result = true;
|
||||
if (is_array($this->boxes) && !empty($this->boxes)){
|
||||
foreach ($this->boxes as $id_data) {
|
||||
Db::getInstance()->delete('erp_payment_merge', 'id = ' . (int) $id_data);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You must select at least one element to delete.');
|
||||
}
|
||||
|
||||
|
||||
public function renderView(){
|
||||
$id = Tools::getValue('id');
|
||||
$id_lang = $this->context->language->id;
|
||||
if ($id)
|
||||
{
|
||||
$obj_payment_method = new ErpPaymentMethod();
|
||||
$payment_method_tpl = $obj_payment_method->payment_method_details($id);
|
||||
$this->context->smarty->assign('payment_method_tpl', $payment_method_tpl);
|
||||
$this->context->smarty->assign('modules_dir', _MODULE_DIR_);
|
||||
}
|
||||
return parent::renderView();
|
||||
}
|
||||
|
||||
|
||||
public function renderForm(){
|
||||
$log = new pob_log();
|
||||
if (!class_exists('xmlrpc_client'))
|
||||
include_once 'xmlrpc.inc';
|
||||
$client = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/object");
|
||||
$sock = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/common");
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpUsername"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), 'string'));
|
||||
$resp = $sock->send($msg);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,'Connection Error : Invalid Odoo Information.',"CRITICAL");
|
||||
$this->errors[] = Tools::displayError($this->l('Connection Error : Invalid Odoo Information.' . $error_message));
|
||||
} else {
|
||||
$userId = $resp->value()->scalarval();
|
||||
$key1 = array( new xmlrpcval('bank', 'string'),
|
||||
new xmlrpcval('cash', 'string') );
|
||||
$key = array(new xmlrpcval(
|
||||
array( new xmlrpcval('type' , "string"),
|
||||
new xmlrpcval('in',"string"),
|
||||
new xmlrpcval($key1,"array")),"array"),
|
||||
);
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("account.journal", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("search", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($key, "array"));
|
||||
$resp0 = $client->send($msg_ser);
|
||||
if ($resp0->faultCode()) {
|
||||
$error_message = $resp0->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,$error_message,"Critical");
|
||||
$this->errors[] = Tools::displayError($this->l('Error : ' . $error_message));
|
||||
} else {
|
||||
$val = $resp0->value()->me['array'];
|
||||
$key1 = array(
|
||||
new xmlrpcval('id', 'integer'),
|
||||
new xmlrpcval('name', 'string'),
|
||||
new xmlrpcval('code', 'string')
|
||||
);
|
||||
$msg_ser1 = new xmlrpcmsg('execute');
|
||||
$msg_ser1->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser1->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval("account.journal", "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval("read", "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval($val, "array"));
|
||||
$msg_ser1->addParam(new xmlrpcval($key1, "array"));
|
||||
$resp1 = $client->send($msg_ser1);
|
||||
if ($resp1->faultCode()) {
|
||||
$error_message = $resp1->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,$error_message,"Critical");
|
||||
$this->errors[] = Tools::displayError($this->l('Error : ' . $error_message));
|
||||
} else {
|
||||
$value_array = $resp1->value()->scalarval();
|
||||
$count = count($value_array);
|
||||
$arr = array();
|
||||
for ($x = 0; $x < $count; $x++) {
|
||||
$arr[$x]['id'] = $value_array[$x]->me['struct']['id']->me['int'];
|
||||
$arr[$x]['name'] = $value_array[$x]->me['struct']['name']->me['string'] . ' (' . $value_array[$x]->me['struct']['code']->me['string'] . ')'.' - ID:'.$value_array[$x]->me['struct']['id']->me['int'];
|
||||
}
|
||||
|
||||
$this->fields_form = array(
|
||||
'legend' => array(
|
||||
'title' => $this->l('Manual Payment Mapping'),
|
||||
'image' => '../modules/prestaerp/views/img/ErpProducts.png'
|
||||
),
|
||||
'input' => array(
|
||||
array(
|
||||
'type' => 'select',
|
||||
'label' => $this->l('Odoo Payment(Journal)'),
|
||||
'name' => 'erpname',
|
||||
'lang' => true,
|
||||
'width' => 13,
|
||||
'options' => array(
|
||||
'query' => $arr,
|
||||
'id' => 'id',
|
||||
'name' => 'name'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'type' => 'select',
|
||||
'label' => $this->l('Prestashop Payment Method'),
|
||||
'name' => 'prestaname',
|
||||
'lang' => true,
|
||||
'width' => 1000,
|
||||
'options' => array(
|
||||
'query' => PaymentModule::getInstalledPaymentModules(),
|
||||
'id' => 'id_module',
|
||||
'name' => 'name'
|
||||
)
|
||||
)
|
||||
),
|
||||
'submit' => array(
|
||||
'title' => $this->l(' Save '),
|
||||
'class' => 'button'
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
return parent::renderForm();
|
||||
}
|
||||
|
||||
public function processSave(){
|
||||
$erp_payment_id = Tools::getValue('erpname');
|
||||
$prestashop_payment_id = Tools::getValue('prestaname');
|
||||
$p_count = Db::getInstance()->executeS("SELECT * from `" . _DB_PREFIX_ . "erp_payment_merge` where `prestashop_payment_id`=" . $prestashop_payment_id);
|
||||
if (count($p_count) > 0) {
|
||||
$this->errors[] = Tools::displayError($this->l('This prestaShop Id has been already mapped.'));
|
||||
$this->display = 'add';
|
||||
}
|
||||
if ((count($p_count) <= 0)){
|
||||
$presta_user = $this->context->employee->firstname . ' ' . $this->context->employee->lastname . ' (' . $this->context->employee->email . ')';
|
||||
$payment = new ErpPaymentMethod();
|
||||
$payment->addto_payment_merge($erp_payment_id,'None',$prestashop_payment_id, $presta_user);
|
||||
Tools::redirectAdmin(self::$currentIndex . '&conf=' . 3 . '&token=' . $this->token);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
@ -0,0 +1,321 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class AdminErpProductAttributeController extends ModuleAdminController{
|
||||
|
||||
public function __construct(){
|
||||
$this->bootstrap = true;
|
||||
$this->table = 'erp_attributes_merge';
|
||||
$this->className = 'ErpProductAttribute';
|
||||
$this->lang = false;
|
||||
$this->add = true;
|
||||
$this->edit = true;
|
||||
$this->delete = true;
|
||||
$this->view = true;
|
||||
$this->imageType = 'jpg';
|
||||
// $this->list_no_link = true;
|
||||
$this->context = Context::getContext();
|
||||
$this->addRowAction('delete');
|
||||
$this->addRowAction('view');
|
||||
$this->fields_list = array(
|
||||
'id' => array(
|
||||
'title' => 'Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'erp_attribute_id' => array(
|
||||
'title' => 'Erp Attribute Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'prestashop_attribute_id' => array(
|
||||
'title' => 'Prestashop Attribute Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'created_by' => array(
|
||||
'title' => 'Created By',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'created_on' => array(
|
||||
'title' => 'Created on',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'is_synch' => array(
|
||||
'title' => $this->l('Need Synchronization'),
|
||||
'align' => 'center',
|
||||
'type' => 'bool',
|
||||
'width' => 'auto',
|
||||
'icon' => array(
|
||||
1 => array(
|
||||
'src' => 'enabled-2.gif',
|
||||
'alt' => $this->l('Synchronized')
|
||||
),
|
||||
0 => array(
|
||||
'src' => 'disabled.gif',
|
||||
'alt' => $this->l('Need Synchronization')
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
if (Configuration::getGlobalValue("ErpMultiLang"))
|
||||
{
|
||||
$this->fields_list['translate_state']=array('title' => $this->l('Translation State'),'align' => 'center',
|
||||
'width' => 'auto','color'=>'color');
|
||||
}
|
||||
$this->bulk_actions = array(
|
||||
'delete' => array(
|
||||
'text' => $this->l('Delete selected'),
|
||||
'confirm' => $this->l('Delete selected items?')
|
||||
)
|
||||
);
|
||||
$this->identifier = 'id';
|
||||
parent::__construct();
|
||||
$index = count($this->_conf)+1;
|
||||
$this->_conf[$index] = $this->l('All Attribute(s) successfully exported to Odoo.');
|
||||
}
|
||||
|
||||
public function postProcess(){
|
||||
if (!$this->loadObject(true))
|
||||
return;
|
||||
if (Tools::getValue('synchronize')) {
|
||||
if (!class_exists('xmlrpc_client'))
|
||||
include_once 'xmlrpc.inc';
|
||||
$client = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/object");
|
||||
$sock = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/common");
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpUsername"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), 'string'));
|
||||
$resp = $sock->send($msg);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$this->errors[] = Tools::displayError($this->l('Connection Error : Invalid Odoo Information.' . $error_message));
|
||||
} else {
|
||||
$userId = $resp->value()->scalarval();
|
||||
if ($userId <= 0)
|
||||
$this->errors[] = Tools::displayError($this->l('Invalid UserName or Password. Please check the Odoo configuration.'));
|
||||
else {
|
||||
$presta_user = $this->context->employee->firstname . ' ' . $this->context->employee->lastname . ' (' . $this->context->employee->email . ')';
|
||||
$attribute = new ErpProductAttribute();
|
||||
$check = $attribute->check_all_attributes($userId, $client, $presta_user);
|
||||
$index = count($this->_conf);
|
||||
if ($check['is_error'] == 0 && $check['value'] == 1) {
|
||||
Tools::redirectAdmin(self::$currentIndex . '&conf=' . $index . '&token=' . $this->token);
|
||||
} elseif ($check['is_error'] == 0 && $check['value'] == 0) {
|
||||
$this->displayInformation($this->l('No new Attribute(s) found.'));
|
||||
} else {
|
||||
$this->errors[] = Tools::displayError($this->l('Error in Prestashop`s Id : ' . $check['ids']));
|
||||
$this->errors[] = Tools::displayError($this->l('Error Message(s):' . $check['error_message']));
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
return parent::postProcess();
|
||||
}
|
||||
|
||||
public function processDelete(){
|
||||
$record_id = Tools::getValue('id');
|
||||
if ($record_id){
|
||||
Db::getInstance()->delete('erp_attributes_merge','id='.$record_id);
|
||||
}
|
||||
}
|
||||
|
||||
public function initToolbar(){
|
||||
$this->page_header_toolbar_btn['refresh'] = array(
|
||||
'href' => self::$currentIndex.'&synchronize=1&token=' . $this->token . '',
|
||||
'desc' => $this->l('Synchronize')
|
||||
);
|
||||
|
||||
$this->page_header_toolbar_btn['manual_map'] = array(
|
||||
'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token.'&manualmap=1',
|
||||
'desc' => $this->l('Manual Mapping'),
|
||||
'imgclass' => 'new'
|
||||
);
|
||||
parent::initToolbar();
|
||||
unset($this->toolbar_btn['new']);
|
||||
$this->toolbar_btn['wk_hide'] = array(
|
||||
'desc' => $this->l('')
|
||||
);
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar(){
|
||||
parent::initPageHeaderToolbar();
|
||||
$this->context->smarty->clearAssign('help_link');
|
||||
}
|
||||
|
||||
public function setMedia(){
|
||||
parent::setMedia();
|
||||
$this->addJS(_MODULE_DIR_.'prestaerp/views/js/pob_js.js');
|
||||
}
|
||||
|
||||
public function processBulkDelete(){
|
||||
$result = true;
|
||||
if (is_array($this->boxes) && !empty($this->boxes)){
|
||||
foreach ($this->boxes as $id_data) {
|
||||
Db::getInstance()->delete('erp_attributes_merge', 'id = ' . (int) $id_data);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You must select at least one element to delete.');
|
||||
}
|
||||
|
||||
public function renderView(){
|
||||
$id = Tools::getValue('id');
|
||||
$id_lang = $this->context->language->id;
|
||||
if ($id)
|
||||
{
|
||||
$obj_attr = new ErpProductAttribute();
|
||||
$attr_tpl = $obj_attr->attr_details($id);
|
||||
$this->context->smarty->assign('attr_tpl', $attr_tpl);
|
||||
$this->context->smarty->assign('modules_dir', _MODULE_DIR_);
|
||||
}
|
||||
return parent::renderView();
|
||||
}
|
||||
|
||||
public function renderForm(){
|
||||
$log = new pob_log();
|
||||
if (!class_exists('xmlrpc_client'))
|
||||
include_once 'xmlrpc.inc';
|
||||
$client = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/object");
|
||||
$sock = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/common");
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpUsername"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), 'string'));
|
||||
$resp = $sock->send($msg);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,'Connection Error : Invalid Odoo Information.',"CRITICAL");
|
||||
$this->errors[] = Tools::displayError($this->l('Connection Error : Invalid Odoo Information.' . $error_message));
|
||||
} else {
|
||||
$userId = $resp->value()->scalarval();
|
||||
$key = array();
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("product.attribute", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("search", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($key, "array"));
|
||||
$resp0 = $client->send($msg_ser);
|
||||
if ($resp0->faultCode()) {
|
||||
$error_message = $resp0->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,$error_message,"CRITICAL");
|
||||
$this->errors[] = Tools::displayError($this->l('Error : ' . $error_message));
|
||||
} else {
|
||||
$val = $resp0->value()->me['array'];
|
||||
$key1 = array(
|
||||
new xmlrpcval('id', 'integer'),
|
||||
new xmlrpcval('name', 'string')
|
||||
);
|
||||
$msg_ser1 = new xmlrpcmsg('execute');
|
||||
$msg_ser1->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser1->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval("product.attribute", "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval("read", "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval($val, "array"));
|
||||
$msg_ser1->addParam(new xmlrpcval($key1, "array"));
|
||||
$resp1 = $client->send($msg_ser1);
|
||||
if ($resp1->faultCode()) {
|
||||
$error_message = $resp1->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,$error_message,"CRITICAL");
|
||||
$this->errors[] = Tools::displayError($this->l('Error : ' . $error_message));
|
||||
} else {
|
||||
$arr=array();
|
||||
$value_array = $resp1->value()->scalarval();
|
||||
$count = count($value_array);
|
||||
for ($x = 0; $x < $count; $x++) {
|
||||
$arr[$x]['id'] = $value_array[$x]->me['struct']['id']->me['int'];
|
||||
$arr[$x]['name'] = $value_array[$x]->me['struct']['name']->me['string'];
|
||||
}
|
||||
$this->fields_form = array(
|
||||
'legend' => array(
|
||||
'title' => $this->l('Manual Product`s Attribute Mapping'),
|
||||
'image' => '../modules/prestaerp/views/img/ErpProducts.png'
|
||||
),
|
||||
'input' => array(
|
||||
array(
|
||||
'type' => 'select',
|
||||
'label' => $this->l('Odoo Product`s Attribute'),
|
||||
'name' => 'erpname',
|
||||
'lang' => true,
|
||||
'width' => 13,
|
||||
'options' => array(
|
||||
'query' => $arr,
|
||||
'id' => 'id',
|
||||
'name' => 'name'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'type' => 'select',
|
||||
'label' => $this->l('Prestashop Product`s Attribute'),
|
||||
'name' => 'prestaname',
|
||||
'lang' => true,
|
||||
'width' => 1000,
|
||||
'options' => array(
|
||||
'query' => AttributeGroup::getAttributesGroups(Configuration::get('PS_LANG_DEFAULT')),
|
||||
'id' => 'id_attribute_group',
|
||||
'name' => 'name'
|
||||
)
|
||||
)
|
||||
),
|
||||
'submit' => array(
|
||||
'title' => $this->l('Save'),
|
||||
'class' => 'button'
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
return parent::renderForm();
|
||||
}
|
||||
|
||||
public function processSave(){
|
||||
$erp_attribute_id = Tools::getValue('erpname');
|
||||
$prestashop_attribute_id = Tools::getValue('prestaname');
|
||||
$e_count = Db::getInstance()->executeS("SELECT * from `" . _DB_PREFIX_ . "erp_attributes_merge` where `erp_attribute_id`=" . $erp_attribute_id);
|
||||
$p_count = Db::getInstance()->executeS("SELECT * from `" . _DB_PREFIX_ . "erp_attributes_merge` where `prestashop_attribute_id`=" . $prestashop_attribute_id);
|
||||
if (count($e_count) > 0) {
|
||||
$this->errors[] = Tools::displayError($this->l('This Odoo Id has been already mapped.'));
|
||||
$this->display = 'add';
|
||||
}
|
||||
if (count($p_count) > 0) {
|
||||
$this->errors[] = Tools::displayError($this->l('This PrestaShop Id has been already mapped.'));
|
||||
$this->display = 'add';
|
||||
}
|
||||
if ((count($p_count) <= 0) && (count($e_count) <= 0)){
|
||||
$presta_user = $this->context->employee->firstname . ' ' . $this->context->employee->lastname . ' (' . $this->context->employee->email . ')';
|
||||
$attribute = new ErpProductAttribute();
|
||||
$attribute->addto_attribute_merge($prestashop_attribute_id,$erp_attribute_id,$presta_user);
|
||||
Tools::redirectAdmin(self::$currentIndex . '&conf=' . 3 . '&token=' . $this->token);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
@ -0,0 +1,336 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class AdminErpProductAttributeValueController extends ModuleAdminController{
|
||||
|
||||
public function __construct(){
|
||||
$this->bootstrap = true;
|
||||
$this->table = 'erp_attribute_values_merge';
|
||||
$this->className = 'ErpProductAttributeValue';
|
||||
$this->lang = false;
|
||||
$this->add = true;
|
||||
$this->edit = true;
|
||||
$this->delete = true;
|
||||
$this->view = true;
|
||||
$this->imageType = 'jpg';
|
||||
// $this->list_no_link = true;
|
||||
$this->context = Context::getContext();
|
||||
$this->addRowAction('delete');
|
||||
$this->addRowAction('view');
|
||||
|
||||
$this->fields_list = array(
|
||||
'id' => array(
|
||||
'title' => 'Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'erp_attribute_id' => array(
|
||||
'title' => 'Erp Attribute Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'prestashop_attribute_id' => array(
|
||||
'title' => 'Prestashop Attribute Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'erp_attribute_value_id' => array(
|
||||
'title' => 'Erp Attribute Value Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'prestashop_attribute_value_id' => array(
|
||||
'title' => 'Prestashop Attribute Value Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'created_by' => array(
|
||||
'title' => 'Created By',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'created_on' => array(
|
||||
'title' => 'Created on',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'is_synch' => array(
|
||||
'title' => $this->l('Need Synchronization'),
|
||||
'align' => 'center',
|
||||
'type' => 'bool',
|
||||
'width' => 'auto',
|
||||
'icon' => array(
|
||||
1 => array(
|
||||
'src' => 'enabled-2.gif',
|
||||
'alt' => $this->l('Synchronized')
|
||||
),
|
||||
0 => array(
|
||||
'src' => 'disabled.gif',
|
||||
'alt' => $this->l('Need Synchronization')
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
if (Configuration::getGlobalValue("ErpMultiLang"))
|
||||
{
|
||||
$this->fields_list['translate_state']=array('title' => $this->l('Translation state'),'align' => 'center',
|
||||
'width' => 'auto','color'=>'color');
|
||||
}
|
||||
$this->bulk_actions = array(
|
||||
'delete' => array(
|
||||
'text' => $this->l('Delete selected'),
|
||||
'confirm' => $this->l('Delete selected items?')
|
||||
)
|
||||
);
|
||||
$this->identifier = 'id';
|
||||
parent::__construct();
|
||||
$index = count($this->_conf)+1;
|
||||
$this->_conf[$index] = $this->l('All Attribute Value(s) successfully exported to Odoo.');
|
||||
}
|
||||
|
||||
public function postProcess(){
|
||||
if (!$this->loadObject(true))
|
||||
return;
|
||||
if (Tools::getValue('synchronize')) {
|
||||
if (!class_exists('xmlrpc_client'))
|
||||
include_once 'xmlrpc.inc';
|
||||
$client = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/object");
|
||||
$sock = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/common");
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpUsername"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), 'string'));
|
||||
$resp = $sock->send($msg);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$this->errors[] = Tools::displayError($this->l('Connection Error : Invalid Odoo Information.' . $error_message));
|
||||
} else {
|
||||
$userId = $resp->value()->scalarval();
|
||||
if ($userId <= 0)
|
||||
$this->errors[] = Tools::displayError($this->l('Invalid UserName or Password. Please check the Odoo configuration.'));
|
||||
else {
|
||||
$presta_user = $this->context->employee->firstname . ' ' . $this->context->employee->lastname . ' (' . $this->context->employee->email . ')';
|
||||
$attribute = new ErpProductAttributeValue();
|
||||
$check = $attribute->check_all_attribute_values($userId, $client, $presta_user);
|
||||
$index = count($this->_conf);
|
||||
if ($check['is_error'] == 0 && $check['value'] == 1) {
|
||||
Tools::redirectAdmin(self::$currentIndex . '&conf=' . $index . '&token=' . $this->token);
|
||||
} elseif ($check['is_error'] == 0 && $check['value'] == 0) {
|
||||
$this->displayInformation($this->l('No new Attribute(s) found.'));
|
||||
} else {
|
||||
$this->errors[] = Tools::displayError($this->l('Error in Prestashop`s Id : ' . $check['ids']));
|
||||
$this->errors[] = Tools::displayError($this->l('Error Message(s):' . $check['error_message']));
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
return parent::postProcess();
|
||||
}
|
||||
|
||||
public function processDelete(){
|
||||
$record_id = Tools::getValue('id');
|
||||
if ($record_id){
|
||||
Db::getInstance()->delete('erp_attribute_values_merge','id='.$record_id);
|
||||
}
|
||||
}
|
||||
|
||||
public function initToolbar(){
|
||||
$this->page_header_toolbar_btn['refresh'] = array(
|
||||
'href' => self::$currentIndex.'&synchronize=1&token=' . $this->token . '',
|
||||
'desc' => $this->l('Synchronize')
|
||||
);
|
||||
|
||||
$this->page_header_toolbar_btn['manual_map'] = array(
|
||||
'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token.'&manualmap=1',
|
||||
'desc' => $this->l('Manual Mapping'),
|
||||
'imgclass' => 'new'
|
||||
);
|
||||
parent::initToolbar();
|
||||
unset($this->toolbar_btn['new']);
|
||||
$this->toolbar_btn['wk_hide'] = array(
|
||||
'desc' => $this->l('')
|
||||
);
|
||||
}
|
||||
|
||||
public function setMedia(){
|
||||
parent::setMedia();
|
||||
$this->addJS(_MODULE_DIR_.'prestaerp/views/js/pob_js.js');
|
||||
}
|
||||
|
||||
public function processBulkDelete(){
|
||||
if (is_array($this->boxes) && !empty($this->boxes)){
|
||||
foreach ($this->boxes as $id_data) {
|
||||
Db::getInstance()->delete('erp_attribute_values_merge', 'id = ' . (int) $id_data);
|
||||
}
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You must select at least one element to delete.');
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar(){
|
||||
parent::initPageHeaderToolbar();
|
||||
$this->context->smarty->clearAssign('help_link');
|
||||
}
|
||||
|
||||
public function renderView(){
|
||||
$id = Tools::getValue('id');
|
||||
$id_lang = $this->context->language->id;
|
||||
if ($id)
|
||||
{
|
||||
$obj_attr_value = new ErpProductAttributeValue();
|
||||
$attr_val_tpl = $obj_attr_value->attribute_value_details($id);
|
||||
$this->context->smarty->assign('attr_val_tpl', $attr_val_tpl);
|
||||
$this->context->smarty->assign('modules_dir', _MODULE_DIR_);
|
||||
}
|
||||
return parent::renderView();
|
||||
}
|
||||
|
||||
|
||||
public function renderForm(){
|
||||
$log = new pob_log();
|
||||
if (!class_exists('xmlrpc_client'))
|
||||
include_once 'xmlrpc.inc';
|
||||
$client = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/object");
|
||||
$sock = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/common");
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpUsername"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), 'string'));
|
||||
$resp = $sock->send($msg);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,'Connection Error : Invalid Odoo Information.',"CRITICAL");
|
||||
$this->errors[] = Tools::displayError($this->l('Connection Error : Invalid Odoo Information.' . $error_message));
|
||||
} else {
|
||||
$userId = $resp->value()->scalarval();
|
||||
$key = array();
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("product.attribute.value", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("search", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($key, "array"));
|
||||
$resp0 = $client->send($msg_ser);
|
||||
if ($resp0->faultCode()) {
|
||||
$error_message = $resp0->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,$error_message,"CRITICAL");
|
||||
$this->errors[] = Tools::displayError($this->l('Error : ' . $error_message));
|
||||
} else {
|
||||
$val = $resp0->value()->me['array'];
|
||||
$key1 = array(
|
||||
new xmlrpcval('id', 'integer'),
|
||||
new xmlrpcval('name', 'string')
|
||||
);
|
||||
$msg_ser1 = new xmlrpcmsg('execute');
|
||||
$msg_ser1->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser1->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval("product.attribute.value", "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval("read", "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval($val, "array"));
|
||||
$msg_ser1->addParam(new xmlrpcval($key1, "array"));
|
||||
$resp1 = $client->send($msg_ser1);
|
||||
if ($resp1->faultCode()) {
|
||||
$error_message = $resp1->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,$error_message,"CRITICAL");
|
||||
$this->errors[] = Tools::displayError($this->l('Error : ' . $error_message));
|
||||
} else {
|
||||
$arr=array();
|
||||
$value_array = $resp1->value()->scalarval();
|
||||
$count = count($value_array);
|
||||
for ($x = 0; $x < $count; $x++) {
|
||||
$arr[$x]['id'] = $value_array[$x]->me['struct']['id']->me['int'];
|
||||
$arr[$x]['name'] = $value_array[$x]->me['struct']['name']->me['string'];
|
||||
}
|
||||
$this->fields_form = array(
|
||||
'legend' => array(
|
||||
'title' => $this->l('Manual Product`s Attribute Value Mapping'),
|
||||
'image' => '../modules/prestaerp/views/img/ErpProducts.png'
|
||||
),
|
||||
'input' => array(
|
||||
array(
|
||||
'type' => 'select',
|
||||
'label' => $this->l('Odoo Product`s Attribute Value'),
|
||||
'name' => 'erpname',
|
||||
'lang' => true,
|
||||
'width' => 13,
|
||||
'options' => array(
|
||||
'query' => $arr,
|
||||
'id' => 'id',
|
||||
'name' => 'name'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'type' => 'select',
|
||||
'label' => $this->l('Prestashop Product`s Attribute Value'),
|
||||
'name' => 'prestaname',
|
||||
'lang' => true,
|
||||
'width' => 1000,
|
||||
'options' => array(
|
||||
'query' => Attribute::getAttributes(Configuration::get('PS_LANG_DEFAULT')),
|
||||
'id' => 'id_attribute_group',
|
||||
'name' => 'name'
|
||||
)
|
||||
)
|
||||
),
|
||||
'submit' => array(
|
||||
'title' => $this->l('Save'),
|
||||
'class' => 'button'
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
return parent::renderForm();
|
||||
}
|
||||
|
||||
public function processSave(){
|
||||
$erp_value_id = Tools::getValue('erpname');
|
||||
$ps_value_id = Tools::getValue('prestaname');
|
||||
$data = Db::getInstance()->getRow("SELECT id_attribute_group from ". _DB_PREFIX_."attribute where id_attribute=".$ps_value_id."");
|
||||
$ps_attribute_id = $data['id_attribute_group'];
|
||||
$data_erp = Db::getInstance()->getRow("SELECT erp_attribute_id FROM ". _DB_PREFIX_."erp_attributes_merge where prestashop_attribute_id=".$ps_attribute_id."");
|
||||
$erp_attr_id = $data_erp['erp_attribute_id'];
|
||||
|
||||
$e_count = Db::getInstance()->executeS("SELECT * from `" . _DB_PREFIX_ . "erp_attribute_values_merge` where `erp_attribute_value_id`=" . $erp_value_id);
|
||||
$p_count = Db::getInstance()->executeS("SELECT * from `" . _DB_PREFIX_ . "erp_attribute_values_merge` where `prestashop_attribute_value_id`=" . $ps_value_id);
|
||||
if (count($e_count) > 0) {
|
||||
$this->errors[] = Tools::displayError($this->l('This Odoo Id has been already mapped.'));
|
||||
$this->display = 'add';
|
||||
}
|
||||
if (count($p_count) > 0) {
|
||||
$this->errors[] = Tools::displayError($this->l('This prestaShop Id has been already mapped.'));
|
||||
$this->display = 'add';
|
||||
}
|
||||
if ((count($p_count) <= 0) && (count($e_count) <= 0)){
|
||||
$presta_user = $this->context->employee->firstname . ' ' . $this->context->employee->lastname . ' (' . $this->context->employee->email . ')';
|
||||
$attribute = new ErpProductAttributeValue();
|
||||
$attribute->addto_attribute_value_merge($ps_value_id,$erp_value_id,$ps_attribute_id,$erp_attr_id,$presta_user);
|
||||
$attribute->map_attribute($ps_value_id,$erp_value_id,$ps_attribute_id,$erp_attr_id);
|
||||
$redirect = Tools::redirectAdmin(self::$currentIndex . '&conf=' . 3 . '&token=' . $this->token);
|
||||
$this->redirect_after = $redirect;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
@ -0,0 +1,344 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class AdminErpProductCategoryController extends ModuleAdminController{
|
||||
|
||||
public function __construct(){
|
||||
$this->bootstrap = true;
|
||||
$this->table = 'erp_category_merge';
|
||||
$this->className = 'ErpProductCategory';
|
||||
$this->lang = false;
|
||||
$this->add = true;
|
||||
$this->edit = true;
|
||||
$this->delete = true;
|
||||
$this->view = true;
|
||||
$this->imageType = 'jpg';
|
||||
// $this->list_no_link = true;
|
||||
$this->context = Context::getContext();
|
||||
$this->addRowAction('delete');
|
||||
$this->addRowAction('view');
|
||||
|
||||
|
||||
|
||||
$this->fields_list = array(
|
||||
'id' => array(
|
||||
'title' => 'Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'erp_category_id' => array(
|
||||
'title' => 'Erp Category Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'prestashop_category_id' => array(
|
||||
'title' => 'Prestashop Category Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'created_by' => array(
|
||||
'title' => 'Created By',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'created_on' => array(
|
||||
'title' => 'Created on',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'is_synch' => array(
|
||||
'title' => $this->l('Is Synchronised'),
|
||||
'align' => 'center',
|
||||
'type' => 'bool',
|
||||
'width' => 'auto',
|
||||
'icon' => array(
|
||||
1 => array(
|
||||
'src' => 'enabled-2.gif',
|
||||
'alt' => $this->l('Synchronized')
|
||||
),
|
||||
0 => array(
|
||||
'src' => 'disabled.gif',
|
||||
'alt' => $this->l('Need Synchronization')
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
if (Configuration::getGlobalValue("ErpMultiLang"))
|
||||
{
|
||||
$this->fields_list['translate_state']=array('title' => $this->l('Translation state'),'align' => 'center',
|
||||
'width' => 'auto','color'=>'color');
|
||||
}
|
||||
$this->bulk_actions = array(
|
||||
'delete' => array(
|
||||
'text' => $this->l('Delete selected'),
|
||||
'confirm' => $this->l('Delete selected items?')
|
||||
)
|
||||
);
|
||||
$this->identifier = 'id';
|
||||
parent::__construct();
|
||||
$index = count($this->_conf)+1;
|
||||
$this->_conf[$index] = $this->l('All Category(s) successfully exported to Odoo.');
|
||||
}
|
||||
|
||||
// public function getFieldsValues($cat)
|
||||
// {
|
||||
// return array(
|
||||
// 'Id' => $this->getFieldValue($cat, 'id'),
|
||||
// 'Erp_Category_Id' => $this->getFieldValue($cat, 'erp_category_id'),
|
||||
// 'Prestashop_Category_Id' => $this->getFieldValue($cat, 'prestashop_category_id'),
|
||||
// 'Created_By' => $this->getFieldValue($cat, 'created_by'),
|
||||
// 'Created_On' => $this->getFieldValue($cat, 'created_on'),
|
||||
// 'Is_Synchronized' => $this->getFieldValue($cat, 'is_synch'),
|
||||
|
||||
// );
|
||||
// }
|
||||
public function renderView()
|
||||
{
|
||||
// $this->initToolbar();
|
||||
$id = Tools::getValue('id');
|
||||
$id_lang = $this->context->language->id;
|
||||
if ($id)
|
||||
{
|
||||
$obj_ps_erp_cat = new ErpProductCategory();
|
||||
$product_cat = $obj_ps_erp_cat->cat_details($id);
|
||||
// echo "<pre>";
|
||||
// var_dump($product_cat);
|
||||
// die;
|
||||
|
||||
$this->context->smarty->assign('product_cat', $product_cat);
|
||||
$this->context->smarty->assign('modules_dir', _MODULE_DIR_);
|
||||
}
|
||||
|
||||
|
||||
return parent::renderView();
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function postProcess(){
|
||||
if (!$this->loadObject(true))
|
||||
return;
|
||||
if (Tools::getValue('synchronize')){
|
||||
if (!class_exists('xmlrpc_client'))
|
||||
include_once 'xmlrpc.inc';
|
||||
$log = new pob_log();
|
||||
$client = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/object");
|
||||
$sock = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/common");
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpUsername"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), 'string'));
|
||||
$resp = $sock->send($msg);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,'Connection Error : Invalid Odoo Information.','ERROR');
|
||||
$this->errors[] = Tools::displayError($this->l('Connection Error : Invalid Odoo Information.' . $error_message));
|
||||
} else {
|
||||
$userId = $resp->value()->scalarval();
|
||||
if ($userId <= 0){
|
||||
$log->logMessage(__FILE__,__LINE__,'Invalid UserName or Password. Please check the Odoo configuration.','ERROR');
|
||||
$this->errors[] = Tools::displayError($this->l('Invalid UserName or Password. Please check the Odoo configuration.'));}
|
||||
else {
|
||||
$presta_user = $this->context->employee->firstname . ' ' . $this->context->employee->lastname . ' (' . $this->context->employee->email . ')';
|
||||
$category = new ErpProductCategory();
|
||||
$check = $category->check_all_categories($userId, $client, $presta_user);
|
||||
$index = count($this->_conf);
|
||||
if ($check == 1) {
|
||||
Tools::redirectAdmin(self::$currentIndex . '&conf=' . $index . '&token=' . $this->token);
|
||||
$log->logMessage(__FILE__,__LINE__,'All Category(s) successfully exported to Odoo.','INFO');
|
||||
} else {
|
||||
$this->displayInformation($this->l('No new Category(s) found.'));
|
||||
}
|
||||
}
|
||||
}
|
||||
}else
|
||||
return parent::postProcess();
|
||||
}
|
||||
|
||||
public function processDelete(){
|
||||
$record_id = Tools::getValue('id');
|
||||
if ($record_id){
|
||||
Db::getInstance()->delete('erp_category_merge','id='.$record_id);
|
||||
}
|
||||
}
|
||||
|
||||
public function initToolbar(){
|
||||
$this->page_header_toolbar_btn['refresh'] = array(
|
||||
'href' => self::$currentIndex.'&synchronize=1&token=' . $this->token . '',
|
||||
'desc' => $this->l('Synchronize')
|
||||
);
|
||||
|
||||
$this->page_header_toolbar_btn['manual_map'] = array(
|
||||
'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token.'&manualmap=1',
|
||||
'desc' => $this->l('Manual Mapping'),
|
||||
'imgclass' => 'new'
|
||||
);
|
||||
parent::initToolbar();
|
||||
unset($this->toolbar_btn['new']);
|
||||
$this->toolbar_btn['wk_hide'] = array(
|
||||
'desc' => $this->l('')
|
||||
);
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar(){
|
||||
parent::initPageHeaderToolbar();
|
||||
$this->context->smarty->clearAssign('help_link');
|
||||
}
|
||||
|
||||
public function setMedia(){
|
||||
parent::setMedia();
|
||||
$this->addJS(_MODULE_DIR_.'prestaerp/views/js/pob_js.js');
|
||||
}
|
||||
|
||||
public function processBulkDelete(){
|
||||
$result = true;
|
||||
if (is_array($this->boxes) && !empty($this->boxes)){
|
||||
foreach ($this->boxes as $id_data) {
|
||||
Db::getInstance()->delete('erp_category_merge', 'id = ' . (int) $id_data);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You must select at least one element to delete.');
|
||||
}
|
||||
|
||||
public function renderForm(){
|
||||
$log = new pob_log();
|
||||
if (!class_exists('xmlrpc_client'))
|
||||
include_once 'xmlrpc.inc';
|
||||
$client = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/object");
|
||||
$sock = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/common");
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpUsername"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), 'string'));
|
||||
$resp = $sock->send($msg);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,'Connection Error : Invalid Odoo Information.' ,'ERROR');
|
||||
$this->errors[] = Tools::displayError($this->l('Connection Error : Invalid Odoo Information.' . $error_message));
|
||||
} else {
|
||||
$userId = $resp->value()->scalarval();
|
||||
$key = array();
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("product.category", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("search", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($key, "array"));
|
||||
$resp0 = $client->send($msg_ser);
|
||||
if ($resp0->faultCode()) {
|
||||
$error_message = $resp0->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,$error_message,'CRITICAL');
|
||||
$this->errors[] = Tools::displayError($this->l('Error : ' . $error_message));
|
||||
} else {
|
||||
$val = $resp0->value()->me['array'];
|
||||
$key1 = array(
|
||||
new xmlrpcval('id', 'integer'),
|
||||
new xmlrpcval('name', 'string')
|
||||
);
|
||||
$msg_ser1 = new xmlrpcmsg('execute');
|
||||
$msg_ser1->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser1->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval("product.category", "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval("read", "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval($val, "array"));
|
||||
$msg_ser1->addParam(new xmlrpcval($key1, "array"));
|
||||
$resp1 = $client->send($msg_ser1);
|
||||
if ($resp1->faultCode()) {
|
||||
$error_message = $resp1->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,$error_message,'CRITICAL');
|
||||
$this->errors[] = Tools::displayError($this->l('Error : ' . $error_message));
|
||||
} else {
|
||||
$value_array = $resp1->value()->scalarval();
|
||||
$count = count($value_array);
|
||||
$arr = array();
|
||||
for ($x = 0; $x < $count; $x++) {
|
||||
$arr[$x]['id'] = $value_array[$x]->me['struct']['id']->me['int'];
|
||||
$arr[$x]['name'] = $value_array[$x]->me['struct']['name']->me['string'];
|
||||
}
|
||||
$this->fields_form = array(
|
||||
'legend' => array(
|
||||
'title' => $this->l('Manual Category Mapping'),
|
||||
'image' => '../modules/prestaerp/views/img/ErpProducts.png'
|
||||
),
|
||||
'input' => array(
|
||||
array(
|
||||
'type' => 'select',
|
||||
'label' => $this->l('Odoo Category'),
|
||||
'name' => 'erpcat',
|
||||
'lang' => true,
|
||||
'width' => 13,
|
||||
'options' => array(
|
||||
'query' => $arr,
|
||||
'id' => 'id',
|
||||
'name' => 'name'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'type' => 'select',
|
||||
'label' => $this->l('Prestashop Category'),
|
||||
'name' => 'prestacat',
|
||||
'lang' => true,
|
||||
'width' => 1000,
|
||||
'options' => array(
|
||||
'query' => Db::getInstance()->executeS("SELECT * from `" . _DB_PREFIX_ . "category_lang` where `id_lang` =" . (int) Configuration::get('PS_LANG_DEFAULT') . " and `id_Shop`=" . Context::getContext()->shop->id . ""),
|
||||
'id' => 'id_category',
|
||||
'name' => 'name'
|
||||
)
|
||||
)
|
||||
),
|
||||
'submit' => array(
|
||||
'title' => $this->l(' Save '),
|
||||
'class' => 'button'
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
return parent::renderForm();
|
||||
}
|
||||
|
||||
public function processSave(){
|
||||
$erp_cat_id = Tools::getValue('erpcat');
|
||||
$prestashop_cat_id = Tools::getValue('prestacat');
|
||||
$e_count = Db::getInstance()->executeS("SELECT * from `" . _DB_PREFIX_ . "erp_category_merge` where `erp_category_id`=" . $erp_cat_id);
|
||||
$p_count = Db::getInstance()->executeS("SELECT * from `" . _DB_PREFIX_ . "erp_category_merge` where `prestashop_category_id`=" . $prestashop_cat_id);
|
||||
if (count($e_count) > 0) {
|
||||
$this->errors[] = Tools::displayError($this->l('This Odoo Id has been already mapped.'));
|
||||
$this->display = 'add';
|
||||
}
|
||||
if (count($p_count) > 0) {
|
||||
$this->errors[] = Tools::displayError($this->l('This prestaShop Id has been already mapped.'));
|
||||
$this->display = 'add';
|
||||
} else {
|
||||
$presta_user = $this->context->employee->firstname . ' ' . $this->context->employee->lastname . ' (' . $this->context->employee->email . ')';
|
||||
$category = new ErpProductCategory();
|
||||
$category->map_cat($erp_cat_id, $prestashop_cat_id, $presta_user);
|
||||
Tools::redirectAdmin(self::$currentIndex . '&conf=' . 3 . '&token=' . $this->token);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
@ -0,0 +1,208 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class AdminErpProductCombinationController extends ModuleAdminController{
|
||||
|
||||
public function __construct(){
|
||||
$this->bootstrap = true;
|
||||
$this->table = 'erp_product_merge';
|
||||
$this->className = 'ErpProductCombination';
|
||||
$this->lang = false;
|
||||
$this->add = true;
|
||||
$this->edit = true;
|
||||
$this->delete = true;
|
||||
$this->view = true;
|
||||
$this->imageType = 'jpg';
|
||||
// $this->list_no_link = true;
|
||||
$this->context = Context::getContext();
|
||||
$this->addRowAction('delete');
|
||||
$this->addRowAction('view');
|
||||
|
||||
|
||||
$this->fields_list = array(
|
||||
'id' => array(
|
||||
'title' => 'Id',
|
||||
'align' => 'text-center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'erp_template_id' => array(
|
||||
'title' => 'Erp Product Template Id',
|
||||
'width' => 'auto',
|
||||
'align' => 'text-center'
|
||||
),
|
||||
'erp_product_id' => array(
|
||||
'title' => 'Erp Product Id',
|
||||
'width' => 'auto',
|
||||
'align' => 'text-center'
|
||||
),
|
||||
'prestashop_product_id' => array(
|
||||
'title' => 'Prestashop Product Id',
|
||||
'align' => 'text-center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'prestashop_product_attribute_id' => array(
|
||||
'title' => 'Prestashop Attribute Id',
|
||||
'align' => 'text-center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'created_by' => array(
|
||||
'title' => 'Created By',
|
||||
'align' => 'text-center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'created_on' => array(
|
||||
'title' => 'Created on',
|
||||
'align' => 'text-center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
|
||||
'is_synch' => array(
|
||||
'title' => $this->l('Is Synchronised'),
|
||||
'align' => 'text-center',
|
||||
'type' => 'bool',
|
||||
'width' => 'auto',
|
||||
'icon' => array(
|
||||
1 => array(
|
||||
'src' => 'enabled-2.gif',
|
||||
'alt' => $this->l('Synchronized')
|
||||
),
|
||||
0 => array(
|
||||
'src' => 'disabled.gif',
|
||||
'alt' => $this->l('Need Synchronization')
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
$this->bulk_actions = array(
|
||||
'delete' => array(
|
||||
'text' => $this->l('Delete selected'),
|
||||
'confirm' => $this->l('Delete selected items?')
|
||||
)
|
||||
);
|
||||
$this->identifier = 'id';
|
||||
parent::__construct();
|
||||
$index = count($this->_conf)+1;
|
||||
$this->_conf[$index] = $this->l('All Product Combination(s) successfully exported to Odoo.');
|
||||
}
|
||||
|
||||
public function postProcess() {
|
||||
if (!$this->loadObject(true))
|
||||
return;
|
||||
$log = new pob_log();
|
||||
if (Tools::getValue('synchronize')) {
|
||||
if (!class_exists('xmlrpc_client'))
|
||||
include_once 'xmlrpc.inc';
|
||||
$client = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/object");
|
||||
$sock = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/common");
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpUsername"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), 'string'));
|
||||
$resp = $sock->send($msg);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,'Connection Error : Invalid Odoo Information.',"ERROR");
|
||||
$this->errors[] = Tools::displayError($this->l('Connection Error : Invalid Odoo Information.' . $error_message));
|
||||
} else {
|
||||
$userId = $resp->value()->scalarval();
|
||||
if ($userId <= 0){
|
||||
$log->logMessage(__FILE__,__LINE__,'Invalid UserName or Password. Please check the Odoo configuration.',"ERROR");
|
||||
$this->errors[] = Tools::displayError($this->l('Invalid UserName or Password. Please check the Odoo configuration.'));}
|
||||
else {
|
||||
$presta_user = $this->context->employee->firstname . ' ' . $this->context->employee->lastname . ' (' . $this->context->employee->email . ')';
|
||||
$combination = new ErpProductCombination();
|
||||
$check = $combination->check_all_products($userId, $client, $presta_user);
|
||||
$index = count($this->_conf);
|
||||
if ($check['is_error'] == 0 && $check['value'] == 1) {
|
||||
Tools::redirectAdmin(self::$currentIndex . '&conf=' . $index . '&token=' . $this->token);
|
||||
$log->logMessage(__FILE__,__LINE__,'All Product(s) successfully exported to Odoo.','INFO');
|
||||
} elseif ($check['is_error'] == 0 && $check['value'] == 0) {
|
||||
$this->displayInformation($this->l('No new Product(s) found.'));
|
||||
} else {
|
||||
if ($check['ids'])
|
||||
$this->errors[] = Tools::displayError($this->l('Error in Prestashop`s Id : ' . $check['ids']));
|
||||
$this->errors[] = Tools::displayError($this->l('Error Message(s):' . $check['error_message']));
|
||||
$log->logMessage(__FILE__,__LINE__,'Error in Prestashop`s Id : ' . $check['ids'].'/n'.'Error Message(s): ' . $check['error_message'],"CRITICAL");
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
return parent::postProcess();
|
||||
}
|
||||
|
||||
|
||||
public function processDelete(){
|
||||
$record_id = Tools::getValue('id');
|
||||
if ($record_id){
|
||||
Db::getInstance()->delete('erp_product_merge','id='.$record_id);
|
||||
}
|
||||
}
|
||||
|
||||
public function initToolbar(){
|
||||
$this->page_header_toolbar_btn['refresh'] = array(
|
||||
'href' => self::$currentIndex.'&synchronize=1&token=' . $this->token . '',
|
||||
'desc' => $this->l('Synchronize')
|
||||
);
|
||||
parent::initToolbar();
|
||||
unset($this->toolbar_btn['new']);
|
||||
$this->toolbar_btn['wk_hide'] = array(
|
||||
'desc' => $this->l('')
|
||||
);
|
||||
}
|
||||
public function renderView(){
|
||||
$id = Tools::getValue('id');
|
||||
$id_lang = $this->context->language->id;
|
||||
if ($id)
|
||||
{
|
||||
$obj_ps_erp_product = new ErpProductCombination();
|
||||
$product_tpl = $obj_ps_erp_product->product_details($id);
|
||||
$this->context->smarty->assign('product_tpl', $product_tpl);
|
||||
$this->context->smarty->assign('modules_dir', _MODULE_DIR_);
|
||||
}
|
||||
return parent::renderView();
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar(){
|
||||
parent::initPageHeaderToolbar();
|
||||
$this->context->smarty->clearAssign('help_link');
|
||||
}
|
||||
|
||||
public function setMedia(){
|
||||
parent::setMedia();
|
||||
$this->addJS(_MODULE_DIR_.'prestaerp/views/js/pob_js.js');
|
||||
}
|
||||
|
||||
public function processBulkDelete(){
|
||||
$result = true;
|
||||
if (is_array($this->boxes) && !empty($this->boxes)){
|
||||
foreach ($this->boxes as $id_data) {
|
||||
Db::getInstance()->delete('erp_product_merge', 'id = ' . (int) $id_data);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You must select at least one element to delete.');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
@ -0,0 +1,190 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class AdminErpProductTemplateController extends ModuleAdminController{
|
||||
|
||||
public function __construct(){
|
||||
$this->bootstrap = true;
|
||||
$this->table = 'erp_product_template_merge';
|
||||
$this->className = 'ErpProductTemplate';
|
||||
$this->lang = false;
|
||||
$this->add = true;
|
||||
$this->edit = true;
|
||||
$this->delete = true;
|
||||
$this->view = true;
|
||||
$this->imageType = 'jpg';
|
||||
// $this->list_no_link = true;
|
||||
$this->addRowAction('view');
|
||||
|
||||
$this->context = Context::getContext();
|
||||
$this->addRowAction('delete');
|
||||
$this->fields_list = array(
|
||||
'id' => array(
|
||||
'title' => 'Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'erp_template_id' => array(
|
||||
'title' => 'Erp Template Id',
|
||||
'width' => 'auto',
|
||||
'align' => 'center'
|
||||
),
|
||||
'presta_product_id' => array(
|
||||
'title' => 'Prestashop Product Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'created_by' => array(
|
||||
'title' => 'Created By',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'created_on' => array(
|
||||
'title' => 'Created on',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'is_synch' => array(
|
||||
'title' => $this->l('Need Synchronization'),
|
||||
'align' => 'center',
|
||||
'type' => 'bool',
|
||||
'width' => 'auto',
|
||||
'icon' => array(
|
||||
1 => array(
|
||||
'src' => 'enabled-2.gif',
|
||||
'alt' => $this->l('Synchronized')
|
||||
),
|
||||
0 => array(
|
||||
'src' => 'disabled.gif',
|
||||
'alt' => $this->l('Need Synchronization')
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
if (Configuration::getGlobalValue("ErpMultiLang")){
|
||||
$this->fields_list['translate_state']=array('title' => $this->l('Translation State'),'align' => 'center',
|
||||
'width' => 'auto','color'=>'color');
|
||||
}
|
||||
$this->bulk_actions = array(
|
||||
'delete' => array(
|
||||
'text' => $this->l('Delete selected'),
|
||||
'confirm' => $this->l('Delete selected items?')
|
||||
)
|
||||
);
|
||||
$this->identifier = 'id';
|
||||
parent::__construct();
|
||||
$index = count($this->_conf)+1;
|
||||
$this->_conf[$index] = $this->l('All Product Template(s) successfully exported to Odoo.');
|
||||
}
|
||||
|
||||
public function postProcess(){
|
||||
if (!$this->loadObject(true))
|
||||
return;
|
||||
if (Tools::getValue('synchronize')) {
|
||||
if (!class_exists('xmlrpc_client'))
|
||||
include_once 'xmlrpc.inc';
|
||||
$client = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/object");
|
||||
$sock = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/common");
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpUsername"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), 'string'));
|
||||
$resp = $sock->send($msg);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$this->errors[] = Tools::displayError($this->l('Connection Error : Invalid Odoo Information.' . $error_message));
|
||||
} else {
|
||||
$userId = $resp->value()->scalarval();
|
||||
if ($userId <= 0)
|
||||
$this->errors[] = Tools::displayError($this->l('Invalid UserName or Password. Please check the Odoo configuration.'));
|
||||
else {
|
||||
$presta_user = $this->context->employee->firstname . ' ' . $this->context->employee->lastname . ' (' . $this->context->employee->email . ')';
|
||||
$template = new ErpProductTemplate();
|
||||
$check = $template->check_all_product_templates($userId, $client, $presta_user);
|
||||
$index = count($this->_conf);
|
||||
if ($check['is_error'] == 0 && $check['value'] == 1) {
|
||||
Tools::redirectAdmin(self::$currentIndex . '&conf=' . $index . '&token=' . $this->token);
|
||||
} elseif ($check['is_error'] == 0 && $check['value'] == 0) {
|
||||
$this->displayInformation($this->l('No new Product(s) found!!!'));
|
||||
} else {
|
||||
if ($check['ids'])
|
||||
$this->errors[] = Tools::displayError($this->l('Error in Prestashop`s Id : ' . $check['ids']));
|
||||
$this->errors[] = Tools::displayError($this->l('Error Message(s):' . $check['error_message']));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return parent::postProcess();
|
||||
}
|
||||
|
||||
public function processDelete(){
|
||||
$record_id = Tools::getValue('id');
|
||||
if ($record_id){
|
||||
Db::getInstance()->delete('erp_product_template_merge','id='.$record_id);
|
||||
}
|
||||
}
|
||||
|
||||
public function initToolbar(){
|
||||
// $this->page_header_toolbar_btn['refresh'] = array(
|
||||
// 'href' => self::$currentIndex.'&synchronize=1&token=' . $this->token . '',
|
||||
// 'desc' => $this->l('Synchronize')
|
||||
// );
|
||||
parent::initToolbar();
|
||||
unset($this->toolbar_btn['new']);
|
||||
$this->toolbar_btn['wk_hide'] = array(
|
||||
'desc' => $this->l('')
|
||||
);
|
||||
}
|
||||
public function renderView(){
|
||||
$id = Tools::getValue('id');
|
||||
$id_lang = $this->context->language->id;
|
||||
if ($id)
|
||||
{
|
||||
$obj_ps_erp_product = new ErpProductTemplate();
|
||||
$product_tpl = $obj_ps_erp_product->product_details($id);
|
||||
$this->context->smarty->assign('product_tpl', $product_tpl);
|
||||
$this->context->smarty->assign('modules_dir', _MODULE_DIR_);
|
||||
}
|
||||
return parent::renderView();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function setMedia(){
|
||||
parent::setMedia();
|
||||
$this->addJS(_MODULE_DIR_.'prestaerp/views/js/pob_js.js');
|
||||
}
|
||||
|
||||
public function processBulkDelete(){
|
||||
$result = true;
|
||||
if (is_array($this->boxes) && !empty($this->boxes)){
|
||||
foreach ($this->boxes as $id_data) {
|
||||
Db::getInstance()->delete('erp_product_template_merge', 'id = ' . (int) $id_data);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You must select at least one element to delete.');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
324
modules/prestaerp/controllers/admin/AdminErpTaxesController.php
Normal file
324
modules/prestaerp/controllers/admin/AdminErpTaxesController.php
Normal file
@ -0,0 +1,324 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class AdminErpTaxesController extends ModuleAdminController{
|
||||
|
||||
public function __construct(){
|
||||
$this->bootstrap = true;
|
||||
$this->table = 'erp_tax_merge';
|
||||
$this->className = 'ErpTaxes';
|
||||
$this->lang = false;
|
||||
$this->add = true;
|
||||
$this->edit = true;
|
||||
$this->delete = true;
|
||||
$this->view = true;
|
||||
$this->imageType = 'jpg';
|
||||
// $this->list_no_link = true;
|
||||
$this->context = Context::getContext();
|
||||
$this->addRowAction('delete');
|
||||
$this->addRowAction('view');
|
||||
|
||||
$this->fields_list = array(
|
||||
'id' => array(
|
||||
'title' => 'Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'erp_tax_id' => array(
|
||||
'title' => 'Erp Tax Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'prestashop_tax_id' => array(
|
||||
'title' => 'Prestashop Tax Id',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'rate' => array(
|
||||
'title' => 'Rate',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'created_by' => array(
|
||||
'title' => 'Created By',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'created_on' => array(
|
||||
'title' => 'Created on',
|
||||
'align' => 'center',
|
||||
'width' => 'auto',
|
||||
),
|
||||
'is_synch' => array(
|
||||
'title' => $this->l('Is Synchronised'),
|
||||
'align' => 'center',
|
||||
'type' => 'bool',
|
||||
'width' => 'auto',
|
||||
'icon' => array(
|
||||
1 => array(
|
||||
'src' => 'enabled-2.gif',
|
||||
'alt' => $this->l('Synchronized')
|
||||
),
|
||||
0 => array(
|
||||
'src' => 'disabled.gif',
|
||||
'alt' => $this->l('Need Synchronization')
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
$this->bulk_actions = array(
|
||||
'delete' => array(
|
||||
'text' => $this->l('Delete selected'),
|
||||
'confirm' => $this->l('Delete selected items?')
|
||||
)
|
||||
);
|
||||
$this->identifier = 'id';
|
||||
parent::__construct();
|
||||
$index = count($this->_conf)+1;
|
||||
$this->_conf[$index] = $this->l('All Tax(es) successfully exported to Odoo.');
|
||||
}
|
||||
|
||||
public function postProcess() {
|
||||
if (!$this->loadObject(true))
|
||||
return;
|
||||
if (Tools::getValue('synchronize')) {
|
||||
$log = new pob_log();
|
||||
if (!class_exists('xmlrpc_client'))
|
||||
include_once 'xmlrpc.inc';
|
||||
$client = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/object");
|
||||
$sock = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/common");
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpUsername"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), 'string'));
|
||||
$resp = $sock->send($msg);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,'Connection Error : Invalid Odoo Information.',"ERROR");
|
||||
$this->errors[] = Tools::displayError($this->l('Connection Error : Invalid Odoo Information.' . $error_message));
|
||||
} else {
|
||||
$userId = $resp->value()->scalarval();
|
||||
if ($userId <= 0){
|
||||
$log->logMessage(__FILE__,__LINE__,'Invalid UserName or Password. Please check the Odoo configuration.',"ERROR");
|
||||
$this->errors[] = Tools::displayError($this->l('Invalid UserName or Password. Please check the Odoo configuration.'));}
|
||||
else {
|
||||
$presta_user = $this->context->employee->firstname . ' ' . $this->context->employee->lastname . ' (' . $this->context->employee->email . ')';
|
||||
$tax = new ErpTaxes();
|
||||
$check = $tax->check_all_taxes($client, $userId, $presta_user);
|
||||
$index = count($this->_conf);
|
||||
if ($check['is_error'] == 0 && $check['value'] == 1) {
|
||||
Tools::redirectAdmin(self::$currentIndex . '&conf=' . $index . '&token=' . $this->token);
|
||||
$log->logMessage(__FILE__,__LINE__,'All Tax(s) successfully exported to Odoo.','INFO');
|
||||
} elseif ($check['is_error'] == 0 && $check['value'] == 0) {
|
||||
Tools::redirectAdmin(self::$currentIndex . '&conf=' . $index . '&token=' . $this->token);
|
||||
} else {
|
||||
$this->errors[] = Tools::displayError($this->l('Error in Prestashop`s Id : ' . $check['ids']));
|
||||
$log->logMessage(__FILE__,__LINE__,'Error in Prestashop`s Id : ' . $check['ids'].'/n'.'Error Message(s):' . $check['error_message'],"CRITICAL");
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
return parent::postProcess();
|
||||
}
|
||||
|
||||
public function processDelete(){
|
||||
$record_id = Tools::getValue('id');
|
||||
if ($record_id){
|
||||
Db::getInstance()->delete('erp_tax_merge','id='.$record_id);
|
||||
}
|
||||
}
|
||||
|
||||
public function initToolbar(){
|
||||
$this->page_header_toolbar_btn['refresh'] = array(
|
||||
'href' => self::$currentIndex.'&synchronize=1&token=' . $this->token . '',
|
||||
'desc' => $this->l('Synchronize')
|
||||
);
|
||||
|
||||
$this->page_header_toolbar_btn['manual_map'] = array(
|
||||
'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token.'&manualmap=1',
|
||||
'desc' => $this->l('Manual Mapping'),
|
||||
'imgclass' => 'new'
|
||||
);
|
||||
parent::initToolbar();
|
||||
unset($this->toolbar_btn['new']);
|
||||
$this->toolbar_btn['wk_hide'] = array(
|
||||
'desc' => $this->l('')
|
||||
);
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar(){
|
||||
parent::initPageHeaderToolbar();
|
||||
$this->context->smarty->clearAssign('help_link');
|
||||
}
|
||||
|
||||
public function setMedia(){
|
||||
parent::setMedia();
|
||||
$this->addJS(_MODULE_DIR_.'prestaerp/views/js/pob_js.js');
|
||||
}
|
||||
|
||||
public function processBulkDelete(){
|
||||
$result = true;
|
||||
if (is_array($this->boxes) && !empty($this->boxes)){
|
||||
foreach ($this->boxes as $id_data) {
|
||||
Db::getInstance()->delete('erp_tax_merge', 'id = ' . (int) $id_data);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('You must select at least one element to delete.');
|
||||
}
|
||||
public function renderView(){
|
||||
$id = Tools::getValue('id');
|
||||
$id_lang = $this->context->language->id;
|
||||
if ($id)
|
||||
{
|
||||
$obj_ps_erp_tax = new ErpTaxes();
|
||||
$tax_tpl = $obj_ps_erp_tax->tax_details($id);
|
||||
$this->context->smarty->assign('tax_tpl', $tax_tpl);
|
||||
$this->context->smarty->assign('modules_dir', _MODULE_DIR_);
|
||||
}
|
||||
return parent::renderView();
|
||||
}
|
||||
|
||||
public function renderForm(){
|
||||
$log = new pob_log();
|
||||
if (!class_exists('xmlrpc_client'))
|
||||
include_once 'xmlrpc.inc';
|
||||
$client = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/object");
|
||||
$sock = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl") . ":" . Configuration::getGlobalValue("ErpPort") . "/xmlrpc/common");
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpUsername"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), 'string'));
|
||||
$resp = $sock->send($msg);
|
||||
if ($resp->faultCode()) {
|
||||
$error_message = $resp->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,'Connection Error : Invalid Odoo Information.',"CRITICAL");
|
||||
$this->errors[] = Tools::displayError($this->l('Connection Error : Invalid Odoo Information.' . $error_message));
|
||||
}else{
|
||||
$userId = $resp->value()->scalarval();
|
||||
$key = array();
|
||||
$msg_ser = new xmlrpcmsg('execute');
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("account.tax", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval("search", "string"));
|
||||
$msg_ser->addParam(new xmlrpcval($key, "array"));
|
||||
$resp0 = $client->send($msg_ser);
|
||||
if ($resp0->faultCode()) {
|
||||
$error_message = $resp0->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,$error_message,"CRITICAL");
|
||||
$this->errors[] = Tools::displayError($this->l('Error : ' . $error_message));
|
||||
} else {
|
||||
$val = $resp0->value()->me['array'];
|
||||
$key1 = array(
|
||||
new xmlrpcval('id', 'integer'),
|
||||
new xmlrpcval('name', 'string'),
|
||||
new xmlrpcval('amount', 'string')
|
||||
);
|
||||
$msg_ser1 = new xmlrpcmsg('execute');
|
||||
$msg_ser1->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg_ser1->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval("account.tax", "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval("read", "string"));
|
||||
$msg_ser1->addParam(new xmlrpcval($val, "array"));
|
||||
$msg_ser1->addParam(new xmlrpcval($key1, "array"));
|
||||
$resp1 = $client->send($msg_ser1);
|
||||
if ($resp1->faultCode()) {
|
||||
$error_message = $resp1->faultString();
|
||||
$log->logMessage(__FILE__,__LINE__,$error_message,"CRITICAL");
|
||||
$this->errors[] = Tools::displayError($this->l('Error : ' . $error_message));
|
||||
} else {
|
||||
$value_array = $resp1->value()->scalarval();
|
||||
$count = count($value_array);
|
||||
$arr = array();
|
||||
for ($x = 0; $x < $count; $x++) {
|
||||
$arr[$x]['id'] = $value_array[$x]->me['struct']['id']->me['int'];
|
||||
$arr[$x]['name'] = $value_array[$x]->me['struct']['name']->me['string'] . ' (' . ($value_array[$x]->me['struct']['amount']->me['double']*100) . '%)';
|
||||
}
|
||||
$this->fields_form = array(
|
||||
'legend' => array(
|
||||
'title' => $this->l('Manual Tax Mapping'),
|
||||
'image' => '../modules/prestaerp/views/img/ErpProducts.png'
|
||||
),
|
||||
'input' => array(
|
||||
array(
|
||||
'type' => 'select',
|
||||
'label' => $this->l('Odoo Tax'),
|
||||
'name' => 'erpname',
|
||||
'lang' => true,
|
||||
'width' => 13,
|
||||
'options' => array(
|
||||
'query' => $arr,
|
||||
'id' => 'id',
|
||||
'name' => 'name'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'type' => 'select',
|
||||
'label' => $this->l('Prestashop Tax'),
|
||||
'name' => 'prestaname',
|
||||
'lang' => true,
|
||||
'width' => 1000,
|
||||
'options' => array(
|
||||
'query' => Db::getInstance()->executeS("SELECT * from `" . _DB_PREFIX_ . "tax` where active=1 and deleted = 0"),
|
||||
'id' => 'id_tax',
|
||||
'name' => 'rate'
|
||||
)
|
||||
)
|
||||
),
|
||||
'submit' => array(
|
||||
'title' => $this->l(' Save '),
|
||||
'class' => 'button'
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
return parent::renderForm();
|
||||
}
|
||||
|
||||
public function processSave(){
|
||||
$erp_tax_id = Tools::getValue('erpname');
|
||||
$prestashop_tax_id = Tools::getValue('prestaname');
|
||||
$e_count = Db::getInstance()->executeS("SELECT * from `" . _DB_PREFIX_ . "erp_tax_merge` where `erp_tax_id`=" . $erp_tax_id);
|
||||
$p_count = Db::getInstance()->executeS("SELECT * from `" . _DB_PREFIX_ . "erp_tax_merge` where `prestashop_tax_id`=" . $prestashop_tax_id);
|
||||
if (count($e_count) > 0) {
|
||||
$this->errors[] = Tools::displayError($this->l('This Odoo Id has been already mapped.'));
|
||||
$this->display = 'add';
|
||||
}
|
||||
if (count($p_count) > 0) {
|
||||
$this->errors[] = Tools::displayError($this->l('This prestaShop Id has been already mapped.'));
|
||||
$this->display = 'add';
|
||||
}
|
||||
if ((count($p_count) <= 0) && (count($e_count) <= 0)){
|
||||
$presta_user = $this->context->employee->firstname . ' ' . $this->context->employee->lastname . ' (' . $this->context->employee->email . ')';
|
||||
$tax = new ErpTaxes();
|
||||
$tax->addto_tax_merge($erp_tax_id, $prestashop_tax_id, $presta_user);
|
||||
Tools::redirectAdmin(self::$currentIndex . '&conf=' . 3 . '&token=' . $this->token);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
@ -0,0 +1,189 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class AdminWkErpConfigurationController extends ModuleAdminController{
|
||||
|
||||
public function __construct(){
|
||||
$this->bootstrap = true;
|
||||
$this->table = 'configuration';
|
||||
$this->context = Context::getContext();
|
||||
|
||||
$this->fields_options = array(
|
||||
'general' => array(
|
||||
'title' => $this->l('POB Connection Configuration'),
|
||||
'fields' => array(
|
||||
'ErpUrl' => array(
|
||||
'title' => $this->l('Url'),
|
||||
'required'=>true,
|
||||
'type' => 'text'),
|
||||
'ErpPort' => array(
|
||||
'title' => $this->l('Port'),
|
||||
'required'=>true,
|
||||
'type' => 'text'),
|
||||
'ErpDatabase' => array(
|
||||
'title' => $this->l('Database'),
|
||||
'required'=>true,
|
||||
'type' => 'text'),
|
||||
'ErpUsername' => array(
|
||||
'title' => $this->l('User Name'),
|
||||
'required'=>true,
|
||||
'type' => 'text')
|
||||
),
|
||||
'submit' => array('title' => $this->l('Save and Stay'))
|
||||
),
|
||||
'general1' => array(
|
||||
'title' => $this->l('Odoo Order Settings'),
|
||||
'fields' => array(
|
||||
'ErpAutoStatusUpdate' => array(
|
||||
'title' => $this->l('Automatically Update Status from Prestashop to Odoo'),
|
||||
'desc' => $this->l('If Enabled, When status of an order is updated in Prestashop, then the status of order will automatically be updated in Odoo.'),
|
||||
'cast' => 'intval', 'type' => 'bool'),
|
||||
'ErpConfirmOrder' => array(
|
||||
'title' => $this->l('Automatically Confirm Orders'),
|
||||
'desc' => $this->l('If enabled, orders created from Prestashop end will automatically be created in confirm State in odoo'),
|
||||
'cast' => 'intval',
|
||||
'type' => 'bool'),
|
||||
'ErpAutoInvoice' => array(
|
||||
'title' => $this->l('Automatically Generate Invoice'),
|
||||
'desc' => $this->l('If Enabled, Invoice will be automatically created in Odoo for exported orders'),
|
||||
'validation' => 'isBool',
|
||||
'cast' => 'intval',
|
||||
'type' => 'bool'
|
||||
),
|
||||
),
|
||||
'submit' => array('title' => $this->l('Save'))
|
||||
),
|
||||
'general2' => array(
|
||||
'title' => $this->l('Back Up Options'),
|
||||
'fields' => array(
|
||||
'ErpDropTables' => array(
|
||||
'title' => $this->l('Drop Database Tables during Update'),
|
||||
'desc' => $this->l('Enable this If you wish to drop all mapping tables during module update'),
|
||||
'cast' => 'intval', 'type' => 'bool'),
|
||||
),
|
||||
'submit' => array('title' => $this->l('Save'))
|
||||
),
|
||||
'general3' => array(
|
||||
'title' => $this->l('Optional Features'),
|
||||
'fields' => array(
|
||||
'ErpMultiLang' => array(
|
||||
'title' => $this->l('Multi-Language'),
|
||||
'desc' => $this->l('Before enabling this feature, make sure that you have installed the Multi-Language extension on Odoo end also'),
|
||||
'cast' => 'intval', 'type' => 'bool'),
|
||||
'ErpMultiShop' => array(
|
||||
'title' => $this->l('Multi-Shop'),
|
||||
'desc' => $this->l('Before enabling this feature, make sure that you have installed the Multi-Shop extension on Odoo end also'),
|
||||
'cast' => 'intval',
|
||||
'type' => 'bool'),
|
||||
),
|
||||
'submit' => array('title' => $this->l('Save'))
|
||||
),
|
||||
'ErpResetDb' => array(
|
||||
'title' => $this->l('Reset POB mapping Tables'),
|
||||
'image' => '../img/admin/exchangesrate.gif',
|
||||
'description' => $this->l('Using this Option will delete all data in POB tables, Please make sure you are really want to do this, or you can ask for help from POB`s support Team.'),
|
||||
'submit' => array(
|
||||
'title' => $this->l('Reset All POB Tables Now'),
|
||||
'name' => 'ErpResetDb'
|
||||
)
|
||||
)
|
||||
);
|
||||
$type = 'text';
|
||||
if ($this->context->employee->id_profile!=='1')
|
||||
$type= 'hidden';
|
||||
|
||||
$this->fields_options['general']['fields']['ErpPassword'] = array(
|
||||
'title' => $this->l('Password'),
|
||||
'required'=>true,
|
||||
'type' => $type);
|
||||
|
||||
parent::__construct();
|
||||
$index = count($this->_conf)+1;
|
||||
$this->_conf[$index] = $this->l('Data in all POB Tables are successfully deleted.');
|
||||
}
|
||||
|
||||
public function setMedia(){
|
||||
parent::setMedia();
|
||||
$this->addJS(_MODULE_DIR_.'prestaerp/views/js/pob_js.js');
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar(){
|
||||
parent::initPageHeaderToolbar();
|
||||
$this->context->smarty->clearAssign('help_link');
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function initProcess(){
|
||||
if (Tools::isSubmit('ErpResetDb')){
|
||||
$conf_obj = new WkErpConfiguration();
|
||||
$conf_obj->deletePOBTables();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function postProcess(){
|
||||
$flag1=$flag2=$flag3=$flag4=True;
|
||||
$conf_obj = new WkErpConfiguration();
|
||||
if (Tools::getIsset('ErpUrl') && $conf_obj->AllowChanges()){
|
||||
$msg = '';
|
||||
$flag1 = $conf_obj->UpdateConfig();
|
||||
if ($flag1){
|
||||
$test_conn = $conf_obj->TestConnection();
|
||||
}
|
||||
else{
|
||||
$msg = 'All Fields are mandatory';
|
||||
}
|
||||
if(Configuration::getGlobalValue('ErpMultiShop'))
|
||||
$flag2 = $conf_obj->CheckMultiShop();
|
||||
if (!$flag2){
|
||||
$msg = $msg. "Sorry, 'POB : Multi-Shop Extension' not found on this PrestaShop`s server. Please contact our support team for further details" ;
|
||||
|
||||
}
|
||||
if(Configuration::getGlobalValue('ErpMultiLang')){
|
||||
$flag3 = $conf_obj->CheckMultiLanguage();
|
||||
if (!$flag3)
|
||||
$msg = $msg. "Sorry, 'POB : Multi-Language Extension' not found on this PrestaShop`s server. Please contact our support team for further details" ;
|
||||
}
|
||||
if(Configuration::getGlobalValue('ErpAutoInvoice'))
|
||||
$flag4 = $conf_obj->CheckOrderInvoice();
|
||||
if (!$flag4)
|
||||
$msg = $msg. "Sorry, You cannot set Automatic Invoicing to 'True' if Automatic Order Confirmation is 'False'" ;
|
||||
if($flag1 and $flag2 and $flag3 and $flag4 and $test_conn['status']){
|
||||
$message = $test_conn['message'];
|
||||
$this->displayInformation($this->l($message));
|
||||
$this->displayInformation($this->l($msg));
|
||||
// Tools::redirectAdmin(self::$currentIndex.'&conf=4&token='.$this->token);
|
||||
}
|
||||
else{
|
||||
if (!$test_conn['status']){
|
||||
$msg = $test_conn['message'];
|
||||
}
|
||||
$this->errors[] = Tools::displayError($this->l($msg));
|
||||
}
|
||||
}
|
||||
parent::processSave();
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
35
modules/prestaerp/controllers/admin/index.php
Normal file
35
modules/prestaerp/controllers/admin/index.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
35
modules/prestaerp/controllers/index.php
Normal file
35
modules/prestaerp/controllers/index.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
35
modules/prestaerp/index.php
Normal file
35
modules/prestaerp/index.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
BIN
modules/prestaerp/logo.png
Normal file
BIN
modules/prestaerp/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 651 B |
35
modules/prestaerp/logs/index.php
Normal file
35
modules/prestaerp/logs/index.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
@ -0,0 +1,172 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
|
||||
class AdminOrdersController extends AdminOrdersControllerCore
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
parent::__construct();
|
||||
|
||||
|
||||
$this->bulk_actions['exportToOdoo'] = array('text' => $this->l('Synchronize with Odoo'), 'icon' => 'icon-ok-sign');
|
||||
$index = count($this->_conf)+1;
|
||||
$this->_conf[$index] = $this->l('All Selected Order(s) has been successfully exported to Odoo.');
|
||||
$this->fields_list['erp_id'] = array(
|
||||
'title' => $this->l('Exported to Odoo'),
|
||||
'align' => 'center',
|
||||
'type' => 'bool',
|
||||
'width' => 'auto',
|
||||
'search' => false,
|
||||
'icon' => array(
|
||||
1 => array(
|
||||
'src' => 'enabled-2.gif',
|
||||
'alt' => $this->l('Synchronized')
|
||||
),
|
||||
0 => array(
|
||||
'src' => 'disabled.gif',
|
||||
'alt' => $this->l('Need Synchronization')
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$this->_join .='LEFT JOIN `'._DB_PREFIX_.'erp_order_merge` om ON (om.`prst_order_id` = a.`id_order`)';
|
||||
$this->_select .=',if(om.`erp_order_id` is null, 0, 1) as erp_id';
|
||||
}
|
||||
|
||||
public function createErpOrder($id_order)
|
||||
{
|
||||
try
|
||||
{
|
||||
if ($id_order)
|
||||
{
|
||||
Hook::exec('displayOrderConfirmation', array('id_order'=>$id_order));
|
||||
return array('status'=>True);
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
return array('status'=>False,'message'=>'Order(ID:'.$id_order.')<br />'. $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function get_erp_connection()
|
||||
{
|
||||
if (!class_exists('xmlrpc_client'))
|
||||
include _PS_MODULE_DIR_.'/prestaerp/classes/xmlrpc.inc';
|
||||
$sock = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl").":".Configuration::getGlobalValue("ErpPort")."/xmlrpc/common");
|
||||
$client = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl").":".Configuration::getGlobalValue("ErpPort")."/xmlrpc/object");
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpUsername"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), 'string'));
|
||||
$resp = $sock->send($msg);
|
||||
if (!$resp->faultCode())
|
||||
{
|
||||
$userId = $resp->value()->scalarval();
|
||||
if ($userId > 0){
|
||||
return array(
|
||||
'sock' => $sock,
|
||||
'client' => $client,
|
||||
'user_id' => $userId,
|
||||
'status' => True
|
||||
);}
|
||||
else{
|
||||
$log = new pob_log();
|
||||
$log->logMessage(__FILE__,__LINE__,'Authentication Error','CRITICAL');
|
||||
return array(
|
||||
'status' =>False
|
||||
);
|
||||
}
|
||||
}
|
||||
else{
|
||||
$log = new pob_log();
|
||||
$log->logMessage(__FILE__,__LINE__,$resp->raw_data,'Connection Error');
|
||||
return array(
|
||||
'status' =>False
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function processBulkexportToOdoo()
|
||||
{ $return = True;
|
||||
$message='';
|
||||
$connect = $this->get_erp_connection();
|
||||
if ($connect['status']==true)
|
||||
{
|
||||
try{
|
||||
$data=$this->boxes;
|
||||
|
||||
if (is_array($data) && (count($data))) {
|
||||
//Deleting data
|
||||
foreach ($data as $id_data) {
|
||||
if($this->check_order($id_data))
|
||||
{
|
||||
$response=$this->createErpOrder($id_data);
|
||||
|
||||
if (!$response['status'])
|
||||
{
|
||||
$return = False;
|
||||
$message=$message.'<br />'.$response['message'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
$return = False;
|
||||
$message=$this->l($e->getMessage());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$return = False;
|
||||
$message= 'Connection Error !!!';
|
||||
}
|
||||
|
||||
if($return)
|
||||
{
|
||||
|
||||
$index = count($this->_conf);
|
||||
Tools::redirectAdmin(self::$currentIndex . '&conf=' . $index . '&token=' . $this->token);
|
||||
}
|
||||
else
|
||||
$this->errors[] = Tools::displayError('An error occurred while exporting Orders. Error:- '.$message);
|
||||
|
||||
}
|
||||
|
||||
public function check_order($id_order)
|
||||
{
|
||||
$check = Db::getInstance()->getRow("SELECT `prst_order_id` from `" . _DB_PREFIX_ . "erp_order_merge` where `prst_order_id`=" . $id_order . "");
|
||||
if (empty($check))
|
||||
return True;
|
||||
else
|
||||
return False;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
35
modules/prestaerp/override/controllers/admin/index.php
Normal file
35
modules/prestaerp/override/controllers/admin/index.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
35
modules/prestaerp/override/controllers/index.php
Normal file
35
modules/prestaerp/override/controllers/index.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
35
modules/prestaerp/override/index.php
Normal file
35
modules/prestaerp/override/index.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
760
modules/prestaerp/prestaerp.php
Normal file
760
modules/prestaerp/prestaerp.php
Normal file
@ -0,0 +1,760 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
require_once 'classes/PrestaerpClassInclude.php';
|
||||
|
||||
class Prestaerp extends Module{
|
||||
const INSTALL_SQL_FILE = 'install.sql';
|
||||
|
||||
public function __construct(){
|
||||
$this->name = 'prestaerp';
|
||||
$this->tab = 'administration';
|
||||
$this->version = '4.0.1';
|
||||
$this->author = 'WebKul Software Pvt. Ltd.';
|
||||
$this->need_instance = 0;
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->displayName = $this->l('POB : PrestaShop-Odoo Bridge');
|
||||
$this->description = $this->l('This module provides a way to export your PrestaShop`s data to Odoo. Also, provides a real time synchronization of order(s) from Prestashop to OpenERP.');
|
||||
$this->confirmUninstall = $this->l('Are you sure you want to uninstall it?');
|
||||
|
||||
}
|
||||
|
||||
public function insertTab() {
|
||||
$this->installTab('OdooMapping','Odoo Mapping');
|
||||
Configuration::updateGlobalValue('erp-prst-tab-id',(int)Tab::getIdFromClassName('OdooMapping'));
|
||||
$this->installTab('AdminWkErpConfiguration', 'Odoo Configuration', 'OdooMapping');
|
||||
$this->installTab('AdminErpOrders','Orders','OdooMapping');
|
||||
$this->installTab('AdminErpCustomer','Customers','OdooMapping');
|
||||
$this->installTab('AdminErpCustomerAddress','Customer`s Address','OdooMapping');
|
||||
$this->installTab('AdminErpProductAttribute','Attribute','OdooMapping');
|
||||
$this->installTab('AdminErpProductAttributeValue','Attribute`s Values','OdooMapping');
|
||||
$this->installTab('AdminErpProductCategory','Product`s Category','OdooMapping');
|
||||
$this->installTab('AdminErpProductCombination','All Product`s\Combinations','OdooMapping');
|
||||
$this->installTab('AdminErpProductTemplate','Product`s Template','OdooMapping');
|
||||
$this->installTab('AdminErpTaxes','Taxes','OdooMapping');
|
||||
$this->installTab('AdminErpCarrier','Carriers','OdooMapping');
|
||||
$this->installTab('AdminErpCurrency','Currency','OdooMapping');
|
||||
$this->installTab('AdminErpPaymentMethod','Payment Methods','OdooMapping');
|
||||
return true;
|
||||
}
|
||||
|
||||
public function installTab($class_name,$tab_name,$tab_parent_name=false) {
|
||||
$tab = new Tab();
|
||||
$tab->active = 1;
|
||||
$tab->class_name = $class_name;
|
||||
$tab->name = array();
|
||||
foreach (Language::getLanguages(true) as $lang)
|
||||
$tab->name[$lang['id_lang']] = $tab_name;
|
||||
if($tab_parent_name) {
|
||||
$tab->id_parent = (int)Tab::getIdFromClassName($tab_parent_name);
|
||||
}else {
|
||||
$tab->id_parent = 0;
|
||||
}
|
||||
$tab->module = $this->name;
|
||||
return $tab->add();
|
||||
}
|
||||
|
||||
public function changePosition(){
|
||||
$a = Db::getInstance()->execute("UPDATE `" . _DB_PREFIX_ . "tab` SET `position`=7 where `class_name`='OdooMapping'");
|
||||
return true;
|
||||
}
|
||||
|
||||
public function deleteTab() {
|
||||
$this->uninstallTab('AdminErpOrders');
|
||||
$this->uninstallTab('AdminErpCustomer');
|
||||
$this->uninstallTab('AdminErpCustomerAddress');
|
||||
$this->uninstallTab('AdminErpProductAttribute');
|
||||
$this->uninstallTab('AdminErpProductAttributeValue');
|
||||
$this->uninstallTab('AdminErpProductCategory');
|
||||
$this->uninstallTab('AdminErpProductCombination');
|
||||
$this->uninstallTab('AdminErpProductTemplate');
|
||||
$this->uninstallTab('AdminErpTaxes');
|
||||
$this->uninstallTab('AdminErpCarrier');
|
||||
$this->uninstallTab('AdminErpCurrency');
|
||||
$this->uninstallTab('AdminErpPaymentMethod');
|
||||
$this->uninstallTab('AdminWkErpConfiguration');
|
||||
$this->uninstallTab('OdooMapping');
|
||||
return true;
|
||||
}
|
||||
|
||||
public function uninstallTab($class_name) {
|
||||
$id_tab = (int)Tab::getIdFromClassName($class_name);
|
||||
if ($id_tab){
|
||||
$tab = new Tab($id_tab);
|
||||
return $tab->delete();
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
public function install(){
|
||||
if (!file_exists(dirname(__FILE__).'/'.self::INSTALL_SQL_FILE))
|
||||
return (false);
|
||||
else if (!$sql = Tools::file_get_contents(dirname(__FILE__).'/'.self::INSTALL_SQL_FILE))
|
||||
return (false);
|
||||
|
||||
$sql = str_replace(array('PREFIX_', 'ENGINE_TYPE'), array(_DB_PREFIX_, _MYSQL_ENGINE_), $sql);
|
||||
$sql = preg_split("/;\s*[\r\n]+/", $sql);
|
||||
|
||||
foreach ($sql AS $query)
|
||||
if($query)
|
||||
if(!Db::getInstance()->execute(trim($query)))
|
||||
return false;
|
||||
|
||||
Configuration::updateGlobalValue('ErpAllowFrontExport',True);
|
||||
Configuration::updateGlobalValue('ErpAutoInvoice',True);
|
||||
Configuration::updateGlobalValue('ErpConfirmOrder',True);
|
||||
Configuration::updateGlobalValue('ErpAutoStatusUpdate',True);
|
||||
if (!parent::install() OR !$this->insertTab() OR !$this->changePosition() OR !$this->registerHook('actionPaymentConfirmation') OR !$this->registerHook('actionOrderStatusUpdate') OR !$this->registerHook('displayOrderConfirmation') OR !$this->registerHook('actionObjectProductUpdateAfter') OR !$this->registerHook('actionObjectCategoryUpdateAfter')OR !$this->registerHook('actionValidateOrder') OR !$this->copy_webservice_files() OR !$this->registerHook('actionPobExportTrackingRef') OR !$this->registerHook('displayBackOfficeHeader'))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public function uninstall(){
|
||||
$check_multi_shop = Db::getInstance()->getRow("select `id_module` from `"._DB_PREFIX_."module` where `name`='prestaerpmultishop' and `active`=1");
|
||||
$check_multi_lang = Db::getInstance()->getRow("select `id_module` from `"._DB_PREFIX_."module` where `name`='prestaerpmultilang' and `active`=1");
|
||||
if (!$check_multi_shop && !$check_multi_lang){
|
||||
$this->deleteTab();
|
||||
$this->remove_webservice_files();
|
||||
$this->deleteConfiguration();
|
||||
if (!parent::uninstall())
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
$name = '';
|
||||
if ($check_multi_shop)
|
||||
$name = $name.'"POB : Multi-Shop Extension"';
|
||||
if ($check_multi_lang)
|
||||
$name = $name.'"POB : Multi-Language Extension"';
|
||||
$this->errors[] = Tools::displayError('<ul>
|
||||
<li>'.$this->l('In order to uninstall these Module you must un-install '.$name.' first.').'</li>
|
||||
<li>'.$this->l('Please contact our support team for further details.').'</li>
|
||||
</ul>');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public function hookDisplayBackOfficeHeader(){
|
||||
$this->context->controller->addCss($this->_path.'views/css/admin/css/prestaerpmenu.css');
|
||||
}
|
||||
|
||||
public function deleteConfiguration() {
|
||||
$c1=Configuration::deleteByName('ErpUrl');
|
||||
$c2=Configuration::deleteByName('ErpPort');
|
||||
$c3=Configuration::deleteByName('ErpDatabase');
|
||||
$c4=Configuration::deleteByName('ErpUsername');
|
||||
$c5=Configuration::deleteByName('ErpPassword');
|
||||
$c6=Configuration::deleteByName('ErpDropTables');
|
||||
$c7=Configuration::deleteByName('ErpMultiShop');
|
||||
$c8=Configuration::deleteByName('erp-prst-tab-id');
|
||||
$c9=Configuration::deleteByName('ErpMultiLang');
|
||||
$c10=Configuration::deleteByName('ErpTestConnection');
|
||||
$c11=Configuration::deleteByName('ErpConfirmOrder');
|
||||
$c12=Configuration::deleteByName('ErpAutoInvoice');
|
||||
$c13=Configuration::deleteByName('ErpAutoStatusUpdate');
|
||||
if(!$c1 || !$c2 || !$c3 || !$c4 || !$c5 || !$c6 || !$c7 || !$c8 || !$c9 || !$c10 ||$c11 ||$c12 ||$c13)
|
||||
return False;
|
||||
else
|
||||
return True;
|
||||
}
|
||||
|
||||
public function deleteTables() {
|
||||
if(Configuration::getGlobalValue("ErpDropTables") == 1){
|
||||
$d1=Db::getInstance()->executeS('DROP TABLE '._DB_PREFIX_.'erp_attribute_values_merge');
|
||||
$d2=Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'erp_attributes_merge');
|
||||
$d3=Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'erp_product_template_merge');
|
||||
$d4=Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'erp_customer_merge');
|
||||
$d5=Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'erp_address_merge');
|
||||
$d6=Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'erp_product_merge');
|
||||
$d7=Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'erp_category_merge');
|
||||
$d8=Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'erp_tax_merge');
|
||||
$d9=Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'erp_payment_merge');
|
||||
$d10=Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'erp_currency_merge');
|
||||
$d11=Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'erp_carrier_merge');
|
||||
$d12=Db::getInstance()->execute('DROP TABLE '._DB_PREFIX_.'erp_order_merge');
|
||||
if(!$d1 || !$d2 || !$d3 || !$d4 || !$d5 || !$d6 || !$d7 || !$d8 || !$d9 || !$d10 || !$d11 || !$d12)
|
||||
return False;
|
||||
}
|
||||
return True;
|
||||
}
|
||||
|
||||
public function copy_webservice_files(){
|
||||
$override_src = $this->getLocalPath().'rest_api_files'.DIRECTORY_SEPARATOR;
|
||||
$override_dest = _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'override'.DIRECTORY_SEPARATOR.'classes'.DIRECTORY_SEPARATOR;
|
||||
$product_merge =copy($override_src.'ProductMerge.php',$override_dest.'ProductMerge.php');
|
||||
$category_merge =copy($override_src.'CategoryMerge.php',$override_dest.'CategoryMerge.php');
|
||||
$attribute_merge =copy($override_src.'AttributeMerge.php',$override_dest.'AttributeMerge.php');
|
||||
$attribute_value_merge =copy($override_src.'AttributeValueMerge.php',$override_dest.'AttributeValueMerge.php');
|
||||
$product_template_merge =copy($override_src.'ProductTemplateMerge.php',$override_dest.'ProductTemplateMerge.php');
|
||||
$webservice_request =copy($override_src.'WebserviceRequest.php',$override_dest.'webservice'.DIRECTORY_SEPARATOR.'WebserviceRequest.php');
|
||||
if(!$override_src || !$override_dest || !$product_merge || !$category_merge || !$webservice_request || !$attribute_merge || !$attribute_value_merge || !$product_template_merge)
|
||||
return False;
|
||||
else
|
||||
return True;
|
||||
}
|
||||
|
||||
public function remove_webservice_files(){
|
||||
$override_src = $this->getLocalPath().'rest_api_files'.DIRECTORY_SEPARATOR.'remove'.DIRECTORY_SEPARATOR;
|
||||
$override_dest = _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'override'.DIRECTORY_SEPARATOR.'classes'.DIRECTORY_SEPARATOR;
|
||||
$product_merge =copy($override_src.'ProductMerge.php',$override_dest.'ProductMerge.php');
|
||||
$category_merge =copy($override_src.'CategoryMerge.php',$override_dest.'CategoryMerge.php');
|
||||
$attribute_merge =copy($override_src.'AttributeMerge.php',$override_dest.'AttributeMerge.php');
|
||||
$attribute_value_merge =copy($override_src.'AttributeValueMerge.php',$override_dest.'AttributeValueMerge.php');
|
||||
$product_template_merge =copy($override_src.'ProductTemplateMerge.php',$override_dest.'ProductTemplateMerge.php');
|
||||
$webservice_request =copy($override_src.'WebserviceRequest.php',$override_dest.'webservice'.DIRECTORY_SEPARATOR.'WebserviceRequest.php');
|
||||
if(!$attribute_merge || !$attribute_value_merge || !$product_merge || !$category_merge || !$webservice_request || !$product_template_merge)
|
||||
return False;
|
||||
else
|
||||
return True;
|
||||
}
|
||||
|
||||
public function get_erp_connection(){
|
||||
if (!class_exists('xmlrpc_client'))
|
||||
include 'xmlrpc.inc';
|
||||
$sock = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl").":".Configuration::getGlobalValue("ErpPort")."/xmlrpc/common");
|
||||
$client = new xmlrpc_client(Configuration::getGlobalValue("ErpUrl").":".Configuration::getGlobalValue("ErpPort")."/xmlrpc/object");
|
||||
$msg = new xmlrpcmsg('login');
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpUsername"), 'string'));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), 'string'));
|
||||
$resp = $sock->send($msg);
|
||||
if (!$resp->faultCode()){
|
||||
$userId = $resp->value()->scalarval();
|
||||
if ($userId > 0){
|
||||
return array(
|
||||
'client' => $client,
|
||||
'user_id' => $userId,
|
||||
'status' => True
|
||||
);}
|
||||
else{
|
||||
$log = new pob_log();
|
||||
$log->logMessage(__FILE__,__LINE__,'Authentication Error','CRITICAL');
|
||||
return array(
|
||||
'status' =>False
|
||||
);
|
||||
}
|
||||
}
|
||||
else{
|
||||
$log = new pob_log();
|
||||
$log->logMessage(__FILE__,__LINE__,$resp->raw_data,'CRITICAL: ');
|
||||
return array(
|
||||
'status' =>False
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function hookActionPobExportTrackingRef($params){
|
||||
// Hook::exec('actionPobExportTrackingRef', array('id_order'=>$order->id,'carrier' => Tools::getValue('tracking_number')));
|
||||
|
||||
// Above code to be added in Orders controller manually in postProcess()
|
||||
return true;
|
||||
// $connect = $this->get_erp_connection();
|
||||
// if ($connect['status']==true){
|
||||
// $client = $connect['client'];
|
||||
// $userId = $connect['user_id'];
|
||||
|
||||
// $merge_data = Db::getInstance()->getRow("SELECT `erp_order_id` from ". _DB_PREFIX_."erp_order_merge where prst_order_id=".$params['id_order']."");
|
||||
// if ($merge_data){
|
||||
// $id_order = $merge_data['erp_order_id'];
|
||||
// $ref = $params['carrier'];
|
||||
// }else{
|
||||
// return True;
|
||||
// }
|
||||
|
||||
// $context = array(
|
||||
// 'prestashop' => new xmlrpcval('prestashop', "string")
|
||||
// );
|
||||
// $data = array(
|
||||
// 'order_id' =>new xmlrpcval($id_order,"int"),
|
||||
// 'track_no' =>new xmlrpcval($ref,"string"),
|
||||
// );
|
||||
|
||||
// $msg = new xmlrpcmsg('execute');
|
||||
// $msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
// $msg->addParam(new xmlrpcval($userId, "int"));
|
||||
// $msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
// $msg->addParam(new xmlrpcval("force.done", "string"));
|
||||
// $msg->addParam(new xmlrpcval("add_tracking_number", "string"));
|
||||
// $msg->addParam(new xmlrpcval($data, "struct"));
|
||||
// $msg->addParam(new xmlrpcval($context, "struct"));
|
||||
// $response = $client->send($msg);
|
||||
// }
|
||||
}
|
||||
|
||||
public function hookActionOrderStatusUpdate($params){
|
||||
$log = new pob_log();
|
||||
if (Configuration::getGlobalValue('ErpAutoStatusUpdate') == true){
|
||||
|
||||
$order_state = new OrderState(Tools::getValue('id_order_state'));
|
||||
if ($order_state){
|
||||
if ($order_state->id == 6){
|
||||
$connect = $this->get_erp_connection();
|
||||
if ($connect['status'] == true){
|
||||
$client = $connect['client'];
|
||||
$userId = $connect['user_id'];
|
||||
|
||||
$id_order = Tools::getValue('id_order');
|
||||
$erp_order_id = Db::getInstance()->getRow("SELECT * from `"._DB_PREFIX_."erp_order_merge` where `prst_order_id`=".$id_order."");
|
||||
|
||||
$context = array(
|
||||
'prestashop' => new xmlrpcval('prestashop', "string")
|
||||
);
|
||||
$order_payment = new xmlrpcmsg('execute');
|
||||
$order_payment->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$order_payment->addParam(new xmlrpcval($userId, "int"));
|
||||
$order_payment->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$order_payment->addParam(new xmlrpcval("force.done", "string"));
|
||||
$order_payment->addParam(new xmlrpcval("order_cancel", "string"));
|
||||
$order_payment->addParam(new xmlrpcval($erp_order_id['erp_order_id'], "int"));
|
||||
$order_payment->addParam(new xmlrpcval($context, "struct"));
|
||||
$order_pay_resp = $client->send($order_payment);
|
||||
if ($order_pay_resp->faultCode()) {
|
||||
$error_message = $order_pay_resp->faultString();
|
||||
|
||||
$log->logMessage(__FILE__,__LINE__,$error_message,"CRITICAL");
|
||||
}
|
||||
else
|
||||
$log->logMessage(__FILE__,__LINE__,'Order is set to DELIVERED','INFO');
|
||||
}
|
||||
}
|
||||
|
||||
if($order_state->id == 4 || $order_state->id == 5){
|
||||
$id_order = Tools::getValue('id_order');
|
||||
$erp_order_id = Db::getInstance()->getRow("SELECT `erp_order_id` from `"._DB_PREFIX_."erp_order_merge` where `prst_order_id`=".$id_order."");
|
||||
|
||||
$connect = $this->get_erp_connection();
|
||||
if ($connect['status']==true){
|
||||
$client = $connect['client'];
|
||||
$userId = $connect['user_id'];
|
||||
|
||||
$pick_avail = new xmlrpcmsg('execute');
|
||||
$pick_avail->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$pick_avail->addParam(new xmlrpcval($userId, "int"));
|
||||
$pick_avail->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$pick_avail->addParam(new xmlrpcval("force.done", "string"));
|
||||
$pick_avail->addParam(new xmlrpcval("order_shipped", "string"));
|
||||
$pick_avail->addParam(new xmlrpcval($erp_order_id['erp_order_id'],"int"));
|
||||
$client->send($pick_avail);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function hookDisplayOrderConfirmation($params,$order_id=False){
|
||||
$log = new pob_log();
|
||||
$id_order = false;
|
||||
if (isset($params['objOrder']->id))
|
||||
$id_order = $params['objOrder']->id;
|
||||
else
|
||||
$id_order = $params['id_order'];
|
||||
if(!$id_order)
|
||||
$id_order = (Tools::getValue('id_order')) ? Tools::getValue('id_order'):$order_id;
|
||||
|
||||
if ($id_order){
|
||||
$erp_order_id = Db::getInstance()->getRow("SELECT * from `"._DB_PREFIX_."erp_order_merge` where `prst_order_id`=".$id_order."");
|
||||
if (empty($erp_order_id)) {
|
||||
if (!class_exists('xmlrpc_client'))
|
||||
include 'xmlrpc.inc';
|
||||
$connect = $this->get_erp_connection();
|
||||
if ($connect['status']==true){
|
||||
$client = $connect['client'];
|
||||
$userId = $connect['user_id'];
|
||||
|
||||
$order = Db::getInstance()->getRow("SELECT `current_state`,`id_customer`,`id_address_delivery`,`id_address_invoice`,`id_currency`,`id_shop`,`total_discounts_tax_incl`,`reference`,`total_paid_tax_incl`,`total_shipping_tax_incl`,`total_shipping_tax_excl`,`total_paid`,`date_add`,`date_upd`,`invoice_date`,`total_paid`,`carrier_tax_rate`,`module` from `" . _DB_PREFIX_ . "orders` where `id_order`=" . $id_order. "");
|
||||
$order_reference = $order['reference'];
|
||||
$order_details = Db::getInstance()->executeS("SELECT `product_id`,`reduction_percent`,`product_attribute_id`,`id_order_detail`,`product_quantity`,`product_name`,`reduction_amount_tax_incl`,`original_product_price`,`product_price`,`unit_price_tax_excl`,`reduction_amount_tax_excl` from `" . _DB_PREFIX_ . "order_detail` where `id_order`=" .$id_order. "");
|
||||
Db::getInstance()->execute("INSERT INTO `" . _DB_PREFIX_ . "erp_order_merge`(`erp_order_id`,`prst_order_id`,`erp_order_name`,`presta_module`)VALUES(0," .$id_order. ",'Need to Update','None')");
|
||||
|
||||
$customer = new ErpCustomer();
|
||||
$address = new ErpCustomerAddress();
|
||||
$id_customer = $customer->check_specific_customer($userId, $client, $order['id_customer']);
|
||||
$delivery_address = $address->check_specific_address($userId, $client, $order['id_address_delivery'],$order['id_customer']);
|
||||
|
||||
$invoice_address = $address->check_specific_address($userId, $client, $order['id_address_invoice'],$order['id_customer']);
|
||||
$currency = new ErpCurrency();
|
||||
$currency_id = $currency->check_specific_currency($order['id_currency'], $userId, $client);
|
||||
$order_data=array(
|
||||
'partner_id' => new xmlrpcval($id_customer, "int"),
|
||||
'partner_invoice_id' => new xmlrpcval($invoice_address, "string"),
|
||||
'partner_shipping_id' => new xmlrpcval($delivery_address, "string"),
|
||||
'pricelist_id' => new xmlrpcval($currency_id, "string"),
|
||||
'presta_order_id' => new xmlrpcval($id_order, "string"),
|
||||
'presta_order_reference'=> new xmlrpcval($order_reference, "string"),
|
||||
'date_add' => new xmlrpcval($order['date_add'], "string"),
|
||||
'date_upd' => new xmlrpcval($order['date_upd'], "string"),
|
||||
'presta_total' => new xmlrpcval($order['total_paid'], "string"),
|
||||
'presta_module' => new xmlrpcval($order['module'], "string"),
|
||||
);
|
||||
|
||||
if(Configuration::getGlobalValue("ErpMultiShop") == 1){
|
||||
include_once _PS_MODULE_DIR_.'/prestaerpmultishop/ErpShop.php';
|
||||
$shop = new ErpShop();
|
||||
$erp_shop_id = $shop->check_specific_shop($order['id_shop'], $userId, $client);
|
||||
$order_data['shop_id']=new xmlrpcval($erp_shop_id, "string");
|
||||
}
|
||||
$product = new ErpProductCombination();
|
||||
$tax = new ErpTaxes();
|
||||
$i = 0;
|
||||
$line_array =array();
|
||||
|
||||
foreach ($order_details as $details) {
|
||||
$erp_product_id = $product->check_specific_product($details['product_id'],$details['product_attribute_id'],$userId, $client);
|
||||
$total_price = $details['unit_price_tax_excl'];
|
||||
$reduction_rate_tax_excl='0';
|
||||
$tax_id = Db::getInstance()->getRow("SELECT `id_tax` from `" . _DB_PREFIX_ . "order_detail_tax` where `id_order_detail`=" . $details['id_order_detail'] . "");
|
||||
if ($tax_id['id_tax'] > 0) {
|
||||
$erp_tax_id = $tax->check_specific_tax($tax_id['id_tax'], $client, $userId);
|
||||
}
|
||||
else
|
||||
$erp_tax_id = -1;
|
||||
$line_array[$i]=new xmlrpcval(array(
|
||||
'type' => new xmlrpcval('Product', "string"),
|
||||
'product_id' => new xmlrpcval($erp_product_id, "int"),
|
||||
'price_unit' => new xmlrpcval($total_price, "string"),
|
||||
'product_uom_qty' => new xmlrpcval($details['product_quantity'], "string"),
|
||||
'name' => new xmlrpcval(str_replace('+', ' ',urlencode($details['product_name'])), "string"),
|
||||
'discount' => new xmlrpcval($reduction_rate_tax_excl, "string"),
|
||||
'tax_id' => new xmlrpcval($erp_tax_id, "string"),
|
||||
),"struct");
|
||||
|
||||
$i = $i+1;
|
||||
}
|
||||
|
||||
$shipping_price = Db::getInstance()->getRow("SELECT `id_carrier`,`shipping_cost_tax_excl` from `" . _DB_PREFIX_ . "order_carrier` where `id_order`=" .$id_order. " ORDER BY date_add DESC");
|
||||
$carrier = new ErpCarrier();
|
||||
if ((float)$order['total_shipping_tax_excl']!=(float)$order['total_shipping_tax_incl']){
|
||||
$check_tax = Db::getInstance()->getRow("SELECT `erp_tax_id` from `"._DB_PREFIX_."erp_tax_merge` where `rate`=".$order['carrier_tax_rate']."");
|
||||
if ($check_tax)
|
||||
$ship_tax_id=$check_tax['erp_tax_id'];
|
||||
}
|
||||
else
|
||||
$ship_tax_id=-1;
|
||||
$carrier_data = $carrier->check_specific_carrier($shipping_price['id_carrier'], $userId, $client);
|
||||
$line_array[$i]=new xmlrpcval(array(
|
||||
'type' => new xmlrpcval('Shipping', "string"),
|
||||
'price_unit' => new xmlrpcval($shipping_price['shipping_cost_tax_excl'], "string"),
|
||||
'product_uom_qty' => new xmlrpcval('1', "string"),
|
||||
'name' => new xmlrpcval(str_replace('+',' ',urlencode($carrier_data['name'])), "string"),
|
||||
'tax_id' => new xmlrpcval($ship_tax_id, "string"),
|
||||
),"struct");
|
||||
$order_data['carrier_id']=new xmlrpcval($carrier_data['erp_id'], "string");
|
||||
$voucher_price = $order['total_discounts_tax_incl'];
|
||||
if ($voucher_price > 0) {
|
||||
$i=$i+1;
|
||||
$line_array[$i]=new xmlrpcval(array(
|
||||
'type' => new xmlrpcval('Voucher', "string"),
|
||||
'price_unit' => new xmlrpcval('-'.$voucher_price, "string"),
|
||||
'product_uom_qty' => new xmlrpcval('1', "string"),
|
||||
'name' => new xmlrpcval('Voucher', "string"),
|
||||
),"struct");
|
||||
}
|
||||
|
||||
$msg1 = new xmlrpcmsg('execute');
|
||||
$msg1->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg1->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg1->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg1->addParam(new xmlrpcval("force.done", "string"));
|
||||
$msg1->addParam(new xmlrpcval("create_n_confirm_order", "string"));
|
||||
$msg1->addParam(new xmlrpcval($order_data, "struct"));
|
||||
$msg1->addParam(new xmlrpcval($line_array, "array"));
|
||||
$response = $client->send($msg1);
|
||||
if (!$response->faultCode()){
|
||||
$response_array=php_xmlrpc_decode($response->value()->me['array'][0]);
|
||||
$merge_array=array(
|
||||
'prst_order_id' => $response_array['prst_order_id'],
|
||||
'erp_order_name' => $response_array['erp_order_name'],
|
||||
'erp_order_id' =>$response_array['erp_order_id'],
|
||||
'presta_module' =>$order['module'],
|
||||
);
|
||||
$order_id = $response_array['erp_order_id'];
|
||||
$erp_total = $response_array['erp_total'];
|
||||
$ps_total = $response_array['presta_total'];
|
||||
|
||||
Db::getInstance()->execute("UPDATE `" . _DB_PREFIX_ . "erp_order_merge` SET `erp_order_id`=".$merge_array['erp_order_id'].",`erp_order_name`='".$merge_array['erp_order_name']."',`presta_module`='".$order['module']."' where `prst_order_id`=" .$id_order. "");
|
||||
$data = array(
|
||||
'order_id' =>$order_id,
|
||||
'client' =>$client,
|
||||
'userId' =>$userId
|
||||
);
|
||||
if ((int)(round($erp_total))==(int)(round((float)($ps_total)))) {
|
||||
if (Configuration::getGlobalValue('ErpConfirmOrder')==True){
|
||||
$check_order = $this->set_order_confirm($data);
|
||||
if (($check_order['status']==True) &&(Configuration::getGlobalValue('ErpAutoInvoice'))){
|
||||
$generate_invoice = $this->auto_gen_invoice($data);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (($order['current_state'] == 2) || ($order['current_state'] == 12) ){
|
||||
$order_merge_data = Db::getInstance()->getRow("SELECT * from `"._DB_PREFIX_."erp_order_merge` where `prst_order_id`=".$order_id."");
|
||||
if ($order_merge_data['erp_invoice_id']==0){
|
||||
$generate_invoice = $this->auto_gen_invoice($data);
|
||||
$erp_inv_id = $generate_invoice['erp_invoice_id'];
|
||||
}
|
||||
else
|
||||
$erp_inv_id = $order_merge_data['erp_invoice_id'];
|
||||
|
||||
$payment_data = array(
|
||||
'erp_customer_id' =>$id_customer,
|
||||
'presta_reference' =>$order_reference,
|
||||
'presta_amount' =>$order['total_paid_tax_incl'],
|
||||
'erp_invoice_id' =>$erp_inv_id,
|
||||
'order_id' =>$order_id,
|
||||
'client' =>$client,
|
||||
'userId' =>$userId,
|
||||
'module' =>$order['module']
|
||||
);
|
||||
$this->set_order_paid($payment_data);
|
||||
}
|
||||
}
|
||||
else{
|
||||
Db::getInstance()->delete("erp_order_merge","prst_order_id=".$id_order." and erp_order_name='Need to Update'");
|
||||
$log = new pob_log();
|
||||
$log->logMessage(__FILE__,__LINE__,$response->raw_data,'CRITICAL');
|
||||
}
|
||||
}
|
||||
else{
|
||||
$log = new pob_log();
|
||||
$log->logMessage(__FILE__,__LINE__,$id_order,'CRITICAL: Connection Error');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function set_order_confirm($data){
|
||||
$log = new pob_log();
|
||||
if (!$data['userId']){
|
||||
$response = $this->get_erp_connection();
|
||||
$data['userId'] = $response['user_id'];
|
||||
$data['client'] = $response['client'];
|
||||
}
|
||||
if ($data['userId']){
|
||||
$userId = $data['userId'];
|
||||
$order_id = $data['order_id'];
|
||||
$client = $data['client'];
|
||||
|
||||
$msg = new xmlrpcmsg('exec_workflow');
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg->addParam(new xmlrpcval("sale.order", "string"));
|
||||
$msg->addParam(new xmlrpcval("order_confirm", "string"));
|
||||
$msg->addParam(new xmlrpcval($order_id, "int"));
|
||||
$resp = $client->send($msg);
|
||||
|
||||
if ($resp->faultCode()){
|
||||
|
||||
$log->logMessage(__FILE__,__LINE__,$resp->raw_data,'CRITICAL');
|
||||
return array(
|
||||
'status' =>False
|
||||
);
|
||||
}
|
||||
else{
|
||||
$log->logMessage(__FILE__,__LINE__,'Order is Confirmed on Openerp.','INFO');
|
||||
return array(
|
||||
'status' =>True
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function auto_gen_invoice($data){
|
||||
$log = new pob_log();
|
||||
if (!$data['userId']){
|
||||
$response = $this->get_erp_connection();
|
||||
$data['userId'] = $response['user_id'];
|
||||
$data['client'] = $response['client'];
|
||||
|
||||
}
|
||||
if ($data['userId']){
|
||||
$userId = $data['userId'];
|
||||
$order_id = $data['order_id'];
|
||||
$client = $data['client'];
|
||||
|
||||
$msg = new xmlrpcmsg('execute');
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$msg->addParam(new xmlrpcval($userId, "int"));
|
||||
$msg->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$msg->addParam(new xmlrpcval("force.done", "string"));
|
||||
$msg->addParam(new xmlrpcval("create_order_invoice", "string"));
|
||||
$msg->addParam(new xmlrpcval($order_id, "int"));
|
||||
$resp = $client->send($msg);
|
||||
|
||||
if (!$resp->faultCode()){
|
||||
$erp_invoice_id = $resp->value()->me['int'];
|
||||
$log->logMessage(__FILE__,__LINE__,'Invoice is Generated on Openerp.','INFO');
|
||||
return array(
|
||||
'erp_invoice_id' =>$erp_invoice_id,
|
||||
'status' =>True
|
||||
);
|
||||
}
|
||||
else{
|
||||
$log->logMessage(__FILE__,__LINE__,$resp->raw_data,'CRITICAL');
|
||||
return array(
|
||||
'status' =>False
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function hookActionObjectCategoryUpdateAfter($params){
|
||||
$id_category = Tools::getValue('id_category');
|
||||
if ($id_category)
|
||||
Db::getInstance()->update('erp_category_merge',array('is_synch'=>0),'prestashop_category_id='.$id_category);
|
||||
if (Configuration::getGlobalValue("ErpMultiLang")){
|
||||
Db::getInstance()->execute("UPDATE `" . _DB_PREFIX_ . "erp_category_merge` SET `translate_state`='to_translate', `color`='DarkOrange' WHERE `prestashop_category_id`=".$id_category."");
|
||||
}
|
||||
}
|
||||
|
||||
public function hookActionObjectProductUpdateAfter($params){
|
||||
$id_product = Tools::getValue('id_product');
|
||||
if ($id_product){
|
||||
Db::getInstance()->update('erp_product_merge',array('is_synch'=>0),'prestashop_product_id='.$id_product);
|
||||
Db::getInstance()->update('erp_product_template_merge',array('is_synch'=>0),'presta_product_id='.$id_product);
|
||||
if (Configuration::getGlobalValue("ErpMultiLang")){
|
||||
Db::getInstance()->execute("UPDATE `" . _DB_PREFIX_ . "erp_product_template_merge` SET `translate_state`='to_translate', `color`='DarkOrange' WHERE `presta_product_id`=".$id_product."");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function hookActionValidateOrder($params){
|
||||
$id_cart = Tools::getValue('id_cart');
|
||||
if ($id_cart){
|
||||
$order_data = Db::getInstance()->getRow("SELECT `id_order` from `"._DB_PREFIX_."orders` where `id_cart`=".$id_cart."");
|
||||
$id_order=$order_data['id_order'];
|
||||
$this->hookDisplayOrderConfirmation($params,$id_order);
|
||||
}
|
||||
}
|
||||
|
||||
public function set_order_paid($data){
|
||||
$log = new pob_log();
|
||||
if (!$data['userId']){
|
||||
$response = $this->get_erp_connection();
|
||||
$data['userId'] = $response['user_id'];
|
||||
$data['client'] = $response['client'];
|
||||
}
|
||||
if ($data['userId']){
|
||||
$userId = $data['userId'];
|
||||
$client = $data['client'];
|
||||
|
||||
$payment = new ErpPaymentMethod();
|
||||
$erp_payment_id = $payment->check_specific_payment_method($data['module'],$userId,$client);
|
||||
|
||||
$Order_payment_arr = array(
|
||||
'partner_id' =>new xmlrpcval($data['erp_customer_id'],"int"),
|
||||
'reference' =>new xmlrpcval($data['presta_reference'],"string"),
|
||||
'amount' =>new xmlrpcval($data['presta_amount'],"string"),
|
||||
'invoice_id' =>new xmlrpcval($data['erp_invoice_id'],"int"),
|
||||
'journal_id' =>new xmlrpcval($erp_payment_id,"int"),
|
||||
'order_id' =>new xmlrpcval($data['order_id'],"int"),
|
||||
);
|
||||
$context = array(
|
||||
'prestashop' => new xmlrpcval('prestashop', "string")
|
||||
);
|
||||
|
||||
$order_payment = new xmlrpcmsg('execute');
|
||||
$order_payment->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"),"string"));
|
||||
$order_payment->addParam(new xmlrpcval($userId, "int"));
|
||||
$order_payment->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$order_payment->addParam(new xmlrpcval("force.done", "string"));
|
||||
$order_payment->addParam(new xmlrpcval("order_paid", "string"));
|
||||
$order_payment->addParam(new xmlrpcval($Order_payment_arr, "struct"));
|
||||
$order_payment->addParam(new xmlrpcval($context, "struct"));
|
||||
$order_pay_resp = $client->send($order_payment);
|
||||
if ($order_pay_resp->faultCode()){
|
||||
$log->logMessage(__FILE__,__LINE__,$order_pay_resp->raw_data,'CRITICAL');
|
||||
return False;
|
||||
}
|
||||
else{
|
||||
$log->logMessage(__FILE__,__LINE__,'Order is Set to Paid.','INFO');
|
||||
}
|
||||
return True;
|
||||
}
|
||||
else
|
||||
return False;
|
||||
}
|
||||
|
||||
public function hookActionPaymentConfirmation($params){
|
||||
$log = new pob_log();
|
||||
if((Configuration::getGlobalValue('ErpAutoStatusUpdate')==True)){
|
||||
$id_order = Tools::getValue('id_order');
|
||||
$id_order_state = Tools::getValue('id_order_state');
|
||||
|
||||
if($id_order_state == 2 || $id_order_state == 12){
|
||||
$order_details = Db::getInstance()->getRow("SELECT * from `"._DB_PREFIX_."erp_order_merge` where `prst_order_id`=".$id_order."");
|
||||
$customer = Db::getInstance()->getRow("SELECT * from `"._DB_PREFIX_."orders` where `id_order`=".$id_order."");
|
||||
$erp_customer = Db::getInstance()->getRow("SELECT * from `"._DB_PREFIX_."erp_customer_merge` where `prestashop_customer_id`=".$customer['id_customer']."");
|
||||
|
||||
$connect = $this->get_erp_connection();
|
||||
if ($connect['status']==true){
|
||||
$client = $connect['client'];
|
||||
$userId = $connect['user_id'];
|
||||
$payment = new ErpPaymentMethod();
|
||||
$erp_payment_id = $payment->check_specific_payment_method($customer['module'],$userId,$client);
|
||||
$Order_payment_arr = array(
|
||||
'partner_id' =>new xmlrpcval($erp_customer['erp_customer_id'],"int"),
|
||||
'reference' =>new xmlrpcval($customer['reference'],"string"),
|
||||
'amount' =>new xmlrpcval($customer['total_paid_tax_incl'],"double"),
|
||||
'invoice_id' =>new xmlrpcval($order_details['erp_invoice_id'],"int"),
|
||||
'journal_id' =>new xmlrpcval($erp_payment_id,"int"),
|
||||
'order_id' =>new xmlrpcval($order_details['erp_order_id'],"int"),
|
||||
|
||||
);
|
||||
$context = array(
|
||||
'prestashop' => new xmlrpcval('prestashop', "string")
|
||||
);
|
||||
|
||||
$order_payment = new xmlrpcmsg('execute');
|
||||
$order_payment->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpDatabase"), "string"));
|
||||
$order_payment->addParam(new xmlrpcval($userId, "int"));
|
||||
$order_payment->addParam(new xmlrpcval(Configuration::getGlobalValue("ErpPassword"), "string"));
|
||||
$order_payment->addParam(new xmlrpcval("force.done", "string"));
|
||||
$order_payment->addParam(new xmlrpcval("order_paid", "string"));
|
||||
$order_payment->addParam(new xmlrpcval($Order_payment_arr, "struct"));
|
||||
$order_payment->addParam(new xmlrpcval($context, "struct"));
|
||||
$order_pay_resp = $client->send($order_payment);
|
||||
if ($order_pay_resp->faultCode())
|
||||
$log->logMessage(__FILE__,__LINE__, $order_pay_resp->raw_data, 'CRITICAL');
|
||||
else
|
||||
$log->logMessage(__FILE__,__LINE__, 'Order is Set to Paid.', 'Info');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
49
modules/prestaerp/rest_api_files/AttributeMerge.php
Normal file
49
modules/prestaerp/rest_api_files/AttributeMerge.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/*
|
||||
* 2012-2013 PrestaShop-OpenERP Bridge
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* This file is a part of PrestaShop-OpenERP Bridge.
|
||||
* Do not edit or add to this file.
|
||||
* If you wish to customize PrestaShop-OpenERP Bridge for your
|
||||
* needs please refer to http://www.webkul.com for more information.
|
||||
*
|
||||
* @author Webkul Software Pvt. Ltd. <vinayrks@webkul.com>
|
||||
*/
|
||||
class AttributeMergeCore extends ObjectModel
|
||||
{
|
||||
public $erp_attribute_id;
|
||||
public $prestashop_attribute_id;
|
||||
public $created_by ;
|
||||
public $translate_state ;
|
||||
public $color ;
|
||||
public $is_synch ;
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'erp_attributes_merge',
|
||||
'primary' => 'id',
|
||||
'fields' => array(
|
||||
'erp_attribute_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'prestashop_attribute_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'translate_state' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'color' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'created_by' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'is_synch' => array('type' => self::TYPE_BOOL),
|
||||
),
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'objectMethods' => array(
|
||||
'add' => 'addWs',
|
||||
),);
|
||||
|
||||
public function addWs($autodate = true, $null_values = false){
|
||||
$this->color='DarkOrange';
|
||||
$this->is_synch=1;
|
||||
$this->translate_state='to_translate';
|
||||
return $this->add($autodate, $null_values);
|
||||
}
|
||||
|
||||
|
||||
}
|
53
modules/prestaerp/rest_api_files/AttributeValueMerge.php
Normal file
53
modules/prestaerp/rest_api_files/AttributeValueMerge.php
Normal file
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/*
|
||||
* 2012-2013 PrestaShop-OpenERP Bridge
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* This file is a part of PrestaShop-OpenERP Bridge.
|
||||
* Do not edit or add to this file.
|
||||
* If you wish to customize PrestaShop-OpenERP Bridge for your
|
||||
* needs please refer to http://www.webkul.com for more information.
|
||||
*
|
||||
* @author Webkul Software Pvt. Ltd. <vinayrks@webkul.com>
|
||||
*/
|
||||
class AttributeValueMergeCore extends ObjectModel
|
||||
{
|
||||
public $erp_attribute_id;
|
||||
public $erp_attribute_value_id;
|
||||
public $prestashop_attribute_id;
|
||||
public $prestashop_attribute_value_id;
|
||||
public $translate_state ;
|
||||
public $color;
|
||||
public $created_by ;
|
||||
public $is_synch ;
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'erp_attribute_values_merge',
|
||||
'primary' => 'id',
|
||||
'fields' => array(
|
||||
'erp_attribute_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'erp_attribute_value_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'prestashop_attribute_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'prestashop_attribute_value_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'created_by' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'translate_state' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'color' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'is_synch' => array('type' => self::TYPE_BOOL),
|
||||
),
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'objectMethods' => array(
|
||||
'add' => 'addWs',
|
||||
),);
|
||||
|
||||
public function addWs($autodate = true, $null_values = false){
|
||||
$this->color='DarkOrange';
|
||||
$this->is_synch=1;
|
||||
$this->translate_state='to_translate';
|
||||
return $this->add($autodate, $null_values);
|
||||
}
|
||||
|
||||
|
||||
}
|
49
modules/prestaerp/rest_api_files/CategoryMerge.php
Normal file
49
modules/prestaerp/rest_api_files/CategoryMerge.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/*
|
||||
* 2012-2013 PrestaShop-OpenERP Bridge
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* This file is a part of PrestaShop-OpenERP Bridge.
|
||||
* Do not edit or add to this file.
|
||||
* If you wish to customize PrestaShop-OpenERP Bridge for your
|
||||
* needs please refer to http://www.webkul.com for more information.
|
||||
*
|
||||
* @author Webkul Software Pvt. Ltd. <vinayrks@webkul.com>
|
||||
*/
|
||||
class CategoryMergeCore extends ObjectModel
|
||||
{
|
||||
public $erp_category_id;
|
||||
public $prestashop_category_id;
|
||||
public $created_by ;
|
||||
public $is_synch ;
|
||||
public $translate_state ;
|
||||
public $color;
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'erp_category_merge',
|
||||
'primary' => 'id',
|
||||
'fields' => array(
|
||||
'erp_category_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'prestashop_category_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'created_by' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'translate_state' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'color' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'is_synch' => array('type' => self::TYPE_BOOL),
|
||||
),
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'objectMethods' => array(
|
||||
'add' => 'addWs',
|
||||
),);
|
||||
|
||||
public function addWs($autodate = true, $null_values = false){
|
||||
$this->color='DarkOrange';
|
||||
$this->is_synch=1;
|
||||
$this->translate_state='to_translate';
|
||||
return $this->add($autodate, $null_values);
|
||||
}
|
||||
|
||||
|
||||
}
|
47
modules/prestaerp/rest_api_files/ProductMerge.php
Normal file
47
modules/prestaerp/rest_api_files/ProductMerge.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/*
|
||||
* 2012-2013 PrestaShop-OpenERP Bridge
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* This file is a part of PrestaShop-OpenERP Bridge.
|
||||
* Do not edit or add to this file.
|
||||
* If you wish to customize PrestaShop-OpenERP Bridge for your
|
||||
* needs please refer to http://www.webkul.com for more information.
|
||||
*
|
||||
* @author Webkul Software Pvt. Ltd. <vinayrks@webkul.com>
|
||||
*/
|
||||
class ProductMergeCore extends ObjectModel
|
||||
{
|
||||
public $erp_product_id;
|
||||
public $erp_template_id;
|
||||
public $prestashop_product_id;
|
||||
public $prestashop_product_attribute_id;
|
||||
public $created_by ;
|
||||
public $is_synch ;
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'erp_product_merge',
|
||||
'primary' => 'id',
|
||||
'fields' => array(
|
||||
'erp_product_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'erp_template_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'prestashop_product_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'prestashop_product_attribute_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'created_by' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'is_synch' => array('type' => self::TYPE_BOOL),
|
||||
),
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'objectMethods' => array(
|
||||
'add' => 'addWs',
|
||||
),);
|
||||
|
||||
public function addWs($autodate = true, $null_values = false){
|
||||
$this->is_synch=1;
|
||||
return $this->add($autodate, $null_values);
|
||||
}
|
||||
|
||||
|
||||
}
|
50
modules/prestaerp/rest_api_files/ProductTemplateMerge.php
Normal file
50
modules/prestaerp/rest_api_files/ProductTemplateMerge.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/*
|
||||
* 2012-2013 PrestaShop-OpenERP Bridge
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* This file is a part of PrestaShop-OpenERP Bridge.
|
||||
* Do not edit or add to this file.
|
||||
* If you wish to customize PrestaShop-OpenERP Bridge for your
|
||||
* needs please refer to http://www.webkul.com for more information.
|
||||
*
|
||||
* @author Webkul Software Pvt. Ltd. <vinayrks@webkul.com>
|
||||
*/
|
||||
class ProductTemplateMergeCore extends ObjectModel
|
||||
{
|
||||
public $presta_product_id;
|
||||
public $erp_template_id;
|
||||
public $translate_state;
|
||||
public $color;
|
||||
public $created_by ;
|
||||
public $is_synch;
|
||||
|
||||
public static $definition = array(
|
||||
'table' => 'erp_product_template_merge',
|
||||
'primary' => 'id',
|
||||
'fields' => array(
|
||||
'erp_template_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'presta_product_id' => array('type' => self::TYPE_INT, 'required' => true),
|
||||
'created_by' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'translate_state' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'color' => array('type' => self::TYPE_STRING, 'required' => false, 'size' => 64),
|
||||
'is_synch' => array('type' => self::TYPE_BOOL),
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'objectMethods' => array(
|
||||
'add' => 'addWs',
|
||||
),);
|
||||
|
||||
public function addWs($autodate = true, $null_values = false){
|
||||
$this->color='DarkOrange';
|
||||
$this->is_synch=1;
|
||||
$this->translate_state='to_translate';
|
||||
return $this->add($autodate, $null_values);
|
||||
}
|
||||
|
||||
|
||||
}
|
36
modules/prestaerp/rest_api_files/WebserviceRequest.php
Normal file
36
modules/prestaerp/rest_api_files/WebserviceRequest.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2012 PrestaShop
|
||||
* NOTICE OF LICENSE
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
* DISCLAIMER
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
* @author Webkul Sogtware Pvt. Ltd <www.webkul.com>
|
||||
* @copyright 2009-2015 Webkul Software Pvt. Ltd.
|
||||
* @version Release: $Revision: 14011 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
class WebserviceRequest extends WebserviceRequestCore
|
||||
{
|
||||
public static function getResources()
|
||||
{
|
||||
$resources=parent::getResources();
|
||||
$resources['erp_product_merges'] = array('description' => 'Created by Webkul', 'class' => 'ProductMerge');
|
||||
$resources['erp_product_template_merges'] = array('description' => 'Created by Webkul', 'class' => 'ProductTemplateMerge');
|
||||
$resources['erp_category_merges'] = array('description' => 'Created by Webkul', 'class' => 'CategoryMerge');
|
||||
$resources['erp_attributes_merges'] = array('description' => 'Created by Webkul', 'class' => 'AttributeMerge');
|
||||
$resources['erp_attribute_values_merges'] = array('description' => 'Created by Webkul', 'class' => 'AttributeValueMerge');
|
||||
ksort($resources);
|
||||
return $resources;
|
||||
}
|
||||
}
|
35
modules/prestaerp/rest_api_files/index.php
Normal file
35
modules/prestaerp/rest_api_files/index.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
19
modules/prestaerp/rest_api_files/remove/AttributeMerge.php
Normal file
19
modules/prestaerp/rest_api_files/remove/AttributeMerge.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/*
|
||||
* 2012-2013 PrestaShop-OpenERP Bridge
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* This file is a part of PrestaShop-OpenERP Bridge.
|
||||
* Do not edit or add to this file.
|
||||
* If you wish to customize PrestaShop-OpenERP Bridge for your
|
||||
* needs please refer to http://www.webkul.com for more information.
|
||||
*
|
||||
* @author Webkul Software Pvt. Ltd. <vinayrks@webkul.com>
|
||||
*/
|
||||
class AttributeMergeCore extends ObjectModel
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/*
|
||||
* 2012-2013 PrestaShop-OpenERP Bridge
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* This file is a part of PrestaShop-OpenERP Bridge.
|
||||
* Do not edit or add to this file.
|
||||
* If you wish to customize PrestaShop-OpenERP Bridge for your
|
||||
* needs please refer to http://www.webkul.com for more information.
|
||||
*
|
||||
* @author Webkul Software Pvt. Ltd. <vinayrks@webkul.com>
|
||||
*/
|
||||
class AttributeValueMergeCore extends ObjectModel
|
||||
{
|
||||
|
||||
|
||||
}
|
17
modules/prestaerp/rest_api_files/remove/CategoryMerge.php
Normal file
17
modules/prestaerp/rest_api_files/remove/CategoryMerge.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
/*
|
||||
* 2012-2013 PrestaShop-OpenERP Bridge
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* This file is a part of PrestaShop-OpenERP Bridge.
|
||||
* Do not edit or add to this file.
|
||||
* If you wish to customize PrestaShop-OpenERP Bridge for your
|
||||
* needs please refer to http://www.webkul.com for more information.
|
||||
*
|
||||
* @author Webkul Software Pvt. Ltd. <vinayrks@webkul.com>
|
||||
*/
|
||||
class CategoryMergeCore extends ObjectModel
|
||||
{
|
||||
|
||||
}
|
17
modules/prestaerp/rest_api_files/remove/ProductMerge.php
Normal file
17
modules/prestaerp/rest_api_files/remove/ProductMerge.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
/*
|
||||
* 2012-2013 PrestaShop-OpenERP Bridge
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* This file is a part of PrestaShop-OpenERP Bridge.
|
||||
* Do not edit or add to this file.
|
||||
* If you wish to customize PrestaShop-OpenERP Bridge for your
|
||||
* needs please refer to http://www.webkul.com for more information.
|
||||
*
|
||||
* @author Webkul Software Pvt. Ltd. <vinayrks@webkul.com>
|
||||
*/
|
||||
class ProductMergeCore extends ObjectModel
|
||||
{
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/*
|
||||
* 2012-2013 PrestaShop-OpenERP Bridge
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* This file is a part of PrestaShop-OpenERP Bridge.
|
||||
* Do not edit or add to this file.
|
||||
* If you wish to customize PrestaShop-OpenERP Bridge for your
|
||||
* needs please refer to http://www.webkul.com for more information.
|
||||
*
|
||||
* @author Webkul Software Pvt. Ltd. <vinayrks@webkul.com>
|
||||
*/
|
||||
class ProductTemplateMergeCore extends ObjectModel
|
||||
{
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
/*
|
||||
* 2012-2013 PrestaShop-OpenERP Bridge
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* This file is a part of PrestaShop-OpenERP Bridge.
|
||||
* Do not edit or add to this file.
|
||||
* If you wish to customize PrestaShop-OpenERP Bridge for your
|
||||
* needs please refer to http://www.webkul.com for more information.
|
||||
*
|
||||
* @author Webkul Software Pvt. Ltd. <vinayrks@webkul.com>
|
||||
*/
|
||||
class WebserviceRequest extends WebserviceRequestCore
|
||||
{
|
||||
|
||||
}
|
35
modules/prestaerp/rest_api_files/remove/index.php
Normal file
35
modules/prestaerp/rest_api_files/remove/index.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2015 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2015 PrestaShop SA
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
|
||||
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
|
||||
header("Location: ../");
|
||||
exit;
|
183
modules/prestaerp/translations/de.php
Normal file
183
modules/prestaerp/translations/de.php
Normal file
@ -0,0 +1,183 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{prestaerp}default-bootstrap>prestaerp_3d11db2669e7f56ec5c47a30698b3e91'] = 'POB : Prestashop-Odoo Brücke';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>prestaerp_fcc618ac26b718aaa2a35fd3761f10ba'] = 'Dieses Modul bietet die Möglichkeit, um Ihre Daten des PrestaShop zu ODOO zu exportieren. Außerdem bietet eine Echtzeit -Synchronisation von Bestellung (en) von Prestashop zu OpenERP.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>prestaerp_c343d2df948d1cf17084624038a361a7'] = 'Sind Sie sicher, dass Sie es deinstallieren möchte?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>prestaerp_db46b511a7a8fa74caec896d8333c424'] = 'Um dieses Modul zu deinstallieren, müssen Sie zuerst \'.$Name.\' deinstallieren.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>prestaerp_86bf572fd844641963ec8e9595b81faf'] = 'Für weitere Informationen, kontaktierten Sie bitte unseren Support Team.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproductattributevalue_0aa6504896c75c34326b5342d39a9412'] = 'Fehler beim Schaffung der Mapping am ende des Odoo.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproductcategory_bae99a475835b620f6dab6a59ab2387b'] = 'Ungültiger Benutzername oder Passwort. Checken Sie bitte die Odoo Konfiguration.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_ec1bb45d10ca217309ca6b743cb00646'] = 'Ist synchronisiert';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_fda39cc5b167799979a72d7ebb73171e'] = 'synchronisiert';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_915e9c50f4433e42e359330af8fb3b49'] = 'Synchronisation erfordern';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Löschen ausgewählt';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = 'Löschen ausgewählte Artikeln?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_8c13b9dbc674245aa11f7da568083df1'] = 'Alle Träger erfolgreich zu Odoo exportiert.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_bae99a475835b620f6dab6a59ab2387b'] = 'Ungültiger Benutzername oder Passwort. Checken Sie bitte die Odoo Konfiguration.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_b18b960c57a784907dc1cd97ba8a8065'] = 'Synchronisieren';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_e4a805a557b3acde1d061fc734cd06b3'] = 'Manuell Mapping';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_e189e7e5ae60c62560eef928026bbb94'] = 'Manuell Träger Mapping';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_cd2bb67007ac92935f6ff403da8df099'] = 'Odoo Träger';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_d6ef639e5eaca40e4ffe1078d95c8b47'] = 'Prestashop Träger';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Speichern';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_771cc383a9c817503858d8ca6aaa6f2d'] = 'Diese Odoo Id ist bereits gemappt worden.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_0c59b29a35e191dd4797b8b358d9c9fa'] = 'Diese Prestashop Id ist bereits gemappt worden.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_ec1bb45d10ca217309ca6b743cb00646'] = 'Ist synchronisiert';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_fda39cc5b167799979a72d7ebb73171e'] = 'synchronisiert';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_915e9c50f4433e42e359330af8fb3b49'] = 'Synchronisation erfordern';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Löschen ausgewählt';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = 'Löschen ausgewählte Artikeln?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_83cee40aa24864caaafee904176b370e'] = 'Alle Währung(en) erfolgreich zu Odoo exportiert.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_bae99a475835b620f6dab6a59ab2387b'] = 'Ungültiger Benutzername oder Passwort. Checken Sie bitte die Odoo Konfiguration.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_b18b960c57a784907dc1cd97ba8a8065'] = 'Synchronisieren';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_e4a805a557b3acde1d061fc734cd06b3'] = 'Manuell Mapping';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_547926334d5bbf3fafae2677ecdb2e97'] = 'Manuell Währung Mapping';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_f5eae7f7528daecae4e62381dcee9c2f'] = 'Odoo Preisliste';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_bba78dc31a6e217dec99308d7a687324'] = 'Prestashop Währung';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Speichern';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_231d34382546e4be2a16354e3793cbd4'] = 'Verbindungsfehler : Ungültige Odoo Information.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_771cc383a9c817503858d8ca6aaa6f2d'] = 'Diese Odoo Id ist bereits gemappt worden.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_88482c192eff98a3185c6d5693ee48af'] = 'Diese Prestashop Id ist bereits gemappt worden.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomeraddresscontroller_ec1bb45d10ca217309ca6b743cb00646'] = 'Ist synchronisiert';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomeraddresscontroller_fda39cc5b167799979a72d7ebb73171e'] = 'synchronisiert';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomeraddresscontroller_915e9c50f4433e42e359330af8fb3b49'] = 'Synchronisation erfordern';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomeraddresscontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Löschen ausgewählt';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomeraddresscontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = 'Löschen ausgewählte Artikeln?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomeraddresscontroller_9ca6afb0eb67f0aeef180ad29ba1597c'] = 'Alle Adresse(n) erfolgreich zu Odoo exportiert.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomeraddresscontroller_bae99a475835b620f6dab6a59ab2387b'] = 'Ungültiger Benutzername oder Passwort. Checken Sie bitte die Odoo Konfiguration.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomeraddresscontroller_9e3066eb48d893be304c9dab49564a9a'] = 'Keine neue Adresse gefunden.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomeraddresscontroller_b18b960c57a784907dc1cd97ba8a8065'] = 'Synchronisieren';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomercontroller_ec1bb45d10ca217309ca6b743cb00646'] = 'Ist synchronisiert';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomercontroller_fda39cc5b167799979a72d7ebb73171e'] = 'synchronisiert';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomercontroller_915e9c50f4433e42e359330af8fb3b49'] = 'Synchronisation erfordern';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomercontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Löschen ausgewählt';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomercontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = 'Löschen ausgewählte Artikeln?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomercontroller_45ff11ed79440db1ece98b3af04fea1e'] = 'Alle Kunden erfolgreich zu Odoo exportiert.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomercontroller_bae99a475835b620f6dab6a59ab2387b'] = 'Ungültiger Benutzername oder Passwort. Checken Sie bitte die Odoo Konfiguration.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomercontroller_cea047fcbc6c13571e0cbb05eed9e15a'] = 'Keine neue Kunden gefunden.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomercontroller_b18b960c57a784907dc1cd97ba8a8065'] = 'Synchronisieren';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerporderscontroller_117ffd15dcb1ba3d63cf1b02eeceb870'] = 'Übersetzung Zustand';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerporderscontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Löschen ausgewählt';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerporderscontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = 'Löschen ausgewählte Artikeln?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerppaymentmethodcontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Löschen ausgewählt';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerppaymentmethodcontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = 'Löschen ausgewählte Artikeln?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerppaymentmethodcontroller_e62867a90b59a34366c24a09b8894179'] = 'Alle Methode(n) erfolgreich zu Odoo exportiert.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerppaymentmethodcontroller_bae99a475835b620f6dab6a59ab2387b'] = 'Ungültiger Benutzername oder Passwort. Checken Sie bitte die Odoo Konfiguration.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerppaymentmethodcontroller_b18b960c57a784907dc1cd97ba8a8065'] = 'Synchronisieren';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerppaymentmethodcontroller_e4a805a557b3acde1d061fc734cd06b3'] = 'Manuell Mapping';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerppaymentmethodcontroller_2d4a89dec8cd0fd2bede03b617d4c0b6'] = 'Manuell Zahlung Mapping';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerppaymentmethodcontroller_915e72cfd432be31fc2f0d6572690a9b'] = 'Odoo Zahlung';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerppaymentmethodcontroller_5d222cd82ca6aafd66c885a6b0d67faa'] = 'Prestashop Zahlungsart';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerppaymentmethodcontroller_38fb7d24e0d60a048f540ecb18e13376'] = 'Speichern';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerppaymentmethodcontroller_88482c192eff98a3185c6d5693ee48af'] = 'Diese Prestashop Id ist bereits gemappt worden.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_915e9c50f4433e42e359330af8fb3b49'] = 'Synchronisation erfordern';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_fda39cc5b167799979a72d7ebb73171e'] = 'Synchronisiert';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_28a26d713d6ae6162e6e200627669273'] = 'Übersetzung Zustand';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Löschen ausgewählt';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = 'Löschen ausgewählte Artikeln?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_8ce7dfd7d39071050d5241ab25ab9e16'] = 'Alle Attribut(e) erfolgreich zu Odoo exportiert.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_bae99a475835b620f6dab6a59ab2387b'] = 'Ungültiger Benutzername oder Passwort. Checken Sie bitte die Odoo Konfiguration.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_5d95a921dfcaae3451c8b633fce244d6'] = 'Keine neue Attribut(e) gefunden.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_b18b960c57a784907dc1cd97ba8a8065'] = 'Synchronisieren';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_e4a805a557b3acde1d061fc734cd06b3'] = 'Manuell Mapping';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_658acc04ccf22e2576c602cb8314bcc0'] = 'Manuell Produkt Attribut Mapping';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_1347395408628c8d8d3190a996f3262f'] = 'Odoo Produkt Attribut';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_27bbdfb1f9e55029f819e026c1e9f417'] = 'Prestashop Produkt Attribut';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Speichern';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_771cc383a9c817503858d8ca6aaa6f2d'] = 'Diese Odoo Id ist bereits gemappt worden.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_0c59b29a35e191dd4797b8b358d9c9fa'] = 'Diese Prestashop Id ist bereits gemappt worden.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_915e9c50f4433e42e359330af8fb3b49'] = 'Synchronisation erfordern';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_fda39cc5b167799979a72d7ebb73171e'] = 'Synchronisiert';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_117ffd15dcb1ba3d63cf1b02eeceb870'] = 'Übersetzung Zustand';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Löschen ausgewählt';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = 'Löschen ausgewählte Artikeln?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_b5f75ea650c2f8a610accd44e534eda4'] = 'Alle Attribut Wert(e) erfolgreich zu Odoo exportiert.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_bae99a475835b620f6dab6a59ab2387b'] = 'Ungültiger Benutzername oder Passwort. Checken Sie bitte die Odoo Konfiguration.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_5d95a921dfcaae3451c8b633fce244d6'] = 'Keine neue Attribut(e) gefunden.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_b18b960c57a784907dc1cd97ba8a8065'] = 'Synchronisieren';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_e4a805a557b3acde1d061fc734cd06b3'] = 'Manuell Mapping';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_f8007eb92cda7b0c5cab4ce132ed0b9f'] = 'Manuell Produkt Attribut Wert Mapping';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_440981a2a410c208926dfb10255d9786'] = 'Odoo Produkt Attribut Wert';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_b33af1be09a4b7746fa5593084e20ec8'] = 'Prestashop Produkt Attribut Wert';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Speichern';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_771cc383a9c817503858d8ca6aaa6f2d'] = 'Diese Odoo Id ist bereits gemappt worden.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_88482c192eff98a3185c6d5693ee48af'] = 'Diese Prestashop Id ist bereits gemappt worden.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_ec1bb45d10ca217309ca6b743cb00646'] = 'Ist synchronisiert';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_fda39cc5b167799979a72d7ebb73171e'] = 'Synchronisiert';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_915e9c50f4433e42e359330af8fb3b49'] = 'Synchronisation erfordern';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_117ffd15dcb1ba3d63cf1b02eeceb870'] = 'Übersetzung Zustand';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Löschen ausgewählt';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = 'Löschen ausgewählte Artikeln?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_f11090754934eff77df17a03a25f8392'] = 'Alle Kategorie(n) erfolgreich zu Odoo exportiert.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_bae99a475835b620f6dab6a59ab2387b'] = 'Ungültiger Benutzername oder Passwort. Checken Sie bitte die Odoo Konfiguration.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_2fefb58e83148868153c955c85a5243d'] = 'Keine neue Kategorie(n) gefunden.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_b18b960c57a784907dc1cd97ba8a8065'] = 'Synchronisieren';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_e4a805a557b3acde1d061fc734cd06b3'] = 'Manuell Mapping';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_076e4a338846ceac5f36db32f169edec'] = 'Manuell Kategorie Mapping';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_bc2b26b2bb7fbdd1e164a01d108680c5'] = 'Odoo Kategorie';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_af8bb40d1bab24a8d6d805fe349e4dbe'] = 'Prestashop Kategorie';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_38fb7d24e0d60a048f540ecb18e13376'] = 'Speichern';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_771cc383a9c817503858d8ca6aaa6f2d'] = 'Diese Odoo Id ist bereits gemappt worden.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_88482c192eff98a3185c6d5693ee48af'] = 'Diese Prestashop Id ist bereits gemappt worden.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcombinationcontroller_ec1bb45d10ca217309ca6b743cb00646'] = 'Ist synchronisiert';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcombinationcontroller_fda39cc5b167799979a72d7ebb73171e'] = 'Synchronisiert';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcombinationcontroller_915e9c50f4433e42e359330af8fb3b49'] = 'Synchronisation erfordern';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcombinationcontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Löschen ausgewählt';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcombinationcontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = 'Löschen ausgewählte Artikeln?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcombinationcontroller_143735b034e3503efeb1eb66525140eb'] = 'Alle Kombinationsprodukt(e) erfolgreich zu Odoo exportiert.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcombinationcontroller_bae99a475835b620f6dab6a59ab2387b'] = 'Ungültiger Benutzername oder Passwort. Checken Sie bitte die Odoo Konfiguration.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcombinationcontroller_27dff488ae1ce51e5334036f8281edb7'] = 'Kein neues Produkt(e) gefunden.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcombinationcontroller_b18b960c57a784907dc1cd97ba8a8065'] = 'Synchronisieren';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproducttemplatecontroller_915e9c50f4433e42e359330af8fb3b49'] = 'Synchronisation erfordern';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproducttemplatecontroller_fda39cc5b167799979a72d7ebb73171e'] = 'Synchronisiert';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproducttemplatecontroller_28a26d713d6ae6162e6e200627669273'] = 'Übersetzung Zustand';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproducttemplatecontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Löschen ausgewählt';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproducttemplatecontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = 'Löschen ausgewählte Artikeln?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproducttemplatecontroller_79e22aa3bf895011b4c8568862144586'] = 'Alle Mustervorlage erfolgreich zu Odoo exportiert.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproducttemplatecontroller_bae99a475835b620f6dab6a59ab2387b'] = 'Ungültiger Benutzername oder Passwort. Checken Sie bitte die Odoo Konfiguration.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproducttemplatecontroller_2821e25028cd399959799b529d9335f7'] = 'Kein neues Produkt(e) gefunden!!!';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproducttemplatecontroller_b18b960c57a784907dc1cd97ba8a8065'] = 'Synchronisieren';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_ec1bb45d10ca217309ca6b743cb00646'] = 'Ist synchronisiert';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_fda39cc5b167799979a72d7ebb73171e'] = 'Synchronisiert';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_915e9c50f4433e42e359330af8fb3b49'] = 'Synchronisation erfordern';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Löschen ausgewählt';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = 'Löschen ausgewählte Artikeln?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_d240ab51e7b804caf5fe89b9c058ebb4'] = 'Alle Steuer(n) erfolgreich zu Odoo exportiert.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_bae99a475835b620f6dab6a59ab2387b'] = 'Ungültiger Benutzername oder Passwort. Checken Sie bitte die Odoo Konfiguration.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_b18b960c57a784907dc1cd97ba8a8065'] = 'Synchronisieren';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_e4a805a557b3acde1d061fc734cd06b3'] = 'Manuell Mapping';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_5d3bdfd9d9e10accf78f2d9d684cd305'] = 'Manuell Steuer Mapping';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_3ba4000440870c0024bcfb05e4692bd8'] = 'Odoo Steuer';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_b7bf9283d0274ab707942e01dfd3a476'] = 'Prestashop Steuer';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_38fb7d24e0d60a048f540ecb18e13376'] = 'Speichern';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_771cc383a9c817503858d8ca6aaa6f2d'] = 'Diese Odoo Id ist bereits gemappt worden.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_88482c192eff98a3185c6d5693ee48af'] = 'Diese Prestashop Id ist bereits gemappt worden.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_fb945c3effb2c1adb70947b0ebcb839b'] = 'POB Anschluss Konfiguration';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_02a3a357710cc2a5dfdfb74ed012fb59'] = 'Url';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_60aaf44d4b562252c04db7f98497e9aa'] = 'Anschluss';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_e307db07b3975fef922a80d07455ee5e'] = 'Datenbank';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_92f1b1481fa6ff46c4a3caae78354dab'] = 'Benutzername';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_f7de1b71605a10ef04416effa4c6e09e'] = 'Speichern und Bleib';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_2f1c63c591d1f3265557dc715d002fff'] = 'Odoo Bestellung Einstellungen';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_d40b00ec7fd3305c08e5b06bac03b290'] = 'Automatisch Aktualisierung Status von Prestashop bis Odoo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_a0d3d5d09d753cc58ee419b3c8fe8e3c'] = 'Wenn aktiviert, wenn Status einer Bestellung in Prestashop aktualisiert ist, wird der Status der Bestellung automatisch in ODOO aktualisiert werden.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_2e2c22f4840f8e927c63b8dece0dbd3e'] = 'Bestätigt die Bestellungen automatisch ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_a2c154a2b5149593451f142247cb3b74'] = 'Wenn aktiviert, dann werden die Aufträge von Prestashop Ende automatisch in bestätigen Zustand in ODOO erstellt werden.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_88f55a783617ae39fc5de012d5162445'] = 'Generiert die Rechnung automatisch';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_c948e3bc66514590ac01808947f15464'] = 'Wenn aktiviert, wird die Rechnung automatisch in ODOO für exportierte Aufträge erstellt werden.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Speichern';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_c642a0c1e8859a0d1be0182df068a5ff'] = 'Zurück zu Optionen.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_05c328ae23ae972fb6fcc229072ea3bf'] = ' Mapping-Tabellen während Modul Update fallen';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_254375d4272f492c63434103a63c7af9'] = 'Aktivieren Sie diese Wenn Sie alle Mapping-Tabellen während Modul Update fallen wollen.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_3fbddd58f80c4f4429699e25eb1b4a26'] = 'optionale Zusatzeinrichtung';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_61747e9af90b5c43f767ec9b548c1ad0'] = 'Multi-Sprache';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_e566b54bbcff818983eb1f0af0e96819'] = 'Bevor Sie diese Funktion aktivieren, stellen Sie sicher, dass Sie die Multi-Sprache Erweiterung am Ende des ODOO auch installiert haben.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_7179984712757c7b1838b5a953ebf6b7'] = 'Multi-Shop';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_1a5c1722082ba6bfb4ae88dffd026157'] = 'Bevor Sie diese Funktion aktivieren, stellen Sie sicher, dass Sie die Multi-Shop Erweiterung am Ende des ODOO auch installiert haben.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_ad5eee2a754532345a324df29fe55ed3'] = 'Zurücksetzen Sie POB Mapping Tabellen';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_0a069988e4c36384c84bf4e06fa76193'] = 'Diese Option werden alle Daten in POB Tabellen löschen, stellen Sie bitte sicher, dass Sie das wirklich tun wollen, oder Sie können die Hilfe von POB Support-Team anfordern.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_2876a67c0f58f1a7fc65a3bc73e44908'] = 'Zurücksetzen Sie jetzt alle POB Tabellen';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_dc647eb65e6711e155375218212b3964'] = 'Passwort';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_9c8468c7ad6923cdaa53498b5b08fa71'] = 'Datei in allen POB Tabellen ist erfolgreich gelöscht.';
|
425
modules/prestaerp/translations/es.php
Normal file
425
modules/prestaerp/translations/es.php
Normal file
@ -0,0 +1,425 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpaddress_ec1bb45d10ca217309ca6b743cb00646'] = 'han sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpaddress_fda39cc5b167799979a72d7ebb73171e'] = 'Sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpaddress_915e9c50f4433e42e359330af8fb3b49'] = 'Necesita sincronización ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpaddress_b18b960c57a784907dc1cd97ba8a8065'] = 'Sincronizar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpaddress_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar seleccionados';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpaddress_e25f0ecd41211b01c83e5fec41df4fe7'] = '¿Eliminar artículos seleccionados?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpaddress_3c55331d8d905cc497af150932e2490b'] = 'Todos dirección exportado a OpenERP con exíto.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpaddress_54bdd0c53444ccf2561889f7a2763e9b'] = 'Coneción Error: Inválido Open ERP Información.\'.$error_mensaje));} o {$usarioId= $resp->value()->scalarval(); if ($userId logMessage(__FILE__,__LINE__,\'Invalido Nombre de usuario o Constreña . Porfavor checkar configuración del OpenERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpaddress_5d7d4335ad3845af5081a9cb6ba0f757'] = 'Invaĺido Nombre de usuario o constreña . Porfavor checkar configuración de OpenERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpaddress_9e3066eb48d893be304c9dab49564a9a'] = 'No encontra Dirreción ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpaddress_dce61db5bb831cbe292b9b1832563f31'] = 'Error en Prestashop`s Id : \' . $check[\'ids\'])); $this->errors[] = Tools::displayError($this->l(\'Error Message(s):\' . $check[\'error_message\'])); $log->logMessage(__FILE__,__LINE__,\'Error in Prestashop`s Id : \' . $check[\'ids\'].\'/n\'.\'Error Message(s):\' . $check[\'error_message\'],\"CRITICAL\"); } } } } else return parent::postProcess(); } public function renderList() { $this->addRowAction(\'delete';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpattributes_915e9c50f4433e42e359330af8fb3b49'] = 'Necesita Sincronización';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpattributes_fda39cc5b167799979a72d7ebb73171e'] = 'Sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpattributes_117ffd15dcb1ba3d63cf1b02eeceb870'] = 'Estado de tradución';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpattributes_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminado Seleccionado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpattributes_e25f0ecd41211b01c83e5fec41df4fe7'] = '¿Eliminado artículos seleccionado?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpattributes_b18b960c57a784907dc1cd97ba8a8065'] = 'sincronizar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpattributes_1376b2aa3179e28dbea478f07ebdf994'] = 'Sincronización.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpattributes_5d7d4335ad3845af5081a9cb6ba0f757'] = 'Inválido Nombre de Usuario o Constreña .Porfavor checkar Configuración del OpenERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpattributes_5d95a921dfcaae3451c8b633fce244d6'] = 'No ha encontrado nuevo Attributo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpattributes_658acc04ccf22e2576c602cb8314bcc0'] = 'La Cartografía de los Productos Manual';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpattributes_56e2352c01acf3b79e5e0c18b63a41e8'] = 'Attributo de OpenERP Producto ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpattributes_6252c0f2c2ed83b7b06dfca86d4650bb'] = 'Inválido Carácteristicos:';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpattributes_27bbdfb1f9e55029f819e026c1e9f417'] = 'Atributo de Prestashop Producto';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpattributes_38fb7d24e0d60a048f540ecb18e13376'] = 'Guardar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpattributes_f2571f624166851fccae7bb7a4c7f911'] = 'Este ID de OpenERP han sido Cartografía .';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpattributes_88482c192eff98a3185c6d5693ee48af'] = 'ID de Prestashop ha sido Cartografía .';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpattributevalues_915e9c50f4433e42e359330af8fb3b49'] = 'Necesario Sincronización.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpattributevalues_fda39cc5b167799979a72d7ebb73171e'] = 'Ha Sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpattributevalues_117ffd15dcb1ba3d63cf1b02eeceb870'] = 'Estado de Traducción';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpattributevalues_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar Selecionado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpattributevalues_e25f0ecd41211b01c83e5fec41df4fe7'] = '¿Eliminar Artículos Selecionado?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpattributevalues_b18b960c57a784907dc1cd97ba8a8065'] = 'Sincronización.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpattributevalues_bdd2aa2b36788325a0f559e47cc83a88'] = 'Sincronización.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpattributevalues_5d7d4335ad3845af5081a9cb6ba0f757'] = ' Inválido Nombre de Usuario o Constreña .Porfavor checkar Configuración del OpenERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpattributevalues_5d95a921dfcaae3451c8b633fce244d6'] = 'No ha encontrado nuevo Attributo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcarrier_b18b960c57a784907dc1cd97ba8a8065'] = 'sincronizar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcarrier_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar selecionado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcarrier_e25f0ecd41211b01c83e5fec41df4fe7'] = '¿Eliminar Artículos selecionados?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcarrier_f1ea80049789b3d1a9eca85e843945df'] = 'Todos Transporistas han exportado a OpenERP con exíto.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcarrier_010b2fca7da3ef4798fde001002ff608'] = 'Coneción Error: Inválido Open ERP Información.\' . $error_message)); } else { $userId = $resp->value()->scalarval(); if ($userId logMessage(__FILE__,__LINE__,\'Invalido Nombre de usuario o Constreña . Porfavor checkar configuración del OpenERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcarrier_5d7d4335ad3845af5081a9cb6ba0f757'] = 'Invaĺido Nombre de usuario o constreña . Porfavor checkar configuración de OpenERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcarrier_8956eb0ad561e5c3e57ab7d15bc38eff'] = 'No encontra nueva Transporistas';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcarrier_5e31d797eb5d8a2e75d32858f7fd5dcb'] = 'Error en Prestashop`s Id : \' . $check[\'ids\'])); $this->errors[] = Tools::displayError($this->l(\'Error Message(s):\' . $check[\'error_message\'])); $log->logMessage(__FILE__,__LINE__,\'Error in Prestashop`s Id : \' . $check[\'ids\'].\'/n\'.\'Error Message(s):\' . $check[\'error_message\'],\"CRITICAL\"); } } } } else return parent::postProcess(); } public function renderList() { $this->addRowAction(\'delete';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_9c8468c7ad6923cdaa53498b5b08fa71'] = 'Data en todos tabla estan eliminado con exíto';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_02a3a357710cc2a5dfdfb74ed012fb59'] = 'Url';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_60aaf44d4b562252c04db7f98497e9aa'] = 'Port';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_825689fed4e8cd85dbc5beedf98feec0'] = 'Nombre de la baso de datas';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_987dce661afca3372aa3e05702fb1d06'] = 'Nombre de Usuario';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_dc647eb65e6711e155375218212b3964'] = 'Constreña';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_f3ea2226bfd87c77f77fd5e33575b71d'] = ' Estado de conexión';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_9ea67be453eaccf020697b4654fc021a'] = 'Guardar y parmenecer';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_733154f7eeee6cd45162e766e22e47ee'] = 'Pedido';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_910d8f35c00e781057cff23488d074b1'] = 'Opción de Backup ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_535a029358b47108cea91d488365c013'] = 'Alguno carácteristicas puede seré activar o disactivar en orden a improvar su performancía';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_6f67cbf3c68d622f9dff01daca791a31'] = 'Durante actualización dejar tablas ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_93cba07454f06a4a960172bbd6e2a435'] = 'si';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_bafd7322c6e97d25b6299b5d6fe8920b'] = 'No';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_c8e819f359193d60c775c780e8025cbb'] = 'si activar ,actulaizado guión dejará su tablas anterior a restaurar datos de copia de seguridad.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_010a6cb0eccdea35662ad711d443f2ec'] = 'Opcional Característica';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_afcacf51d7a1fc26e9a9923677618310'] = 'Alguno Características puede activar o disactivar en orden a mejorar su rendimiento ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_81e67afc367932e52698898b101c735d'] = 'Perro necesita a cambiar en Ambos extremos(Prestashop yOpenERP también)';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_61747e9af90b5c43f767ec9b548c1ad0'] = 'Multi- lengua';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_82beca143dc2eae472bc8006d282ed66'] = 'Antes activado multi lengua , debe que seguro a:';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_f737ce6716e72c9a72ea875929506779'] = 'ser cierto que POB : Extensiones del Multi-lengua esta instalado en este servidor';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_0730d967110a77aea28862f1fa43e968'] = ' ser cierto que POB : Extensiones del Multi-lengua esta instalado en este servidor';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_7179984712757c7b1838b5a953ebf6b7'] = 'Multi - Tienda';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_a72306170dc077d31932d53ffc1ea186'] = 'Antes a activar Multi-tienda , debes que seguro a :';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_8f625b3e2112f8a6be82c916e9f2a89f'] = ' ser cierto que POB : Extensiones del Multi-Tienda esta instalado en este servidor';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_4415245e4babad0dc8713410c3b1ff0f'] = ' ser cierto que POB : Extensiones del Multi-Tiendaesta instalado en este servidor';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_87f051a2e9546541fd697dd6772df258'] = 'Ajustes de OpenERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_84ffb425c6d1c97171b578a82138d00d'] = 'Automatica actualizar de estado dese Prestashop a OpenERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_69ec72a4a8657dc82556f08b598fc823'] = 'Si Activar , cuando estado de un pedido es actualizado en Prestashop , entonces estado del pedido ser[a automaticamente actualizar en Open ERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_2e2c22f4840f8e927c63b8dece0dbd3e'] = 'Automaticamente confirm los Pedidos';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_4b3f3f0d54d6b8d02b277b7e5c9e8237'] = ' si activado, pedidos creado desde Prestashop serán actualizado automaticamente en confirmar estado en Open ERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_88f55a783617ae39fc5de012d5162445'] = 'Automaticamente generar factura';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_9724361ff1e7745dbeacbc1a1d0d04b4'] = 'si Activar , factura será generar automaticamente en OpenERP paara pedidos creado en Prestashop';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_d10c9febf51320128d43ab140296b853'] = 'Restablecer POB tablas';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpconfig_2876a67c0f58f1a7fc65a3bc73e44908'] = 'Ahora Restablecer todos POB tablas ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcurrency_ec1bb45d10ca217309ca6b743cb00646'] = 'Ha sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcurrency_fda39cc5b167799979a72d7ebb73171e'] = 'Ha sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcurrency_915e9c50f4433e42e359330af8fb3b49'] = ' Necesida sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcurrency_b18b960c57a784907dc1cd97ba8a8065'] = 'Sincronizar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcurrency_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar seleccionados';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcurrency_e25f0ecd41211b01c83e5fec41df4fe7'] = 'Eliminar artículos seleccionados';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcurrency_188dd82e898133f263171953ae1d5944'] = 'Todos monedas han exportado a OpenERP con exíto';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcurrency_c88163f3c6947e8840259080753cc419'] = 'Error de conexión: InválidoInformación de OpenERP .\' . $error_message,\"ERROR\")); } else { $userId = $resp->value()->scalarval(); if ($userId logMessage(__FILE__,__LINE__,\'Inválido Nombre de Usuario o Constreña . Porfavor checkar configuración de Open ERP .';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcurrency_5d7d4335ad3845af5081a9cb6ba0f757'] = 'Inválido Nombew Usuario o constreña . Porfavor checkar configuración de Open ERP.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcurrency_bdd5d75d84572e2b92373b8da7c6bf18'] = 'No encontra nueva monedas .';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcurrency_6820c62a1f8c0d11144deae972cb6fd2'] = 'Error en Prestashop`s Id : \' . $check[\'ids\'])); // $this->errors[] = Tools::displayError($this->l(\'Error Message(s):\' . $check[\'error_message\'])); $log->logMessage(__FILE__,__LINE__,\'Error in Prestashop`s Id : \' . $check[\'ids\'].\'/n\'.\'Error Message(s):\' . $check[\'error_message\'],\"CRITICAL\"); } } } } else return parent::postProcess(); } public function processBulkDelete() { $result = true; if (is_array($this->boxes) && !empty($this->boxes)) { //Deleting data foreach ($this->boxes as $id_data) { $return = Db::getInstance()->delete(\'erp_currency_merge';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcurrency_2b8b60a94dadf9244e4020d204b1017a'] = ' Error de conexión: : Invalid OpenERP Information.\' . $error_message)); } else { $userId = $resp->value()->scalarval(); $key = array(); $i = 0; $msg_ser = new xmlrpcmsg(\'execute';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcurrency_6f2c1cf84d23601d65f382d0fdca5a13'] = 'Error : \' . $error_message)); } else { $val = $resp0->value()->me[\'array\']; $key1 = array( new xmlrpcval(\'id';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcurrency_c22e5d3907e3693a20412d4383750ca9'] = 'Error : \' . $error_message)); } else { $value_array = $resp1->value()->scalarval(); $count = count($value_array); for ($x = 0; $x < $count; $x++) { $arr[$x][\'id\'] = $value_array[$x]->me[\'struct\'][\'id\']->me[\'int\']; $arr[$x][\'name\'] = $value_array[$x]->me[\'struct\'][\'name\']->me[\'string\']; } $this->fields_form = array( \'legend\' => array( \'title\' => $this->l(\'Manual Currency Mapping';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcurrency_aad634f50b000a75ca019a5a87cc698f'] = 'OpenERP Lista de Precio';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcurrency_6252c0f2c2ed83b7b06dfca86d4650bb'] = 'Inválido caracteristicas';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcurrency_bba78dc31a6e217dec99308d7a687324'] = 'Moneda De Prestashop';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcurrency_38fb7d24e0d60a048f540ecb18e13376'] = 'Guardar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcurrency_b2488c0e0badfb6e2aa2322255005e2e'] = 'Error en Conexión: inválido información de Open ERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcurrency_f2571f624166851fccae7bb7a4c7f911'] = 'Este Id de OpenERP ha sido establecer';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcurrency_88482c192eff98a3185c6d5693ee48af'] = 'Este Id de Prestashop ha sido establecer';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcustomer_ec1bb45d10ca217309ca6b743cb00646'] = 'ha Sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcustomer_fda39cc5b167799979a72d7ebb73171e'] = 'Ha Sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcustomer_915e9c50f4433e42e359330af8fb3b49'] = 'Necesita sincronización';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcustomer_b18b960c57a784907dc1cd97ba8a8065'] = 'Sincronizar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcustomer_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar seleccionados';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcustomer_e25f0ecd41211b01c83e5fec41df4fe7'] = 'Eliminar artículos seleccionados';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcustomer_21a73f939eb2cabe9621cff5e7dc2b3e'] = 'Todos cliente han exportado a OpenERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcustomer_54bdd0c53444ccf2561889f7a2763e9b'] = ' Error de conexión : Invalid OpenERP Information.\' . $error_message)); } else { $userId = $resp->value()->scalarval(); if ($userId logMessage(__FILE__,__LINE__,\'Invalid UserName or Password. Please check the OpenERP configuration.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcustomer_5d7d4335ad3845af5081a9cb6ba0f757'] = 'Inválido nombre de usuario o constreña . Porfavor checkar configuración de OpenERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcustomer_cea047fcbc6c13571e0cbb05eed9e15a'] = 'No encontra cliente';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpcustomer_2a3ccacbf3a63edd8121afffefb1b276'] = 'Error en Prestashop`s Id : \' . $check[\'ids\'])); $this->errors[] = Tools::displayError($this->l(\'Error Message(s):\' . $check[\'error_message\'])); $log->logMessage(__FILE__,__LINE__,\'Error in Prestashop`s Id : \' . $check[\'ids\'].\'/n\'.\'Error Message(s):\' . $check[\'error_message\'],\'CRITICAL';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erporder_ac4d496022ecbb1fcd84d1ce572bb2e2'] = 'Exportar los pedidos';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erporder_d3b206d196cd6be3a2764c1fb90b200f'] = 'Elimanr seleccionados';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erporder_e25f0ecd41211b01c83e5fec41df4fe7'] = '¿Elimanr artículos seleccionados?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erporder_b30e69b8fbdce78dcc3230a831d4d0fd'] = 'Todos seleccionados pedidos han exportado a OpenERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erporder_22b2b22f5af259d505e720f5853808ee'] = 'Real tiempo opción de exportar los pedidos';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erporder_3709c400f1952f61d532dea1eb190ff2'] = 'Si, activar , la guión será exportar los pedidos a OpenERP en Real Tiempo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erporder_508248bc40094869ba9a5c6b40251db6'] = 'Que significa cuando alguna hacer un pedido en Frontend de Prestashop';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erporder_efba64526666575166fef225c2d04f78'] = 'Automaticamente exportar en OpenERP con estado actual.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erporder_b55afee3a3deb460e6149b486d8d9a49'] = 'Estado Actual';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erporder_7e5ddb4ca31c30e778f4d9c57b9577b1'] = 'Cambiar Estado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproductcategory_ec1bb45d10ca217309ca6b743cb00646'] = 'Es ha Sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproductcategory_fda39cc5b167799979a72d7ebb73171e'] = 'ha Sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproductcategory_915e9c50f4433e42e359330af8fb3b49'] = ' necesitas incronización';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproductcategory_117ffd15dcb1ba3d63cf1b02eeceb870'] = 'Estado de Tradución';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproductcategory_b18b960c57a784907dc1cd97ba8a8065'] = 'Sincronizar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproductcategory_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar seleccionados';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproductcategory_e25f0ecd41211b01c83e5fec41df4fe7'] = 'Eliminar artículos seleccionados';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproductcategory_3d13be984c0cc7b83c5432ccb9f6082e'] = 'Todos seleccionados pedidos han exportado a OpenERP.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproductcategory_5d7d4335ad3845af5081a9cb6ba0f757'] = 'Inválido nombre de usuario o constreña . Porfavor checkar configuración de OpenERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproductcategory_2fefb58e83148868153c955c85a5243d'] = 'No encontra nueva categoría';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproductcategory_076e4a338846ceac5f36db32f169edec'] = ' Establecer Manual categoría ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproductcategory_8fa8e252e09cc772f6f16d297fd7ab57'] = 'Categoría De OpenERP ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproductcategory_6252c0f2c2ed83b7b06dfca86d4650bb'] = 'Inválido carácters:';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproductcategory_af8bb40d1bab24a8d6d805fe349e4dbe'] = 'Categoría De Prestashop ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproductcategory_38fb7d24e0d60a048f540ecb18e13376'] = 'Guardar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproductcategory_f2571f624166851fccae7bb7a4c7f911'] = 'Este ID de OpenERP han sido establecido.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproductcategory_88482c192eff98a3185c6d5693ee48af'] = 'Este ID de OpenERP han sido establecido.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducts_ec1bb45d10ca217309ca6b743cb00646'] = 'Es ha Sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducts_fda39cc5b167799979a72d7ebb73171e'] = 'ha Sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducts_915e9c50f4433e42e359330af8fb3b49'] = ' necesitas incronización';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducts_117ffd15dcb1ba3d63cf1b02eeceb870'] = 'Estado de Tradución';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducts_b18b960c57a784907dc1cd97ba8a8065'] = 'Sincronizar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducts_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar seleccionados';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducts_e25f0ecd41211b01c83e5fec41df4fe7'] = '¿Eliminar artículos seleccionados?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducts_e226ef4898b41c3c7f78879fce56eddd'] = 'Todos seleccionados pedidos han exportado a OpenERP.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducts_54bdd0c53444ccf2561889f7a2763e9b'] = ' Error en conexión: Invalid OpenERP Information.\' . $error_message)); } else { $userId = $resp->value()->scalarval(); if ($userId logMessage(__FILE__,__LINE__,\'Invalid UserName or Password. Please check the OpenERP configuration.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducts_5d7d4335ad3845af5081a9cb6ba0f757'] = 'Inválido nombre de usuario o constreña . Porfavor checkar configuración de OpenERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducts_27dff488ae1ce51e5334036f8281edb7'] = 'No encontra nueva categoría';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducts_5662d77b31b1409100cb7c345829f970'] = 'Error en Prestashop`s Id : \' . $check[\'ids\'])); $this->errors[] = Tools::displayError($this->l(\'Error Message(s):\' . $check[\'error_message\'])); $log->logMessage(__FILE__,__LINE__,\'Error in Prestashop`s Id : \' . $check[\'ids\'].\'/n\'.\'Error Message(s): \' . $check[\'error_message\'],\"CRITICAL\"); } } } } else return parent::postProcess(); } // public function initContent() // { // // $this->initToolbar(); // $this->content .= $this->renderList(); // $this->content .= $this->renderForm(); // $this->context->smarty->assign(array( // \'content\' => $this->content, // \'url_post\' => self::$currentIndex . \'&token=\' . $this->token // )); // } public function initToolbar() { parent::initToolbar(); unset($this->toolbar_btn[\'new\']); } public function processBulkDelete() { $result = true; if (is_array($this->boxes) && !empty($this->boxes)) { //Deleting data foreach ($this->boxes as $id_data) { $return = Db::getInstance()->delete(\'erp_product_merge';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducttemplate_915e9c50f4433e42e359330af8fb3b49'] = 'Necesita sincronización';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducttemplate_fda39cc5b167799979a72d7ebb73171e'] = 'Ha sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducttemplate_117ffd15dcb1ba3d63cf1b02eeceb870'] = 'Etsado de Traducción';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducttemplate_b18b960c57a784907dc1cd97ba8a8065'] = 'Sincronizar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducttemplate_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar seleccionados';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducttemplate_e25f0ecd41211b01c83e5fec41df4fe7'] = '¿Eliminar artículos seleccionados?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducttemplate_940f9eaefbcaf3a3b41305e45a063c94'] = 'Todos Productos han exportado ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducttemplate_c8a84cb0bbe7a46bee9aac8c20dcfa95'] = 'Id de ERP Producto';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducttemplate_fd5ef81a3cbf73705652e5191c402d46'] = 'ID de Prestashop combinaci[on';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducttemplate_5d7d4335ad3845af5081a9cb6ba0f757'] = 'Inválido nombre de usuario o constreña . Porfavor chekar configuración de OpenERP ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducttemplate_238d26aaf59a4fd6b661f2474728d06c'] = 'No nuevo producto encontrado en su prestashop';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducttemplate_0c2022c398637a2b20e43f650cefee56'] = 'Manual restablecer del Producto';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducttemplate_281c8860e21d6651d428ee489ccc0676'] = ' Producto ID de OpenERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducttemplate_72f50ea80f6fa2b4654cee05dcf9bac4'] = 'OpenERP ID de producto plantilla';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducttemplate_7b815640f3e40e6009127039070c3fb3'] = 'ID de Prestashop Producto';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducttemplate_cdcb654cf0bda9a76dc7695ceb218220'] = 'Atributo ID de Prestashop Producto';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducttemplate_38fb7d24e0d60a048f540ecb18e13376'] = 'Guardar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproducttemplate_f2571f624166851fccae7bb7a4c7f911'] = 'Este OpenERP ID ha sido establecer';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erptax_ec1bb45d10ca217309ca6b743cb00646'] = 'Ha sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erptax_fda39cc5b167799979a72d7ebb73171e'] = 'Ha sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erptax_915e9c50f4433e42e359330af8fb3b49'] = 'Necesita sincronización';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erptax_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar seleccionados';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erptax_e25f0ecd41211b01c83e5fec41df4fe7'] = '¿Eliminar artículos seleccionados?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erptax_b18b960c57a784907dc1cd97ba8a8065'] = 'Sincronizar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erptax_de9ced9bf5e9829de4a93ad8c9d7a170'] = 'Añadir Nuevo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erptax_56c20bfa014cdf8b33f56b87b913e70e'] = 'Todos Impuestos han exportado a OpenERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erptax_2b8b60a94dadf9244e4020d204b1017a'] = ' Error de conexión: Invalid OpenERP Information.\' . $error_message)); } else { $userId = $resp->value()->scalarval(); $key = array(); $i = 0; $msg_ser = new xmlrpcmsg(\'execute';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erptax_6f2c1cf84d23601d65f382d0fdca5a13'] = 'Error : \' . $error_message)); } else { $val = $resp0->value()->me[\'array\']; $key1 = array( new xmlrpcval(\'id';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erptax_626df29c98204ce372259772650791e8'] = 'Error : \' . $error_message)); } else { $value_array = $resp1->value()->scalarval(); $count = count($value_array); for ($x = 0; $x < $count; $x++) { $arr[$x][\'id\'] = $value_array[$x]->me[\'struct\'][\'id\']->me[\'int\']; $arr[$x][\'name\'] = $value_array[$x]->me[\'struct\'][\'name\']->me[\'string\'] . \' (\' . ($value_array[$x]->me[\'struct\'][\'amount\']->me[\'double\']*100) . \'%)\'; } $this->fields_form = array( \'legend\' => array( \'title\' => $this->l(\'Manual Tax Mapping';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erptax_21749e9d9c4185e33cda1de5f27c3d98'] = 'OpenERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erptax_6252c0f2c2ed83b7b06dfca86d4650bb'] = ' Caracteres Inválido';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erptax_b7bf9283d0274ab707942e01dfd3a476'] = 'Impuesto de Prestashop';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erptax_38fb7d24e0d60a048f540ecb18e13376'] = 'Guardar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erptax_010b2fca7da3ef4798fde001002ff608'] = 'Error de conexión : Invalid OpenERP Information.\' . $error_message)); } else { $userId = $resp->value()->scalarval(); if ($userId logMessage(__FILE__,__LINE__,\'Invalid UserName or Password. Please check the OpenERP configuration.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erptax_5d7d4335ad3845af5081a9cb6ba0f757'] = 'Inválido nombre de usuario o constreña . Porfavor chekar configuración de OpenERP ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erptax_3118413814a21dfad6c88dd480509a8f'] = 'No encontra nuevo impuesto';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erptax_106038f32eff4935d31baaaf3cf715a9'] = 'Error en Prestashop`s Id : \' . $check[\'ids\'])); // $this->errors[] = Tools::displayError($this->l(\'Error Message(s):\' . $check[\'error_message\'])); $log->logMessage(__FILE__,__LINE__,\'Error in Prestashop`s Id : \' . $check[\'ids\'].\'/n\'.\'Error Message(s):\' . $check[\'error_message\'],\"CRITICAL\"); } } } } else return parent::postProcess(); } public function processSave() { $erp_tax_id = Tools::getValue(\'erpname ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erptax_f2571f624166851fccae7bb7a4c7f911'] = 'Este ID de OpenERP han sido ya establecer ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erptax_88482c192eff98a3185c6d5693ee48af'] = 'Este ID de Prestashop han sido ya establecer';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>paymentmethods_ec1bb45d10ca217309ca6b743cb00646'] = 'Ha sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>paymentmethods_b18b960c57a784907dc1cd97ba8a8065'] = 'Sincronizar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>paymentmethods_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar seleccionados';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>paymentmethods_e25f0ecd41211b01c83e5fec41df4fe7'] = '¿Eliminar artículos seleccionados?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>paymentmethods_5eb8f66ce6bb8b5aa2bc3b2790136dc7'] = 'Todos Pagos exportado a OpenERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>paymentmethods_5d7d4335ad3845af5081a9cb6ba0f757'] = 'Inválido Nombre de usuario o constreña . Porfavor checkar configuración de OpenERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>paymentmethods_8e341c6777c3916c511681eba959c5aa'] = 'No encontra nueva método de Pago';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>paymentmethods_2d4a89dec8cd0fd2bede03b617d4c0b6'] = 'Establecer Manual Pago';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>paymentmethods_afc89e04de12e2a353b58ac8e594a20e'] = 'OpenERP Pago (método)';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>paymentmethods_6252c0f2c2ed83b7b06dfca86d4650bb'] = 'Caracteres inválidos:';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>paymentmethods_5d222cd82ca6aafd66c885a6b0d67faa'] = 'Prestashop Método de Pago';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>paymentmethods_38fb7d24e0d60a048f540ecb18e13376'] = 'Guardar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>paymentmethods_f2571f624166851fccae7bb7a4c7f911'] = 'Este ID de OpenERP ha sido ya establecer';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>paymentmethods_88482c192eff98a3185c6d5693ee48af'] = 'Este ID de OpenERP ha sido ya establecer';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>prestaerp_3d11db2669e7f56ec5c47a30698b3e91'] = ' POB:Prestashop-Odoo Punte ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>prestaerp_fcc618ac26b718aaa2a35fd3761f10ba'] = 'Este módulo poveer un manera a exportar su data de Prestashop a Odoo.Proveer un real tiempo sincronización del Pedido desde Prestashop a OpenERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>prestaerp_c343d2df948d1cf17084624038a361a7'] = '¿Estas Seguro , Deseas a Desinstalareste ?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>prestaerp_db46b511a7a8fa74caec896d8333c424'] = 'En orden a Desinstalar este módulo , debes a Desinstalar \'.$nombre.\' primero.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>prestaerp_86bf572fd844641963ec8e9595b81faf'] = 'Porfavor contacte con nuestra equipo de soporte para detalles';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproductattributevalue_0aa6504896c75c34326b5342d39a9412'] = 'Eroor rn crear de cartografía en Odoo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>erpproductcategory_bae99a475835b620f6dab6a59ab2387b'] = 'Inválido nombre de usuario y constreña . Porfavor checkar configuración de Odoo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_ec1bb45d10ca217309ca6b743cb00646'] = 'Ha sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_fda39cc5b167799979a72d7ebb73171e'] = 'Ha sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_915e9c50f4433e42e359330af8fb3b49'] = 'Necesita sincronización';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar seleccionados';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = '¿Eliminar artículos seleccionados?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_8c13b9dbc674245aa11f7da568083df1'] = 'Todos Transporistas han exportado a OpenERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_bae99a475835b620f6dab6a59ab2387b'] = 'Inválido Nombre de usuario o constreña . Porfavor checkar configuración de Odoo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_b18b960c57a784907dc1cd97ba8a8065'] = 'sincronizadar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_e4a805a557b3acde1d061fc734cd06b3'] = 'Manual cartografía';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_e189e7e5ae60c62560eef928026bbb94'] = 'Manual cartografía de Transporistas ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_cd2bb67007ac92935f6ff403da8df099'] = 'Odoo Transporistas ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_d6ef639e5eaca40e4ffe1078d95c8b47'] = 'Prestashop Transporistas ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_771cc383a9c817503858d8ca6aaa6f2d'] = 'Este ID de Odoo ha sido ya cartografía.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcarriercontroller_0c59b29a35e191dd4797b8b358d9c9fa'] = 'Este ID de PrestaShop ha sido ya cartografía.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_ec1bb45d10ca217309ca6b743cb00646'] = 'Ha sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_fda39cc5b167799979a72d7ebb73171e'] = 'Ha sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_915e9c50f4433e42e359330af8fb3b49'] = 'Necesita sincronización';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar seleccionados';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = '¿Eliminar artículos seleccionados?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_83cee40aa24864caaafee904176b370e'] = 'Todos Monedas han exportado a OpenERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_bae99a475835b620f6dab6a59ab2387b'] = 'Inválido Nombre de usuario o constreña . Porfavor checkar configuración de Odoo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_b18b960c57a784907dc1cd97ba8a8065'] = 'sincronizadar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_e4a805a557b3acde1d061fc734cd06b3'] = 'Manual cartografía';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_547926334d5bbf3fafae2677ecdb2e97'] = 'Manual cartografía de Moneda';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_f5eae7f7528daecae4e62381dcee9c2f'] = 'Lista de precio Odoo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_bba78dc31a6e217dec99308d7a687324'] = 'Moneda de Prestashop';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_231d34382546e4be2a16354e3793cbd4'] = ' Error de conexión: información Odoo inválida.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_771cc383a9c817503858d8ca6aaa6f2d'] = ' Este ID de Odoo ha sido ya cartografía.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcurrencycontroller_88482c192eff98a3185c6d5693ee48af'] = 'Este ID de PrestaShop ha sido ya cartografía.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomeraddresscontroller_ec1bb45d10ca217309ca6b743cb00646'] = 'Ha sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomeraddresscontroller_fda39cc5b167799979a72d7ebb73171e'] = 'Ha sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomeraddresscontroller_915e9c50f4433e42e359330af8fb3b49'] = 'Necesita sincronización';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomeraddresscontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar seleccionados';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomeraddresscontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = '¿Eliminar artículos seleccionados?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomeraddresscontroller_9ca6afb0eb67f0aeef180ad29ba1597c'] = 'Todos dirección han exportado a OpenERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomeraddresscontroller_bae99a475835b620f6dab6a59ab2387b'] = 'Inválido Nombre de usuario o constreña . Porfavor checkar configuración de Odoo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomeraddresscontroller_9e3066eb48d893be304c9dab49564a9a'] = 'No encontra nueva dirección ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomeraddresscontroller_b18b960c57a784907dc1cd97ba8a8065'] = 'sincronizar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomercontroller_ec1bb45d10ca217309ca6b743cb00646'] = 'Ha sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomercontroller_fda39cc5b167799979a72d7ebb73171e'] = 'Ha sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomercontroller_915e9c50f4433e42e359330af8fb3b49'] = 'Necesita sincronización';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomercontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar seleccionados';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomercontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = '¿Eliminar artículos seleccionados?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomercontroller_45ff11ed79440db1ece98b3af04fea1e'] = 'Todos cliente han exportado a OpenERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomercontroller_bae99a475835b620f6dab6a59ab2387b'] = 'Inválido Nombre de usuario o constreña . Porfavor checkar configuración de Odoo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomercontroller_cea047fcbc6c13571e0cbb05eed9e15a'] = 'No encontra nueva dirección ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpcustomercontroller_b18b960c57a784907dc1cd97ba8a8065'] = 'sincronizar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerporderscontroller_117ffd15dcb1ba3d63cf1b02eeceb870'] = 'Estado de traducción ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerporderscontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar seleccionados';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerporderscontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = '¿Eliminar artículos seleccionados?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerppaymentmethodcontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar seleccionados';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerppaymentmethodcontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = '¿Eliminar artículos seleccionados?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerppaymentmethodcontroller_e62867a90b59a34366c24a09b8894179'] = 'Todos métodos han exportado a OpenERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerppaymentmethodcontroller_bae99a475835b620f6dab6a59ab2387b'] = 'Inválido Nombre de usuario o constreña . Porfavor checkar configuración de Odoo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerppaymentmethodcontroller_b18b960c57a784907dc1cd97ba8a8065'] = 'sincronizar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerppaymentmethodcontroller_e4a805a557b3acde1d061fc734cd06b3'] = 'Manual cartografía';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerppaymentmethodcontroller_2d4a89dec8cd0fd2bede03b617d4c0b6'] = 'Manual cartografía de pago';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerppaymentmethodcontroller_915e72cfd432be31fc2f0d6572690a9b'] = 'Pago de Odoo (método)';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerppaymentmethodcontroller_5d222cd82ca6aafd66c885a6b0d67faa'] = 'Prestashop Método de Pago';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerppaymentmethodcontroller_38fb7d24e0d60a048f540ecb18e13376'] = 'Guardar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerppaymentmethodcontroller_88482c192eff98a3185c6d5693ee48af'] = ' Este ID de Prestashop ha sido ya cartografía.';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_915e9c50f4433e42e359330af8fb3b49'] = ' Necesita sincronización';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_fda39cc5b167799979a72d7ebb73171e'] = 'Ha sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_28a26d713d6ae6162e6e200627669273'] = 'Estado de traducción ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar seleccionados';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = '¿Eliminar artículos seleccionados?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_8ce7dfd7d39071050d5241ab25ab9e16'] = 'Todos Atributos han exportado a Odoo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_bae99a475835b620f6dab6a59ab2387b'] = 'Inválido Nombre de usuario o constreña . Porfavor checkar configuración de Odoo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_5d95a921dfcaae3451c8b633fce244d6'] = 'No encontra nueva dirección ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_b18b960c57a784907dc1cd97ba8a8065'] = 'sincronizar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_e4a805a557b3acde1d061fc734cd06b3'] = 'Manual cartografía';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_658acc04ccf22e2576c602cb8314bcc0'] = 'Manual cartografía de Producto Atributo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_1347395408628c8d8d3190a996f3262f'] = 'Odoo Atributo de Producto';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_27bbdfb1f9e55029f819e026c1e9f417'] = 'Prestashop Producto Atributo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_771cc383a9c817503858d8ca6aaa6f2d'] = 'Este ID de Odoo ha sido ya cartografía';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributecontroller_0c59b29a35e191dd4797b8b358d9c9fa'] = ' Este ID de Prestashop ha sido ya cartografía';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_915e9c50f4433e42e359330af8fb3b49'] = ' Necesita sincronización';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_fda39cc5b167799979a72d7ebb73171e'] = 'Ha sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_117ffd15dcb1ba3d63cf1b02eeceb870'] = 'Estado de traducción ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar seleccionados';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = '¿Eliminar artículos seleccionados?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_b5f75ea650c2f8a610accd44e534eda4'] = 'Todos Valor de Atributos han exportado a Odoo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_bae99a475835b620f6dab6a59ab2387b'] = 'Inválido Nombre de usuario o constreña . Porfavor checkar configuración de Odoo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_5d95a921dfcaae3451c8b633fce244d6'] = 'No encontra nueva atributo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_b18b960c57a784907dc1cd97ba8a8065'] = 'Sincronizar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_e4a805a557b3acde1d061fc734cd06b3'] = ' Manual cartografía';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_f8007eb92cda7b0c5cab4ce132ed0b9f'] = 'Manual cartografía valor de Producto Atributo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_440981a2a410c208926dfb10255d9786'] = 'Odoo Atributo valor de Producto';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_b33af1be09a4b7746fa5593084e20ec8'] = 'Prestashop Producto valor de Atributo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_771cc383a9c817503858d8ca6aaa6f2d'] = 'Este ID de Odoo ha sido ya cartografía';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductattributevaluecontroller_88482c192eff98a3185c6d5693ee48af'] = ' Este ID de Prestashop ha sido ya cartografía';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_ec1bb45d10ca217309ca6b743cb00646'] = 'Ha sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_fda39cc5b167799979a72d7ebb73171e'] = 'Ha sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_915e9c50f4433e42e359330af8fb3b49'] = ' Necesita sincronización';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_117ffd15dcb1ba3d63cf1b02eeceb870'] = 'Estado de traducción ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar seleccionados';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = '¿Eliminar artículos seleccionados?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_f11090754934eff77df17a03a25f8392'] = 'Todos Categoría han exportado a Odoo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_bae99a475835b620f6dab6a59ab2387b'] = 'Inválido Nombre de Usuario y Constreña . Porfavor checkar configuración de Odoo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_2fefb58e83148868153c955c85a5243d'] = 'No encontra nueva Categoría';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_b18b960c57a784907dc1cd97ba8a8065'] = 'Sincronizar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_e4a805a557b3acde1d061fc734cd06b3'] = 'Manual cartografía';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_076e4a338846ceac5f36db32f169edec'] = 'Manual cartografía de Categoría';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_bc2b26b2bb7fbdd1e164a01d108680c5'] = ' Categoría de Odoo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_af8bb40d1bab24a8d6d805fe349e4dbe'] = ' Categoría de Prestashop';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_38fb7d24e0d60a048f540ecb18e13376'] = 'Guardar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_771cc383a9c817503858d8ca6aaa6f2d'] = 'Este ID de Odoo ha sido ya cartografía';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcategorycontroller_88482c192eff98a3185c6d5693ee48af'] = ' Este ID de Prestashop ha sido ya cartografía';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcombinationcontroller_ec1bb45d10ca217309ca6b743cb00646'] = 'Ha sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcombinationcontroller_fda39cc5b167799979a72d7ebb73171e'] = 'Ha sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcombinationcontroller_915e9c50f4433e42e359330af8fb3b49'] = ' Necesita sincronización';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcombinationcontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar seleccionados';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcombinationcontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = '¿Eliminar artículos seleccionados?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcombinationcontroller_143735b034e3503efeb1eb66525140eb'] = 'Todos Cobinación de Producto han exportado a Odoo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcombinationcontroller_bae99a475835b620f6dab6a59ab2387b'] = 'Inválido Nombre de Usuario y Constreña . Porfavor checkar configuración de Odoo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcombinationcontroller_27dff488ae1ce51e5334036f8281edb7'] = 'No encontra nueva Categoría';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproductcombinationcontroller_b18b960c57a784907dc1cd97ba8a8065'] = 'Sincronizar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproducttemplatecontroller_915e9c50f4433e42e359330af8fb3b49'] = ' Necesita sincronización';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproducttemplatecontroller_fda39cc5b167799979a72d7ebb73171e'] = 'Sincronizar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproducttemplatecontroller_28a26d713d6ae6162e6e200627669273'] = 'Estado de traducción ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproducttemplatecontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar seleccionados';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproducttemplatecontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = '¿Eliminar artículos seleccionados?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproducttemplatecontroller_79e22aa3bf895011b4c8568862144586'] = 'Todos Cobinación de Producto han exportado a Odoo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproducttemplatecontroller_bae99a475835b620f6dab6a59ab2387b'] = 'Inválido Nombre de Usuario y Constreña . Porfavor checkar configuración de Odoo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproducttemplatecontroller_2821e25028cd399959799b529d9335f7'] = 'No encontra nueva Producto';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerpproducttemplatecontroller_b18b960c57a784907dc1cd97ba8a8065'] = 'Sincronizar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_ec1bb45d10ca217309ca6b743cb00646'] = 'Ha sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_fda39cc5b167799979a72d7ebb73171e'] = 'Ha sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_915e9c50f4433e42e359330af8fb3b49'] = 'Ha sincronizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar seleccionados';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = '¿Eliminar artículos seleccionados?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_d240ab51e7b804caf5fe89b9c058ebb4'] = 'Todos Impuestos han exportado a Odoo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_bae99a475835b620f6dab6a59ab2387b'] = 'Inválido Nombre de Usuario y Constreña . Porfavor checkar configuración de Odoo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_b18b960c57a784907dc1cd97ba8a8065'] = 'Sincronizar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_e4a805a557b3acde1d061fc734cd06b3'] = 'Manual cartografía';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_5d3bdfd9d9e10accf78f2d9d684cd305'] = 'Manual cartografía de impuesto';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_3ba4000440870c0024bcfb05e4692bd8'] = ' Impuesto de Odoo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_b7bf9283d0274ab707942e01dfd3a476'] = 'Impuesto de Prestashop';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_38fb7d24e0d60a048f540ecb18e13376'] = 'Guardar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_771cc383a9c817503858d8ca6aaa6f2d'] = 'Este ID de Odoo ha sido ya cartografía';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminerptaxescontroller_88482c192eff98a3185c6d5693ee48af'] = ' Este ID de Prestashop ha sido ya cartografía';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedcategorycontroller_b718adec73e04ce3ec720dd11a06a308'] = 'ID';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedcategorycontroller_49ee3087348e8d44e1feda1917443987'] = 'Nombre';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedcategorycontroller_ff6b7aae62a2d56eb37e0719dcba6610'] = 'Exportado a ERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedcategorycontroller_0001316ad0c7eb0f1a8e298fd6e5d070'] = 'Exportado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedcategorycontroller_03991a9e32e5a036dee8b5f37600b153'] = 'No Exportado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedcategorycontroller_9b44c29cc61400ca9056dc91c8931201'] = 'Actualizado a ERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedcategorycontroller_ff0a3b7f3daef040faf89a88fdac01b7'] = 'Actualizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedcategorycontroller_6bd25ff0816abdf2e553db08d4ed642d'] = 'No Actualizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedcategorycontroller_d06e484895a6552bf25c9f097f7d7d35'] = ' sincronizar con OpenERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedcategorycontroller_2dfc1523920689b79e547ad5ced750f3'] = '¿Deseas a sincronizar artículos seleccionados?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedcategorycontroller_4fc2436e8a4b8d17e0c023134ecd07c2'] = 'Todos categoría seleccionados ha sido exportado a Open ERP con exíto';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_b718adec73e04ce3ec720dd11a06a308'] = 'ID';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_c03d53b70feba4ea842510abecd6c45e'] = 'Foto';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_49ee3087348e8d44e1feda1917443987'] = 'Nombre';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_63d5049791d9d79d86e9a108b0a999ca'] = 'Referncía';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_5bafd557247e80174f35c1870e760364'] = 'Pordefecto Tienda';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_3adbdb3ac060038aa0e6e6c138ef9873'] = 'Categoría';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_ad0d28cdd9113d3ce911bc064b137cde'] = 'Precio Basico';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_ed26f5ba7a0f0f6ca8b16c3886eb68ad'] = 'Precio Final';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_694e8d1f2ee056f98ee488bdc4982d73'] = 'Cantidad';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_cbd905efbf863708fe0ccb6a086674b0'] = 'Este es cantidad disponible en su Tienda/grupo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_ec53a8c4f07baed5d8825072c89799be'] = 'Estado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_ff6b7aae62a2d56eb37e0719dcba6610'] = 'Exportado a ERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_0001316ad0c7eb0f1a8e298fd6e5d070'] = 'Exportado ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_03991a9e32e5a036dee8b5f37600b153'] = 'No Exportado ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_9b44c29cc61400ca9056dc91c8931201'] = 'Actualizado a ERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_ff0a3b7f3daef040faf89a88fdac01b7'] = 'Actualizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_6bd25ff0816abdf2e553db08d4ed642d'] = 'No Actualizado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_52f5e0bc3859bc5f5e25130b6c7e8881'] = 'Posición';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_d06e484895a6552bf25c9f097f7d7d35'] = 'sincronizar con OpenERP';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_2dfc1523920689b79e547ad5ced750f3'] = '¡Deseas a sincronizar artículos seleccionados?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_a785fbdde54baa07096b3bbb7ce98fd7'] = 'Todos seleccionados productos ha sido exportar a OpenERP con exíto';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_d3b206d196cd6be3a2764c1fb90b200f'] = 'Eliminar seleccionado';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_e25f0ecd41211b01c83e5fec41df4fe7'] = '¿Eliminar artículos seleccionado?';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_fe9e64fa2d5fe6fe4fd7d4707bd8e2e8'] = 'Attributo - valor Pareja';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_622d67c7a2ea6386a4480e02b12fadd8'] = 'Impacto en Precio';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_3c1a34587e45bd9e9ae2efd9a6ecbb92'] = 'Impacto en peso ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_a7b4930bf2fc5d57eec6b03097200152'] = 'EAN-13';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminexportselectedproductcontroller_fbd99ad01b92dbafc686772a39e3d065'] = 'UPC';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_fb945c3effb2c1adb70947b0ebcb839b'] = 'POB Configuración de la conexión';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_02a3a357710cc2a5dfdfb74ed012fb59'] = 'Url';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_60aaf44d4b562252c04db7f98497e9aa'] = 'Port';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_e307db07b3975fef922a80d07455ee5e'] = 'Base de Datos';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_92f1b1481fa6ff46c4a3caae78354dab'] = 'Nombre de Usaurio';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_f7de1b71605a10ef04416effa4c6e09e'] = 'Guardar y estancia';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_2f1c63c591d1f3265557dc715d002fff'] = 'Ajustes del Odoo Pedido';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_d40b00ec7fd3305c08e5b06bac03b290'] = 'Actualizar estado automaticamente desde prestashop a odoo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_a0d3d5d09d753cc58ee419b3c8fe8e3c'] = 'Si,Activar cuando estado de un Pedido esta actualizado en Prestashop, entonces esl estado del pedido actualizará automáticamente en Odoo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_2e2c22f4840f8e927c63b8dece0dbd3e'] = 'Confirmar pedidos automaticamente';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_a2c154a2b5149593451f142247cb3b74'] = 'Si, Activará los pedidos han creado en Prestashop automáticamente creará en Odoo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_88f55a783617ae39fc5de012d5162445'] = 'Automaticamente Generar un Factura ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_c948e3bc66514590ac01808947f15464'] = 'si Activar , una Factura creará automáticamente en Odoo para exportado pedido';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_c642a0c1e8859a0d1be0182df068a5ff'] = 'Volver a Opción';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_05c328ae23ae972fb6fcc229072ea3bf'] = 'dejar tabla de base data durante Actualizar';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_254375d4272f492c63434103a63c7af9'] = ' Activar este si deseas a dejar todos tablas de cartografía duránte actualizar de módulo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_3fbddd58f80c4f4429699e25eb1b4a26'] = ' Características opcionales';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_61747e9af90b5c43f767ec9b548c1ad0'] = 'Multi-lengua';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_e566b54bbcff818983eb1f0af0e96819'] = 'Antes activar este producto, Estas Seguro que usted tiene que instalar Extensiones de Multi-Lengua en Odoo también';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_7179984712757c7b1838b5a953ebf6b7'] = 'Multi-Tienda';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_1a5c1722082ba6bfb4ae88dffd026157'] = 'Antes activar este producto, Estas Seguro que usted tiene que instalar Extensiones de Multi-Tienda en Odoo también';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_ad5eee2a754532345a324df29fe55ed3'] = 'Restablecer POB Tablas de asignación';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_0a069988e4c36384c84bf4e06fa76193'] = 'Usado de este opción eliminará todos datos en tabla de POB, Porfavor estas seguro que deseas a hacer este, o puedes pedir para ayudar desde equipo';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_2876a67c0f58f1a7fc65a3bc73e44908'] = 'Restablecer POB Tablas de asignación';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_dc647eb65e6711e155375218212b3964'] = 'Constreña ';
|
||||
$_MODULE['<{prestaerp}default-bootstrap>adminwkerpconfigurationcontroller_9c8468c7ad6923cdaa53498b5b08fa71'] = 'Dato en POBtablas han eliminado con exíto';
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user