public function getIdentity($spec = null, $default = null)
    {
        if ($spec !== null) {
            return isset($this->identity[$spec]) ? $this->identity[$spec] : $default;
        } else {
            return $this->identity;
        }
    }
public function getIdentity($spec = null, $default = null)
    {
        if ($spec !== null) {
            return isset($this->identity[$spec]) ? $this->identity[$spec] : $default;
        } else {
            return $this->identity;
        }
    }
public function getIdentity ( $ spec = null , $ default = null ) { if ( $ spec !== null ) { return isset ( $ this -> identity [ $ spec ] ) ? $ this -> identity [ $ spec ] : $ default ; } else { return $ this -> identity ; } }
Retrieve identity or identity spec

@param string|null $spec
@param mixed       $default
@return \ArrayAccess|null
Retrieve identity or identity spec