403Webshell
Server IP : 208.122.213.31  /  Your IP : 216.73.216.45
Web Server : Apache
System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64
User : WHMCS_MIA_382 ( 1001)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/self/cwd/wp-content/plugins/cornerstone/includes/classes/Tss/Util/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/cwd/wp-content/plugins/cornerstone/includes/classes/Tss/Util/IdEncoder.php
<?php

namespace Themeco\Cornerstone\Tss\Util;

class IdEncoder {
  protected $base = 0;
  protected $prefix = '';
  protected $nextId = 0;
  protected $cache = [];

  protected static $encoderCache = [];

  protected $pathCache = [];

  public function setup( $base, $prefix = '' ) {
    $this->base = $base;
    $this->prefix = $prefix;
    return $this;
  }

  protected function encodeIds( $ids = []) {
    $encoded = array_map(function($id) {
      return is_int($id) ? base_convert($id,10,36) : $id;
    }, $ids);
    return $this->prefix  . implode('-', $encoded);
  }

  public function nextId() {
    return $this->encodeIds([$this->base, $this->nextId++ ]);
  }

  public function idForPath( $path ) {
    if ( ! isset( $this->pathCache[ $path ] ) ) {
      $this->pathCache[ $path ] = $this->nextId();
    }
    return $this->pathCache[ $path ];
  }

  public static function getEncoder( $namespace, $base ) {
    $key = "::" . $base;
    if ( ! isset( self::$encoderCache[ $namespace ] ) ) {
      self::$encoderCache[ $namespace ] = [];
    }
    if ( ! isset( self::$encoderCache[ $namespace ][ $key ] ) ) {
      $instance = new self;
      $instance->setup($base);
      self::$encoderCache[ $namespace ][ $key ] = $instance;
    }
    return self::$encoderCache[ $namespace ][ $key ];
  }

}

Youez - 2016 - github.com/yon3zu
LinuXploit