method __construct documentation in bbn\Str\Hash

function($hash = '') { if ( !empty($hash) ) { if ( preg_match('#[A-z0-9_/]+#',$hash,$m) === 1 && $m[0] === $hash ) { $this->hash = $hash; while ( strpos($this->hash,'//') ) $this->hash = str_replace('//','/',$this->hash); if ( strpos($this->hash,'/') === 0 ) $this->hash = substr($this->hash,1); if ( substr($this->hash,-1) === '/' ) $this->hash = substr($this->hash,0,-1); } } if ( !isset($this->hash) ) $this->hash = ''; $h = explode(self::$separator,$this->hash); $j = 0; for ( $i = 0; $i < ( \count($h) - 1 ); $i += 2 ) { $this->keys[$j] = $h[$i]; $this->values[$j] = $h[$i+1]; $j++; } }

BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.