protected function objectToKey($object)
    {
        $typeName = $object instanceof AppliesToResource ? $object->resourceName() : get_class($object);

        if (!$object instanceof Identifiable) {
            throw new InvalidArgumentException('Cannot generate cache id of unknown class '.get_class($object));
        }

        return $typeName.'_'.$object->getId();
    }
protected function objectToKey($object)
    {
        $typeName = $object instanceof AppliesToResource ? $object->resourceName() : get_class($object);

        if (!$object instanceof Identifiable) {
            throw new InvalidArgumentException('Cannot generate cache id of unknown class '.get_class($object));
        }

        return $typeName.'_'.$object->getId();
    }
protected function objectToKey ( $ object ) { $ typeName = $ object instanceof AppliesToResource ? $ object -> resourceName ( ) : get_class ( $ object ) ; if ( ! $ object instanceof Identifiable ) { throw new InvalidArgumentException ( 'Cannot generate cache id of unknown class ' . get_class ( $ object ) ) ; } return $ typeName . '_' . $ object -> getId ( ) ; }
Turns an object into a key.

@param object $object

@return string
Turns an object into a key .