Return etag from entity.

@return string ETag
165239
public function getEtag()
    {
        $sha1Able = ($this instanceof IdentifiableInterface)
            ? $this->getId()
            : spl_object_hash($this);

        if ($this instanceof DateTimeInterface) {
            $sha1Able .= $this
                ->getUpdatedAt()
                ->getTimestamp();
        }

        return sha1($sha1Able);
    }
983910
public function getEntitiesAttribute()
    {
        return DB::table(config('rinvex.attributable.tables.attribute_entity'))->where('attribute_id', $this->getKey())->get()->pluck('entity_type')->toArray();
    }
1340235
public function get($data = [])
	{
		// Process data given.
		$processPayload = $this->process(__FUNCTION__, $data);

		if( ! $processPayload->isStatus(Payload::STATUS_VALID))
		{
			return $processPayload;
		}

		// Get a properly formatted Entity Class string.
		$entityContext = $this->formatEntityType($processPayload->getData()['entity_type']);

		return $this->aggregate[$entityContext]->get($processPayload->getData()['filter'], $processPayload->getData()['sort'], $processPayload->getData()['field'], $processPayload->getData()['embed']);
	}
451273
def _extract_etag(response):
    '''  '''
    if response and response.headers:
        for name, value in response.headers:
            if name.lower() == 'etag':
                return value

    return None
1004624
protected function getPath() {
		switch ($this->type) {
			case self::TYPE_MODEL :
				$path = $this->getNames()->modelPath;
				break;
			
			case self::TYPE_ENTITYABSTRACT :
				$path = $this->getNames()->entityAbstractPath;
				break;
			
			case self::TYPE_ENTITY :
				$path = $this->getNames()->entityPath;
				break;
			
			default :
				;
				break;
		}
		return $path;
	}
35843
public function getETags()
    {
        $result = array();
        if($this->_headers->has('If-None-Match'))
        {
            $result = preg_split('/\s*,\s*/', $this->_headers->get('If-None-Match'), null, PREG_SPLIT_NO_EMPTY);

            //Remove the encoding from the etag
            //
            //RFC-7232 explicitly states that ETags should be content-coding aware
            $result = str_replace('-gzip', '', $result);
        }

        return $result;
    }
151882
public function getEntityName()
    {
        if (is_null($this->entityName)) {
            $this->entityName = self::getEntityNameFromClassName($this->getEntityClass());
        }

        return $this->entityName;
    }
611151
public function getProfile($parameters = [], $version = null, $etag = null)
        {
            return $this->get('/me', $parameters, $version, $etag);
        }
729122
public function getFixity(): string {
        $uri     = $this->fedora->sanitizeUri($this->uri);
        $request = new Request('GET', $uri . '/fcr:fixity');
        $resp    = $this->fedora->sendRequest($request);

        $graph     = new Graph();
        $graph->parse($resp->getBody());
        $res       = $graph->resource($uri);
        $fixityRes = $graph->resource($res->getResource('http://www.loc.gov/premis/rdf/v1#hasFixity'));
        $fixity    = $fixityRes->getResource('http://www.loc.gov/premis/rdf/v1#hasMessageDigest');
        return $fixity->getUri();
    }
629323
public function getEntityName()
    {

        // we got a entityname set already
        $tags = $this->getTags();

        if( isset( $tags['entity-name'] ) ) {
            return $tags['entity-name'];
        }

        $name = ucwords( $this->name );
        $name = \str_replace( '_', '', $name );

        return $name;

    }
441665
protected function getEntityAlias()
    {
        $entityName = $this->getRepository()->getClassName();
        if (false !== strpos($entityName, '\\')) {
            $entityName = substr(
                $entityName,
                strrpos($entityName, '\\') + 1
            );
        }

        $matches = array();
        preg_match_all(
            '/[A-Z]/',
            $entityName,
            $matches
        );
        return strtolower(implode('', $matches[0]));
    }
290932
protected function getEntityName()
    {
        if ($this->entityName === null) {
            $name = $this->entityClass;

            if (false !== $pos = strrpos($name, '\\')) {
                $name = substr($name, $pos + 1);
            }
            $name = strtolower(preg_replace('/([^A-Z])([A-Z])/', "$1_$2", $name));
            $name = str_replace('-', '_', $name);
            $this->entityName = $name;
        }

        return $this->entityName;
    }
1354649
public function getQueryString()
    {
        $query = parent::getQueryString();
        if ($query) {
            $query .= '&';
        }

        $query .= 'rt=' . $this->tokenManager->getToken($this->tokenName)->getValue();

        return $query;
    }
1039768
protected function generateEtag()
    {
        $keys      = array();
        $updatedAt = '';

        if (is_array($this->data)) {
            $keys = array_keys($this->data);

            if (isset($this->data['updated_at'])) {
                $updatedAt = $this->data->updated_at;
            }
        }

        if (is_object($this->data)) {
            $objectVars = get_object_vars($this->data);
            $keys = array_keys($objectVars);
            unset($objectVars);

            if (isset($this->data->updated_at)) {
                $updatedAt = $this->data->updated_at;
            }
        }

        $etag = '';

        if (empty($keys)) {
            return $etag;
        }

        foreach($keys as $item) {
            $etag .= $item;
        }

        $etag .= $updatedAt;

        return md5( $etag );
    }
757285
public static function getSingularEntityName()
	{
		if ( isset(self::$entity_singular) && ! empty(self::$entity_singular))
			return self::$entity_singular;

		return str_singular(self::getEntityName());
	}
964218
public function getNamespace(): string
    {
        return ($this->getBundleNamespace() ? $this->getBundleNamespace() : static::NO_BUNDLE_NAMESPACE) . '\\Entity'.
            ($this->getSubDir() ? '\\'. $this->getSubDir() : '')
        ;
    }
672520
public function getSlug()
    {
        $name = $this->getName();
        if (!isset($this->slugs[$name])) {
            $slug = Str::snake($name, '-');
            $this->slugs[$name] = Str::slug($slug);
        }

        return $this->slugs[$name];
    }