protected function getId(array $data)
    {
        $result = null;

        if (isset($data['id'])) {
            $result = $data['id'];
        } elseif (isset($data['name'])) {
            $result = $data['name'];
        } else {
            #$result = sha1($data['action'] . $data['method']);
            $result = sha1(serialize($data));
        }

        return $result;
    }
protected function getId(array $data)
    {
        $result = null;

        if (isset($data['id'])) {
            $result = $data['id'];
        } elseif (isset($data['name'])) {
            $result = $data['name'];
        } else {
            #$result = sha1($data['action'] . $data['method']);
            $result = sha1(serialize($data));
        }

        return $result;
    }
protected function getId ( array $ data ) { $ result = null ; if ( isset ( $ data [ 'id' ] ) ) { $ result = $ data [ 'id' ] ; } elseif ( isset ( $ data [ 'name' ] ) ) { $ result = $ data [ 'name' ] ; } else { #$result = sha1($data['action'] . $data['method']); $ result = sha1 ( serialize ( $ data ) ) ; } return $ result ; }
Returns either existing Id from passed data or calculates a new one based on input.

@param array $data The data used for generating/returning id

@author Benjamin Carl <opensource@clickalicious.de>

@return string The (new) Id
Returns either existing Id from passed data or calculates a new one based on input .