You are here

public function Micon::getArchive in Micon 8

Same name and namespace in other branches
  1. 2.x src/Entity/Micon.php \Drupal\micon\Entity\Micon::getArchive()

Gets the archive from a base64 encoded string.

Return value

string The restored archive data.

Overrides MiconInterface::getArchive

1 call to Micon::getArchive()
Micon::archiveDecode in src/Entity/Micon.php
Take base64 encoded archive and save it to a temporary file for extraction.

File

src/Entity/Micon.php, line 174

Class

Micon
Defines the Micon entity.

Namespace

Drupal\micon\Entity

Code

public function getArchive() {
  $data = implode('', $this
    ->get('archive'));
  return unserialize(gzuncompress(stripslashes(base64_decode(strtr($data, '-_,', '+/=')))));
}