Hoa central
Public Member Functions | List of all members
Hoa\Core\Protocol\Library Class Reference
Inheritance diagram for Hoa\Core\Protocol\Library:

Public Member Functions

 reach ($queue=null)
 
- Public Member Functions inherited from Hoa\Core\Protocol\Protocol
 __construct ($name=null, $reach=null)
 
 offsetSet ($name, $component)
 
 offsetGet ($name)
 
 offsetExists ($name)
 
 offsetUnset ($name)
 
 resolve ($path, $exists=true, $unfold=false)
 
 reach ($queue=null)
 
 reachId ($id)
 
 setReach ($reach)
 
 getName ()
 
 getIterator ()
 
 __toString ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Hoa\Core\Protocol\Protocol
static clearCache ()
 
- Public Attributes inherited from Hoa\Core\Protocol\Protocol
const NO_RESOLUTION = '/hoa/flatland'
 
- Protected Member Functions inherited from Hoa\Core\Protocol\Protocol
 _resolve ($path, &$accumulator, $id=null)
 
 _resolveChoice ($reach, Array &$accumulator)
 
 getReach ()
 
- Protected Attributes inherited from Hoa\Core\Protocol\Protocol
 $_name = null
 
 $_reach = null
 

Detailed Description

Class .

Library protocol's component.

Definition at line 519 of file Protocol.php.

Member Function Documentation

Hoa\Core\Protocol\Library::reach (   $queue = null)

Queue of the component.

Parameters
string$queueQueue of the component (generally, a filename, with probably a query).
Returns
mixed

Definition at line 528 of file Protocol.php.

529  {
530  if (!WITH_COMPOSER) {
531  return parent::reach($queue);
532  }
533 
534  if (!empty($queue)) {
535  $head = $queue;
536 
537  if (false !== $pos = strpos($queue, '/')) {
538  $head = substr($head, 0, $pos);
539  $queue = DS . substr($queue, $pos + 1);
540  } else {
541  $queue = null;
542  }
543 
544  $out = [];
545 
546  foreach (explode(';', $this->_reach) as $part) {
547  $out[] = "\r" . $part . strtolower($head) . $queue;
548  }
549 
550  $out[] = "\r" . dirname(dirname(dirname(__DIR__))) . $queue;
551 
552  return implode(';', $out);
553  }
554 
555  $out = [];
556 
557  foreach (explode(';', $this->_reach) as $part) {
558  $pos = strrpos(rtrim($part, DS), DS) + 1;
559  $head = substr($part, 0, $pos);
560  $tail = substr($part, $pos);
561  $out[] = $head . strtolower($tail);
562  }
563 
564  $this->_reach = implode(';', $out);
565 
566  return parent::reach($queue);
567  }

The documentation for this class was generated from the following file: