Verzeichnisstruktur phpBB-3.2.0


Veröffentlicht
06.01.2017

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

remote-object.html

Zuletzt modifiziert: 09.10.2024, 12:56 - Dateigröße: 7.02 KiB


001  <!DOCTYPE html>
002  <html class="no-js" id="top">
003  <head>
004      <title>ProxyManager - Remote object</title>
005   
006      <meta name="description" content="A proxyManager write in php" />
007      <meta name="keywords" content="ProxyManager, proxy, manager, ocramius, Marco Pivetta, php, remote object" />
008      <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
009      <link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600' rel='stylesheet' type='text/css'>
010      <link href="css/styles.css" rel="stylesheet" />
011      <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/styles/default.min.css">
012      <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.3/highlight.min.js"></script>
013      <script>hljs.initHighlightingOnLoad();</script>
014      <link rel="shortcut icon" href="favicon.ico">
015  </head>
016  <body>
017   
018  <header class="site-header">
019  <div class="container">
020  <h1><a href="index.html"><img alt="ProxyManager" src="img/block.png" /></a></h1>
021   
022  <nav class="main-nav" role="navigation">
023  <ul>
024      <li><a href="https://github.com/Ocramius/ProxyManager" target="_blank">Github</a>
025      <div class="bcms-clearfix"></div>
026  </li>
027  </ul>
028  </nav>
029  </div>
030  </header>
031  <main role="main">
032  <section class="component-content">
033   
034  <div class="component-demo" id="live-demo">
035      <div class="container">
036              <div class="main-wrapper" style="text-align: right">
037                  <iframe src="http://ghbtns.com/github-btn.html?user=ocramius&amp;repo=ProxyManager&amp;type=fork&amp;count=true&amp;size=large"
038    allowtransparency="true" frameborder="0" scrolling="0" width="310" height="40"></iframe>
039   
040                  <iframe src="http://ghbtns.com/github-btn.html?user=ocramius&amp;repo=ProxyManager&amp;type=watch&amp;count=true&amp;size=large"
041    allowtransparency="true" frameborder="0" scrolling="0" width="200" height="40"></iframe>
042   
043              </div>
044          <div class="bcms-clearfix bcms-clearfix"></div>
045      </div>
046  </div>
047  <div class="component-info">
048  <div class="container">
049  <aside class="sidebar">
050      <nav class="spy-nav">
051          <ul>
052              <li><a href="index.html">Intro</a></li>
053              <li><a href="virtual-proxy.html">Virtual Proxy</a></li>
054              <li><a href="null-object.html">Null Objects</a></li>
055              <li><a href="ghost-object.html">Ghost Objects</a></li>
056              <li><a href="remote-object.html">Remote Object</a></li>
057              <li><a href="contributing.html">Contributing</a></li>
058              <li><a href="credits.html">Credits</a></li>
059              <li><a href="copyright.html">Copyright</a></li>
060          </ul>
061      </nav>
062  <div class="bcms-clearfix bcms-clearfix"></div>
063  <a class="btn btn-action btn-full download-component"
064      href="download.html">Download</a>
065      <div class="bcms-clearfix"></div>
066  </aside>
067   
068  <div class="content">
069      <div class="bcms-clearfix"></div>
070      <h3 class="section-title">Remote Object Proxy</h3>
071   
072      <p>The remote object implementation is a mechanism that enables an local object to control an other object on an other server. Each call method on the local object will do a network call to get information or execute operations on the remote object.</p>
073  <hr />
074   
075      <h3 class="section-title">What is remote object proxy ?</h3>
076   
077      <p>A remote object is based on an interface. The remote interface defines the API that a consumer can call. This interface must be implemented both by the client and the RPC server.</p>
078  <hr />
079   
080      <h3 class="section-title">Adapters</h3>
081   
082      <p>ZendFramework's RPC components (XmlRpc, JsonRpc &amp; Soap) can be used easily with the remote object. You will need to require the one you need via composer, though:</p>
083   
084      <pre>
085          <code class="sh">
086  $ php composer.phar require zendframework/zend-xmlrpc:2.*
087  $ php composer.phar require zendframework/zend-json:2.*
088  $ php composer.phar require zendframework/zend-soap:2.*
089          </code>
090      </pre>
091   
092      <p>ProxyManager comes with 3 adapters:</p>
093   
094      <ul>
095          <li><code>ProxyManager\Factory\RemoteObject\Adapter\XmlRpc</code></li>
096          <li><code>ProxyManager\Factory\RemoteObject\Adapter\JsonRpc</code></li>
097          <li><code>ProxyManager\Factory\RemoteObject\Adapter\Soap</code></li>
098      </ul>
099   
100  <hr />
101   
102      <h3 class="section-title">Usage examples</h3>
103   
104      <p>RPC server side code (<code>xmlrpc.php</code> in your local webroot):</p>
105   
106      <pre>
107          <code class="php">
108  interface FooServiceInterface
109  {
110      public function foo();
111  }
112   
113  class Foo implements FooServiceInterface
114  {
115      /**
116       * Foo function
117       * @return string
118       */
119      public function foo()
120      {
121          return 'bar remote';
122      }
123  }
124   
125  $server = new Zend\XmlRpc\Server();
126  $server->setClass('Foo', 'FooServiceInterface');  // my FooServiceInterface implementation
127  $server->handle();
128          </code>
129      </pre>
130   
131      <p>Client side code (proxy) :</p>
132   
133      <pre>
134          <code class="php">
135  interface FooServiceInterface
136  {
137      public function foo();
138  }
139   
140  $factory = new \ProxyManager\Factory\RemoteObjectFactory(
141      new \ProxyManager\Factory\RemoteObject\Adapter\XmlRpc(
142          new \Zend\XmlRpc\Client('https://localhost/xmlrpc.php')
143      )
144  );
145   
146  $proxy = $factory->createProxy('FooServiceInterface');
147   
148  var_dump($proxy->foo()); // "bar remote"
149          </code>
150      </pre>
151  <hr />
152   
153      <h3 class="section-title">Implementing custom adapters</h3>
154   
155      <p>Your adapters must implement <code>ProxyManager\Factory\RemoteObject\AdapterInterface</code> :</p>
156   
157      <pre>
158          <code class="php">
159  interface AdapterInterface
160  {
161      /**
162       * Call remote object
163       *
164       * @param string $wrappedClass
165       * @param string $method
166       * @param array $params
167       *
168       * @return mixed
169       */
170      public function call($wrappedClass, $method, array $params = array());
171  }
172          </code>
173      </pre>
174   
175      <p>It is very easy to create your own implementation (for RESTful web services, for example). Simply pass your own adapter instance to your factory at construction time</p>
176   
177      <p>Tuning performance for production</p>
178   
179      <p>See <a href="production.html">Tuning ProxyManager for Production.</a></p>
180   
181  </main>
182   
183      <footer class="site-footer" role="contentinfo">
184          <div class="container">
185              <div class="footer-logos">
186                  <ul>
187                      <li><a href="index.html">Intro</a> | </li>
188                      <li><a href="virtual-proxy.html">Virtual Proxy</a> | </li>
189                      <li><a href="null-object.html">Null Objects</a> | </li>
190                      <li><a href="ghost-object.html">Ghost Objects</a> | </li>
191                      <li><a href="remote-object.html">Remote Object</a> | </li>
192                      <li><a href="contributing.html">Contributing</a> | </li>
193                      <li><a href="credits.html">Credits</a> | </li>
194                      <li><a href="copyright.html">Copyright</a></li>
195                  </ul>
196              </div>
197          </div>
198   
199          <div class="bcms-clearfix"></div>
200      </footer>
201      <div class="bcms-clearfix"></div>
202      </body>
203  </html>
204