Gets the storage file contents and converts it into an object

@return object

@throws \Exception
165530
private function getRepository()
    {
        if (!file_exists($this->storage)) {
            throw new \Exception('Tokens storage file not found.');
        }

        $file = file_get_contents($this->storage);
        return json_decode($file);
    }
594360
public function getFile()
    {
        if ($this->file && get_class($this->file) != $this->file->ClassName) {
            // If the class is Image and the ClassName says it should be a CloudImage, just reload it
            $this->file = DataObject::get($this->file->ClassName)->byID($this->file->ID);
        }

        return $this->file;
    }
981780
public function getBytes()
    {
        if ($this->isDirty && $this->bytes) {
            return $this->bytes;
        }
        if ($this->isDirty && $this->filename) {
            return file_get_contents($this->filename);
        }
        if ($this->mongoGridFSFile instanceof \MongoGridFSFile) {
            return $this->mongoGridFSFile->getBytes();
        }
        return null;
    }
442106
public function getData()
    {
        if (!$this->data && $this->getLocation()) {
            $this->data = file_get_contents($this->getLocation());
        }

        return $this->data;
    }
85714
private function getZip()
    {
        $this->info("Downloading");

        $sourceContent = file_get_contents($this->argument('source'));
        if(!$sourceContent) {
            throw new \Exception('Source could not be found!');
        }

        $this->tmpRandomName = time();
        $this->tmpZipFile = tmpPath($this->tmpRandomName.'.zip');

        // Save zip to tmp directory
        if(!file_put_contents($this->tmpZipFile, $sourceContent)) {
            File::delete($this->tmpZipFile);
            throw new \Exception('Could not copy source file to path '.$this->tmpZipFile);
        }

        return $this;
    }
1344076
public function getCurrentDirectoryContent()
    {
        $content = File::glob($this->currentDir . DIRECTORY_SEPARATOR . '*');

        $content = array_map(function ($item) {
            return (object) [
                'path' => $this->getPathRelativeToBaseDir($item),
                'name' => Str::substr(
                    $item,
                    Str::length($this->currentDir) + 1
                ),
                'isFile' => File::isFile($item),
                'isDir' => File::isDirectory($item),
            ];
        }, $content);

        return $content;
    }
748751
public function getContentIterator()
    {
        // Initializing output array
        $output = new \ArrayIterator();

        // Getting total number of messages
        $maxMessage = $this->storage->countMessages();

        for($i=1; $i<=$maxMessage; $i++) {
            // Getting the message object
            $message = $this->storage->getMessage($i);

            if ($message instanceof \Zend\Mail\Storage\Message) {
                // Adding only unread messages to result iterator
                if ($this->unreadOnly && $message->hasFlag(ZendStorage::FLAG_SEEN)) {
                    continue;
                }

                // Wrapping the result object into an appropriate ResourceInterface instance
                try {
                    $imapMessage = new ImapMessage();
                    $imapMessage->init($this->getName(), $i, $message);
                } catch (\Exception $e) {
                    throw new Exception\SourceGetContentException(
                        sprintf(
                            'Error while getting the content for the resource unique id \'%s\'. Exception is: \'%s\'.',
                            $i,
                            $e->getMessage()
                        )
                    );
                }

                // Adding the wrapping object to the result iterator
                $output->append($imapMessage);
            }
        }

        // Returning the result iterator
        return $output;
    }
1315403
public function getFile($fileName, $storageName = '')
    {
        //check whether file is set or not
        if ($fileName == '') {
            AsposeApp::getLogger()->error(Exception::MSG_NO_FILENAME);
            throw new Exception(Exception::MSG_NO_FILENAME);
        }

        //build URI
        $strURI = $this->strURIFile . $fileName;
        if ($storageName != '') {
            $strURI .= '?storage=' . $storageName;
        }
        //sign URI
        $signedURI = Utils::sign($strURI);

        $responseStream = Utils::processCommand($signedURI, 'GET', '', '');

        $outputPath = AsposeApp::$outPutLocation . basename($fileName);
        Utils::saveFile($responseStream, $outputPath);

        return $outputPath;
    }
154981
protected function getStorage()
    {
        if (null === $this->storage) {
            $this->storage = $this->get('sulu_media.storage');
        }

        return $this->storage;
    }
287465
public function getContent() {
		$content = file_get_contents($this->getRealpath());
		
		if ($content === false) {
			throw new Exceptions\InvalidPath('File "' . $this->path . '" is unreadable', null, null, $this->path);
		}
		
		return $content;
	}
918668
protected function get_file() {
        if (!$this->file) {
            return null;
        }
        // The get_file_by_id call can return false, so normalise to null.
        $file = get_file_storage()->get_file_by_id($this->file);
        return ($file) ? $file : null;
    }
666598
public function getArchive()
    {
        $this->close();

        if ($this->comptype === Archive::COMPRESS_AUTO) {
            $this->comptype = Archive::COMPRESS_NONE;
        }

        if ($this->comptype === Archive::COMPRESS_GZIP) {
            return gzencode($this->memory, $this->complevel);
        }
        if ($this->comptype === Archive::COMPRESS_BZIP) {
            return bzcompress($this->memory);
        }
        return $this->memory;
    }
344199
public function getFile(){
        if(!$this->isPropertyAvailable('File')){
            $this->setProperty("File", new File($this->getContext(),new ResourcePathEntity($this->getContext(),$this->getResourcePath(), "File")),false);
        }
        return $this->getProperty("File");
    }
353807
public function getFileObject()
    {
        return new SplFileObject(
            self::WNAME . '://' . spl_object_hash($this),
            'rb',
            false,
            stream_context_create(array(
                self::WNAME => array(
                    'string' => $this
                )
            ))
        );
    }
1104894
public function load()
	{
		$filename = $this->getFile();
		if (!file_exists($filename))
			return;

		$json = file_get_contents($filename);
		if (strlen($json) == 0)
			return;

		$data = $this->decode($json);
		if ($data === null)
			throw new Exception('Error while trying to decode ' . $filename . '.');

		$this->data = $data;

		if (!$this->verify())
			throw new Exception($filename . ' failed checksum validation.');
	}
619553
public function getContents()
    {
        $file = $this->getPath();

        // Get an unserialize
        $configuration = file_get_contents($file);
        $configuration = unserialize($configuration);

        return $configuration;
    }
231415
function storage()
	{
		if($this->storage)
			return $this->storage;

		$storage_class = $this->storage_engine();

		if($storage_class_name = $storage_class)
			return $this->storage = new $storage_class_name($this);

		bors_throw('Undefined storage engine for '.$this);
	}