Lines Matching refs:opts
127 $opts = array(
185 $opts['net'] = $matches[2] . $matches[4] . '/' .$matches[5] ;
189 $opts['vid'] = $matches[2] ;
193 $opts['vlan'] = $matches[2] ;
223 $opts['sid'] = $matches[2] ;
227 $opts['did'] = $matches[2] ;
231 $opts['eid'] = $matches[2] ;
235 $opts['tid'] = $matches[2] ;
239 $opts['lid'] = $matches[2] ;
243 $opts['loc'] = $matches[2] ;
256 $opts['sid'] = $matches[1] ;
260 $opts['d2s'] = $matches[2] ;
264 $opts['f2s'] = $matches[2] ;
268 $opts['l2s'] = $matches[2] ;
272 $opts['r2s'] = $matches[2] ;
276 $opts['s2s'] = $matches[2] ;
280 $opts['v2s'] = $matches[2] ;
284 $opts['n2s'] = $matches[2] ;
288 $opts['t2d'] = $matches[2] ;
292 $opts['l2d'] = $matches[2] ;
296 $opts['e2d'] = $matches[2] ;
300 $opts['l2e'] = $matches[2] ;
304 $opts['d2e'] = $matches[2] ;
308 $opts['22v'] = $matches[2] ;
312 $opts['2id'] = $matches[2] ;
316 $opts['rid'] = $matches[2] ;
320 $opts['vrf'] = $matches[2] ;
324 $opts['fmt'] = $matches[2] ;
329 $opts['cst'][$matches[1]] = $matches[2] ;
336 switch (strtolower($opts['fmt'])) {
348 $opts['fmt'] = '-1' ;
361 $opts['fmt'] = '+1' ;
366 $opts['fmt'] = '0' ;
369 $opts['fmt'] = (int)$opts['fmt'] ;
373 return $opts ;
382 public function render($mode, Doku_Renderer $renderer, $opts) { argument
383 if ($mode == 'xhtml' && is_array($opts) and $opts) {
398 if ($opts['sid']) { // Subnet index
400 array($opts['sid']), array(), $token_file) ;
403 $renderer->doc .= $this->showSub((array)$reply['data'], $opts['fmt']) ;
405 $renderer->doc .= $this->showErr($reply, $opts) ;
407 } elseif ($opts['net']) { // Subnets search by CIDR
409 array('cidr', $opts['net']), $opts['cst'], $token_file) ;
413 $renderer->doc .= $this->showSub((array)$subnet, $opts['fmt']) ;
416 $renderer->doc .= $this->showErr($reply, $opts) ;
418 } elseif ($opts['d2s']) { // Subnets from Device index
420 array('devices', $opts['d2s'], 'subnets'), $opts['cst'], $token_file) ;
424 $renderer->doc .= $this->showSub((array)$subnet, $opts['fmt']) ;
427 $renderer->doc .= $this->showErr($reply, $opts) ;
429 } elseif ($opts['f2s']) { // Subnets from Folder index
431 array($opts['f2s'], 'slave_recursive'), $opts['cst'], $token_file) ;
435 $renderer->doc .= $this->showSub((array)$subnet, $opts['fmt']) ;
438 $renderer->doc .= $this->showErr($reply, $opts) ;
440 } elseif ($opts['l2s']) { // Subnets from Location index
442 array('locations', $opts['l2s'], 'subnets'), $opts['cst'], $token_file) ;
446 $renderer->doc .= $this->showSub((array)$subnet, $opts['fmt']) ;
449 $renderer->doc .= $this->showErr($reply, $opts) ;
451 } elseif ($opts['r2s']) { // Subnets from VRF index
453 array($opts['r2s'], 'subnets'), $opts['cst'], $token_file) ;
457 $renderer->doc .= $this->showSub((array)$subnet, $opts['fmt']) ;
460 $renderer->doc .= $this->showErr($reply, $opts) ;
462 } elseif ($opts['s2s']) { // Subnets from Section index
464 array($opts['s2s'], 'subnets'), $opts['cst'], $token_file) ;
468 $renderer->doc .= $this->showSub((array)$subnet, $opts['fmt']) ;
471 $renderer->doc .= $this->showErr($reply, $opts) ;
473 } elseif ($opts['v2s']) { // Subnets from VLAN index
475 array($opts['v2s'], 'subnets'), $opts['cst'], $token_file) ;
479 $renderer->doc .= $this->showSub((array)$subnet, $opts['fmt']) ;
482 $renderer->doc .= $this->showErr($reply, $opts) ;
484 } elseif (isset($opts['vid'])) { // VLAN index
485 if ($opts['vid']) {
487 array($opts['vid']), array(), $token_file) ;
490 $renderer->doc .= $this->showNet((array)$reply['data'], $opts['fmt']) ;
492 $renderer->doc .= $this->showErr($reply, $opts) ;
496 array(), $opts['cst'], $token_file) ;
500 $renderer->doc .= $this->showNet((array)$vlan, $opts['fmt']) ;
503 $renderer->doc .= $this->showErr($reply, $opts) ;
506 } elseif (isset($opts['vlan'])) { // VLAN number
508 array('search', $opts['vlan']), $opts['cst'], $token_file) ;
512 $renderer->doc .= $this->showNet((array)$vlan, $opts['fmt']) ;
515 $renderer->doc .= $this->showErr($reply, $opts) ;
517 } elseif ($opts['22v']) { // VLAN from level2 domain index
519 array($opts['22v'], 'vlans'), $opts['cst'], $token_file) ;
523 $renderer->doc .= $this->showNet((array)$vlan, $opts['fmt']) ;
526 $renderer->doc .= $this->showErr($reply, $opts) ;
528 } elseif (isset($opts['2id'])) { // level2 domain index
529 if ($opts['2id']) {
531 array($opts['2id']), array(), $token_file) ;
534 $renderer->doc .= $this->showDom((array)$reply['data'], $opts['fmt']) ;
536 $renderer->doc .= $this->showErr($reply, $opts) ;
540 array(), $opts['cst'], $token_file) ;
544 $renderer->doc .= $this->showDom((array)$l2dom, $opts['fmt']) ;
547 $renderer->doc .= $this->showErr($reply, $opts) ;
550 } elseif (isset($opts['rid'])) { // VRF index
551 if ($opts['rid']) {
553 array($opts['rid']), array(), $token_file) ;
556 $renderer->doc .= $this->showFwd((array)$reply['data'], $opts['fmt'], 1) ;
558 $renderer->doc .= $this->showErr($reply, $opts) ;
562 array(), $opts['cst'], $token_file) ;
566 $renderer->doc .= $this->showFwd((array)$vrf, $opts['fmt'], 1) ;
569 $renderer->doc .= $this->showErr($reply, $opts) ;
572 } elseif (isset($opts['vrf'])) { // VRF index
573 if ($opts['vrf']) {
575 array($opts['vrf']), array(), $token_file) ;
578 $renderer->doc .= $this->showFwd((array)$reply['data'], $opts['fmt'], 0) ;
580 $renderer->doc .= $this->showErr($reply, $opts) ;
584 array(), $opts['cst'], $token_file) ;
588 $renderer->doc .= $this->showFwd((array)$vrf, $opts['fmt'], 0) ;
591 $renderer->doc .= $this->showErr($reply, $opts) ;
594 } elseif (isset($opts['eid'])) { // Rack index
595 if ($opts['eid']) {
597 array('racks', $opts['eid']), array(), $token_file) ;
600 $renderer->doc .= $this->showCab((array)$reply['data'], $opts['fmt']) ;
602 $renderer->doc .= $this->showErr($reply, $opts) ;
606 array('racks'), $opts['cst'], $token_file) ;
610 $renderer->doc .= $this->showCab((array)$rack, $opts['fmt']) ;
613 $renderer->doc .= $this->showErr($reply, $opts) ;
616 } elseif (isset($opts['d2e'])) { // Rack from Device index
617 if ($opts['d2e']) {
619 array($opts['d2e']), array(), $token_file) ;
623 $renderer->doc .= $this->showCab($device['rack'], $opts['fmt']) ;
625 $renderer->doc .= $this->showErr($reply, $opts) ;
629 array(), $opts['cst'], $token_file) ;
633 $renderer->doc .= $this->showCab($device['rack'], $opts['fmt']) ;
635 $renderer->doc .= $this->showErr($reply, $opts) ;
638 } elseif (isset($opts['l2e'])) { // Rack from Location index
640 array('locations', $opts['l2e'], 'racks'), $opts['cst'], $token_file) ;
644 $renderer->doc .= $this->showCab((array)$rack, $opts['fmt']) ;
647 $renderer->doc .= $this->showErr($reply, $opts) ;
649 } elseif (isset($opts['lid'])) { // Location index
650 if ($opts['lid']) {
652 array('locations', $opts['lid']), array(), $token_file) ;
655 $renderer->doc .= $this->showLoc((array)$reply['data'], $opts['fmt'], 0) ;
657 $renderer->doc .= $this->showErr($reply, $opts) ;
661 array('locations'), $opts['cst'], $token_file) ;
665 $renderer->doc .= $this->showLoc((array)$location, $opts['fmt'], 0) ;
668 $renderer->doc .= $this->showErr($reply, $opts) ;
671 } elseif (isset($opts['loc'])) { // Location index
672 if ($opts['loc']) {
674 array('locations', $opts['loc']), array(), $token_file) ;
677 $renderer->doc .= $this->showLoc((array)$reply['data'], $opts['fmt'], 1) ;
679 $renderer->doc .= $this->showErr($reply, $opts) ;
683 array('locations'), $opts['cst'], $token_file) ;
687 $renderer->doc .= $this->showLoc((array)$location, $opts['fmt'], 1) ;
690 $renderer->doc .= $this->showErr($reply, $opts) ;
693 } elseif ($opts['did']) { // Device index
694 if ($opts['did']) {
696 array('devices', $opts['did']), array(), $token_file) ;
699 $renderer->doc .= $this->showDev((array)$reply['data'], $opts['fmt']) ;
701 $renderer->doc .= $this->showErr($reply, $opts) ;
705 array('devices'), $opts['cst'], $token_file) ;
709 $renderer->doc .= $this->showDev((array)$device, $opts['fmt']) ;
712 $renderer->doc .= $this->showErr($reply, $opts) ;
715 } elseif ($opts['l2d']) { // Devices from Location index
717 array('locations', $opts['l2d'], 'devices'), array(), $token_file) ;
721 $renderer->doc .= $this->showDev((array)$device, $opts['fmt']) ;
724 $renderer->doc .= $this->showErr($reply, $opts) ;
726 } elseif ($opts['e2d']) { // Devices from Rack index
728 array('racks', $opts['e2d'], 'devices'), $opts['cst'], $token_file) ;
732 $renderer->doc .= $this->showDev((array)$device, $opts['fmt']) ;
735 $renderer->doc .= $this->showErr($reply, $opts) ;
737 } elseif (isset($opts['tid'])) { // Tag index
738 if ($opts['tid']) {
740 array('tags', $opts['tid']), array(), $token_file) ;
743 $renderer->doc .= $this->showTag((array)$reply['data'], $opts['fmt']) ;
745 $renderer->doc .= $this->showErr($reply, $opts) ;
749 array('tags'), $opts['cst'], $token_file) ;
753 $renderer->doc .= $this->showTag((array)$tag, $opts['fmt']) ;
756 $renderer->doc .= $this->showErr($reply, $opts) ;
759 } elseif ($opts['t2d']) { // Devices from their Type index
761 array('device_types', $opts['t2d'], 'devices'), array(), $token_file) ;
765 array('devicetypes', $opts['t2d'], 'devices'), array(), $token_file) ;
770 $renderer->doc .= $this->showDev((array)$device, $opts['fmt']) ;