public function id($hash = true)
    {
        if (null === $this->id) {
            $this->id = uniqid();

            if ($hash) {
                $this->id = sha1($this->id);
            }
        }

        return $this->id;
    }
public function id($hash = true)
    {
        if (null === $this->id) {
            $this->id = uniqid();

            if ($hash) {
                $this->id = sha1($this->id);
            }
        }

        return $this->id;
    }
public function id ( $ hash = true ) { if ( null === $ this -> id ) { $ this -> id = uniqid ( ) ; if ( $ hash ) { $ this -> id = sha1 ( $ this -> id ) ; } } return $ this -> id ; }
Gets a unique ID for the request

Generates one on the first call

@param boolean $hash     Whether or not to hash the ID on creation
@return string
Gets a unique ID for the request