Submit
Path:
~
/
/
opt
/
psa
/
admin
/
plib
/
modules
/
mfa
/
vendor
/
tedivm
/
stash
/
src
/
Stash
/
Driver
/
FileSystem
/
File Content:
SerializerEncoder.php
<?php /* * This file is part of the Stash package. * * (c) Robert Hafner <tedivm@tedivm.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Stash\Driver\FileSystem; class SerializerEncoder implements EncoderInterface { public function deserialize($path) { if (!file_exists($path)) { return false; } $raw = unserialize(file_get_contents($path)); if (is_null($raw) || !is_array($raw)) { return false; } $data = $raw['data']; $expiration = isset($raw['expiration']) ? $raw['expiration'] : null; return array('data' => $data, 'expiration' => $expiration); } public function serialize($key, $data, $expiration = null) { $processed = serialize(array( 'key' => $key, 'data' => $data, 'expiration' => $expiration )); return $processed; } public function getExtension() { return '.pser'; } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
INFO
Name
Size
Permission
Action
EncoderInterface.php
419 bytes
0644
NativeEncoder.php
3043 bytes
0644
SerializerEncoder.php
1084 bytes
0644
N4ST4R_ID | Naxtarrr