public function process() /*: mixed*/
    {
        if(!isset($this->settings["directives"]))
            return $this->value;
        $directives = $this->settings["directives"];
        $isDirectiveEnabled = function(string $param) use($directives): bool
        {
            return (isset($directives[$param]) && $directives[$param]);
        };

        if($isDirectiveEnabled("index")) {
            $this->with_index = true;
        }

        if($isDirectiveEnabled("unique")) {
            $this->is_unique = true;
        }

        if($isDirectiveEnabled("sha1")) {
            return sha1($this->value);   
        }
        elseif($isDirectiveEnabled("md5")) {
            return md5($this->value);
        }

        return $this->value;
    }
public function process() /*: mixed*/
    {
        if(!isset($this->settings["directives"]))
            return $this->value;
        $directives = $this->settings["directives"];
        $isDirectiveEnabled = function(string $param) use($directives): bool
        {
            return (isset($directives[$param]) && $directives[$param]);
        };

        if($isDirectiveEnabled("index")) {
            $this->with_index = true;
        }

        if($isDirectiveEnabled("unique")) {
            $this->is_unique = true;
        }

        if($isDirectiveEnabled("sha1")) {
            return sha1($this->value);   
        }
        elseif($isDirectiveEnabled("md5")) {
            return md5($this->value);
        }

        return $this->value;
    }
public function process ( ) /*: mixed*/ { if ( ! isset ( $ this -> settings [ "directives" ] ) ) return $ this -> value ; $ directives = $ this -> settings [ "directives" ] ; $ isDirectiveEnabled = function ( string $ param ) use ( $ directives ) : bool { return ( isset ( $ directives [ $ param ] ) && $ directives [ $ param ] ) ; } ; if ( $ isDirectiveEnabled ( "index" ) ) { $ this -> with_index = true ; } if ( $ isDirectiveEnabled ( "unique" ) ) { $ this -> is_unique = true ; } if ( $ isDirectiveEnabled ( "sha1" ) ) { return sha1 ( $ this -> value ) ; } elseif ( $ isDirectiveEnabled ( "md5" ) ) { return md5 ( $ this -> value ) ; } return $ this -> value ; }
Applies directives to the value to return

@return mixed
Applies directives to the value to return