This repository was archived by the owner on Sep 20, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change @@ -269,4 +269,57 @@ public function initializeWith ( $string ) {
269
269
}
270
270
}
271
271
272
+ /**
273
+ * Class \Hoa\StringBuffer\_Protocol.
274
+ *
275
+ * hoa://Library/StringBuffer component.
276
+ *
277
+ * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
278
+ * @copyright Copyright © 2007-2013 Ivan Enderlin.
279
+ * @license New BSD License
280
+ */
281
+
282
+ class _Protocol extends \Hoa \Core \Protocol {
283
+
284
+ /**
285
+ * Component's name.
286
+ *
287
+ * @var \Hoa\Core\Protocol string
288
+ */
289
+ protected $ _name = 'StringBuffer ' ;
290
+
291
+
292
+
293
+ /**
294
+ * ID of the component.
295
+ *
296
+ * @access public
297
+ * @param string $id ID of the component.
298
+ * @return mixed
299
+ */
300
+ public function reachId ( $ id ) {
301
+
302
+ $ stream = resolve (
303
+ 'hoa://Library/Stream#hoa://Library/StringBuffer# ' . $ id
304
+ );
305
+
306
+ if (null === $ stream )
307
+ return null ;
308
+
309
+ $ meta = $ stream ->getStreamMetaData ();
310
+
311
+ return $ meta ['uri ' ];
312
+ }
313
+ }
314
+
315
+ }
316
+ namespace {
317
+
318
+ /**
319
+ * Add the hoa://Library/StringBuffer component. Help to know to real path of a
320
+ * stringbuffer.
321
+ */
322
+ $ protocol = \Hoa \Core::getInstance ()->getProtocol ();
323
+ $ protocol ['Library ' ][] = new \Hoa \StringBuffer \_Protocol ();
324
+
272
325
}
You can’t perform that action at this time.
0 commit comments