100+ results for 'php unserialize'
Not the results you expected?
acf-meta-functions.php (https://gitlab.com/suporte.spturis/carnaval2015.spturis.com.br) PHP · 384 lines
Weee.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 200 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
37 * @param \Magento\Sales\Model\Order\Invoice $invoice
38 * @return $this
39 * @SuppressWarnings(PHPMD.CyclomaticComplexity)
40 * @SuppressWarnings(PHPMD.NPathComplexity)
41 * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
42 */
43 public function collect(\Magento\Sales\Model\Order\Invoice $invoice)
95 $taxRatio = [];
96 if ($item->getTaxRatio()) {
97 $taxRatio = unserialize($item->getTaxRatio());
98 }
99 $taxRatio[\Magento\Weee\Model\Total\Quote\Weee::ITEM_TYPE] = $itemWeeeTax / $orderItemWeeeTax;
ArrayObject.php (https://gitlab.com/imamul68e/137619_PHP31) PHP · 432 lines
registry.php (https://github.com/Paladin/joomla-platform.git) PHP · 472 lines
PhpReferenceCompatibility.php (https://gitlab.com/x33n/ImpressPages) PHP · 433 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
20 *
21 * This ArrayObject is a rewrite of the implementation to fix
22 * issues with php's implementation of ArrayObject where you
23 * are unable to unset multi-dimensional arrays because you
24 * need to fetch the properties / lists as references.
25 */
26 abstract class PhpReferenceCompatibility implements IteratorAggregate, ArrayAccess, Serializable, Countable
27 {
28 /**
403 /**
404 * Unserialize an ArrayObject
405 *
406 * @param string $data
AbstractTokenTest.php (https://gitlab.com/fabian.morales/marlon_becerra) PHP · 285 lines
class.splqueue.html (https://bitbucket.org/thncr/manuals.git) HTML · 216 lines
10 <div class="next" style="text-align: right; float: right;"><a href="splqueue.construct.html">SplQueue::__construct</a></div>
11 <div class="up"><a href="spl.datastructures.html">数据结构</a></div>
12 <div class="home"><a href="index.html">PHP Manual</a></div>
13 </div><hr /><div id="class.splqueue" class="reference">
14 <h1 class="title">The SplQueue class</h1>
17 <div class="partintro"><p class="verinfo">(PHP 5 >= 5.3.0)</p>
161 )</div>
162 <div class="methodsynopsis dc-description">
163 <span class="modifier">public</span> <span class="type">void</span> <span class="methodname"><a href="spldoublylinkedlist.unserialize.html" class="methodname">SplDoublyLinkedList::unserialize</a></span>
164 ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$serialized</code></span>
165 )</div>
Cache_File.php (https://gitlab.com/karlen/ayo_wp) PHP · 455 lines
1 <?php
2 namespace W3TC;
116 $expires_at = time() + $expire;
117 @fputs( $fp, pack( 'L', $expires_at ) );
118 @fputs( $fp, '<?php exit; ?>' );
119 @fputs( $fp, @serialize( $var ) );
120 @fclose( $fp );
136 list( $data, $has_old_data ) = $this->_get_with_old_raw( $key, $group );
137 if ( !empty( $data ) )
138 $data_unserialized = @unserialize( $data );
139 else
140 $data_unserialized = $data;
142 return array( $data_unserialized, $has_old_data );
143 }
translated-object.php (https://gitlab.com/hop23typhu/bryepoxy) PHP · 272 lines
1 <?php
3 /**
118 else {
119 // take care not to overwrite extra data stored in description field, if any
120 $d = unserialize( $term->description );
121 $d = is_array( $d ) ? array_diff_key( $d, $old_translations ) : array(); // remove old translations
122 $d = array_merge( $d, $translations ); // add new one
153 if ( ! empty( $term ) ) {
154 $d = unserialize( $term->description );
155 $slug = array_search( $id, $this->get_translations( $id ) ); // in case some plugin stores the same value with different key
156 unset( $d[ $slug ] );
175 public function get_translations( $id ) {
176 $term = $this->get_object_term( $id, $this->tax_translations );
177 $translations = empty( $term ) ? array() : unserialize( $term->description );
179 // make sure we return only translations ( thus we allow plugins to store other informations in the array )
AbstractSessionArrayStorage.php (https://bitbucket.org/zbahij/eprojets_app.git) PHP · 484 lines
RouteTest.php (https://gitlab.com/daniruizcamacho/pfcascensores) PHP · 232 lines
1 <?php
3 /*
14 use Symfony\Component\Routing\Route;
16 class RouteTest extends \PHPUnit_Framework_TestCase
17 {
18 public function testConstructor()
226 $serialized = serialize($route);
227 $unserialized = unserialize($serialized);
229 $this->assertEquals($route, $unserialized);
230 $this->assertNotSame($route, $unserialized);
231 }
232 }
PlatformJobQueue.php (https://github.com/Exercise/zf2.git) PHP · 318 lines
ezkeywordtype.php (https://bitbucket.org/ericsagnes/ezpublish-multisite.git) PHP · 291 lines
1 <?php
2 /**
3 * File containing the eZKeywordType class.
11 /*!
12 \class eZKeywordType ezkeywordtype.php
13 \ingroup eZDatatype
14 \brief A content datatype which handles keyword indexes
273 }
275 function unserializeContentObjectAttribute( $package, $objectAttribute, $attributeNode )
276 {
277 $keyWordString = $attributeNode->getElementsByTagName( 'keyword-string' )->item( 0 )->textContent;
sfNamespacedParameterHolderTest.php (https://github.com/mrwabu/urlcatcher.git) PHP · 224 lines
1 <?php
3 /*
9 */
11 require_once(dirname(__FILE__).'/../../bootstrap/unit.php');
13 $t = new lime_test(54);
211 $t->is($parameters, $ph->getAll(), '->add() adds a reference of an array of parameters');
213 // ->serialize() ->unserialize()
214 $t->diag('->serialize() ->unserialize()');
215 $t->ok($ph == unserialize(serialize($ph)), 'sfNamespacedParameterHolder implements the Serializable interface');
217 // Array path as a key
content-archive.php (https://gitlab.com/oxidigitaluser/liguelista) PHP · 154 lines
102 <div style="margin-top:5px;">
103 <span style="font-weight: 300;">
104 <a href="http://<?php echo $javo_meta_query->get('website'); ?>" target="_blank" alt="<?php the_title(); ?>" title="<?php the_title(); ?>"><?php echo $javo_meta_query->get('website'); ?></a>
105 </span>
106 </div>
122 <div style="float: right;padding-left: 5px;">
123 <?php if ($javo_meta_query->get('phone1') != '' && $javo_meta_query->get('phone1') != ', ') { ?><div style="margin-top:5px;"><span class="quebratelefone"><?php echo $javo_meta_query->get('phone1'); ?></span></div><?php } ?>
124 <?php if ($javo_meta_query->get('phone2') != '' && $javo_meta_query->get('phone2') != ', ') { ?><div style="margin-top:5px;"><span class="quebratelefone"><?php echo $javo_meta_query->get('phone2'); ?></span></div><?php } ?>
125 <?php if ($javo_meta_query->get('phone3') != '' && $javo_meta_query->get('phone3') != ', ') { ?><div style="margin-top:5px;"><span class="quebratelefone"><?php echo $javo_meta_query->get('phone3'); ?></span></div><?php } ?>
126 </div>
146 <div style="float: right;width: 100%;" class="quebratelefone">
147 <?php if ($javo_meta_query->get('phone0800') != '' && $javo_meta_query->get('phone0800') != ', ') { ?><div style="margin-top:5px;"><span class="quebratelefone"><?php echo $javo_meta_query->get('phone0800'); ?></span></div><?php } ?>
148 </div>
149 </div>
ezrangeoptiontype.php (https://github.com/itag/ezpublish.git) PHP · 276 lines
1 <?php
2 /**
3 * File containing the eZRangeOptionType class.
11 /*!
12 \class eZRangeOptionType ezrangeoptiontype.php
13 \ingroup eZDatatype
14 \brief The class eZRangeOptionType does
234 }
236 function unserializeContentClassAttribute( $classAttribute, $attributeNode, $attributeParametersNode )
237 {
238 $defaultName = $attributeParametersNode->getElementsByTagName( 'default-name' )->item( 0 )->textContent;
253 }
255 function unserializeContentObjectAttribute( $package, $objectAttribute, $attributeNode )
256 {
257 $rootNode = $attributeNode->getElementsByTagName( 'ezrangeoption' )->item( 0 );
ConfigSchema.php (https://github.com/viggof/moodle.git) PHP · 164 lines
PropelCSVParser.php (https://bitbucket.org/aagraz/propel.git) PHP · 314 lines
1 <?php
3 /**
11 /**
12 * CSV parser. Converts data between associative array and CSV formats.
13 * CSV parsing code borrowed from php-csv-utils by Luke Visinoni
14 * http://code.google.com/p/php-csv-utils/
247 }
248 if ($this->isSerialized($column)) {
249 $column = $this->unserialize($column);
250 }
251 if ($column === 'N;') {
289 /**
290 * Unserializes a value from CSV output
291 *
292 * @param string $input
newpost.php (https://bitbucket.org/seyar/kinda.local.git) PHP · 191 lines
Renderlet.php (https://github.com/ngocanh/pimcore.git) PHP · 341 lines
Chain.php (https://github.com/nationalfield/symfony.git) PHP · 422 lines
1 <?php
2 /*
3 * $Id$
28 * @subpackage Record
29 * @author Konsta Vesterinen <kvesteri@cc.hut.fi>
30 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
31 * @link www.doctrine-project.org
32 * @since 1.0
166 }
168 public function preUnserialize(Doctrine_Event $event)
169 {
170 $disabled = $this->getOption('disabled');
172 if ($disabled !== true && ! (is_array($disabled) && in_array('preUnserialize', $disabled))) {
173 foreach ($this->_listeners as $listener) {
174 $disabled = $listener->getOption('disabled');
vimeo_source.php (https://github.com/gmimano/newd.git) PHP · 217 lines
1 <?php
2 /**
3 * Vimeo Datasource 0.1
12 * @author Jon (pointlessjon) Adams <jon@anti-gen.com>
13 * @copyright (c) n/a
14 * @link http://github.com/pointlessjon/CakePHP-Vimeo-Datasource/tree/master
15 * @license http://www.opensource.org/licenses/mit-license.php The MIT License
209 function __vimeoApiRequest($data = null) {
210 if (!empty($data)) {
211 return unserialize($this->Http->get("http://vimeo.com/api/{$data}.php", null));
212 }
213 return false;
User.php (https://github.com/hukumonline/quart80.git) PHP · 278 lines
1 <?php
3 /**
185 /**
186 * Serializes properties and returns them as a string which can later on
187 * be unserialized.
188 *
189 * @return string
198 /**
199 * Unserializes <tt>$serialized</tt> and assigns the specific
200 * values found to the members in this class.
201 *
203 * instance of this class.
204 */
205 public function unserialize($serialized)
206 {
207 $str = unserialize($serialized);
em-notices.php (https://bitbucket.org/antonyravel/cape-resorts.git) PHP · 238 lines
FileStore.php (https://gitlab.com/techniconline/kmc) PHP · 247 lines
QueueFake.php (https://gitlab.com/jjpa2018/dashboard) PHP · 414 lines
1 <?php
3 namespace Illuminate\Support\Testing\Fakes;
8 use Illuminate\Queue\QueueManager;
9 use Illuminate\Support\Traits\ReflectsClosures;
10 use PHPUnit\Framework\Assert as PHPUnit;
12 class QueueFake extends QueueManager implements Queue
38 }
40 PHPUnit::assertTrue(
41 $this->pushed($job, $callback)->count() > 0,
42 "The expected [{$job}] job was not pushed."
55 $count = $this->pushed($job)->count();
57 PHPUnit::assertSame(
58 $times, $count,
59 "The expected [{$job}] job was pushed {$count} times instead of {$times} times."
class-itsec-logger-all-logs.php (https://gitlab.com/najomie/fit-hippie) PHP · 260 lines
1 <?php
3 /**
73 **/
74 function column_host( $item ) {
75 require_once( ITSEC_Core::get_core_dir() . '/lib/class-itsec-lib-ip-tools.php' );
77 $r = array();
102 if ( 0 != $item['user_id'] ) {
103 return '<a href="' . esc_url( admin_url( 'user-edit.php?user_id=' . $item['user_id'] ) ) . '" target="_blank" rel="noopener noreferrer">' . $item['user'] . '</a>';
104 } else {
105 return $item['user'];
148 global $itsec_logger;
150 $raw_data = maybe_unserialize( $item['data'] );
152 $data = apply_filters( "itsec_logger_filter_{$item['type']}_data_column_details", '', $raw_data );
PermanentCache.php (https://bitbucket.org/valmy/openx.git) PHP · 167 lines
SurveyDBClass.php (https://github.com/ChuguluGames/mediawiki-svn.git) PHP · 732 lines
extension.cache.mysql.php (https://bitbucket.org/pombredanne/spip-zone-treemap.git) PHP · 171 lines
1 <?php
2 /////////////////////////////////////////////////////////////////
3 /// getID3() by James Heinrich <info@getid3.org> //
6 /////////////////////////////////////////////////////////////////
7 // //
8 // extension.cache.mysql.php - part of getID3() //
9 // Please see readme.txt for more information //
10 // ///
20 * way as the getID3 class, but return cached information very fast
21 *
22 * Example: (see also demo.cache.mysql.php in /demo/)
23 *
24 * Normal getID3 usage (example):
25 *
26 * require_once 'getid3/getid3.php';
27 * $getID3 = new getID3;
28 * $getID3->encoding = 'UTF-8';
Serializer.php (https://github.com/erochest/Omeka.git) PHP · 313 lines
1 <?php
3 class HTMLPurifier_DefinitionCache_Serializer extends HTMLPurifier_DefinitionCache
71 return false;
72 }
73 return unserialize(file_get_contents($file));
74 }
98 $dir = $this->generateDirectoryPath($config);
99 $dh = opendir($dir);
100 // Apparently, on some versions of PHP, readdir will return
101 // an empty string if you pass an invalid argument to readdir.
102 // So you need this test. See #49.
290 $chmod = $chmod | 0070;
291 } else {
292 // PHP's probably running as nobody, so we'll
293 // need to give global permissions
294 $chmod = $chmod | 0777;
Rewrite.php (https://github.com/temperatio/OSClass.git) PHP · 175 lines
1 <?php if ( ! defined('ABS_PATH')) exit('ABS_PATH is not loaded. Direct access is not allowed.');
3 /*
52 public function getRules()
53 {
54 return unserialize(osc_rewrite_rules()) ;
55 }
118 public function extractURL($uri = '')
119 {
120 $uri_array = explode('?', str_replace('index.php', '', $uri));
121 if(substr($uri_array[0], 0, 1)=="/") {
122 return substr($uri_array[0], 1);
openid_db_store.php (https://github.com/F5/zetacomponents.git) PHP · 310 lines
1 <?php
2 /**
3 * File containing the ezcAuthenticationOpenidDbStore class.
250 /**
251 * Returns the unserialized association linked to the OpenID provider URL.
252 *
253 * Returns false if the association could not be retrieved or if it expired.
275 {
276 $rows = $rows[0];
277 $data = unserialize( $rows[$table['fields']['association']] );
279 return $data;
elementproperty.php (https://gitlab.com/Rad1calDreamer/honey) PHP · 402 lines
model.php (https://github.com/DoFken/forkcms.git) PHP · 384 lines
session.php (https://github.com/zelu/core.git) PHP · 434 lines
Storage.php (https://github.com/jmarien/phpBayeux.git) PHP · 316 lines
1 <?php
3 /**
48 $clientPath = $this->_cacheBackend . DIRECTORY_SEPARATOR . 'client_'.$clientid;
49 //_log(' '.__FILE__.' '.__LINE__.' | get client info from '.$clientPath);
50 $clientinfo = unserialize(file_get_contents($clientPath));
51 if (isset($clientinfo[$channel])) {
52 $lastid = $clientinfo[$channel];
87 //_log(' '.__FILE__.' '.__LINE__.' | get client info from '.$clientPath);
88 if (file_exists($clientPath)) {
89 $clientinfo = unserialize(file_get_contents($clientPath));
90 return($clientinfo);
91 }
114 case 'file':
115 $clientPath = $this->_cacheBackend . DIRECTORY_SEPARATOR . 'client_'.$clientid;
116 $clientinfo = unserialize(file_get_contents($clientPath));
117 foreach($clientinfo as $channel => $id) {
118 $this->setChannel($channel);
update.class.php (https://gitlab.com/webkod3r/tripolis) PHP · 234 lines
1 <?php
2 /**
3 * @author ThemePunch <info@themepunch.com>
12 private $plugin_url = 'http://codecanyon.net/item/slider-revolution-responsive-wordpress-plugin/2751380';
13 private $remote_url = 'http://updates.themepunch.tools/check_for_updates.php';
14 private $remote_url_info = 'http://updates.themepunch.tools/revslider/revslider.php';
15 private $plugin_slug = 'revslider';
16 private $plugin_path = 'revslider/revslider.php';
17 private $version;
18 private $plugins;
81 $data = $data ? $data : new stdClass;
83 $this->data = is_object($data) ? $data : maybe_unserialize($data);
85 }
ezbirthdaytype.php (https://bitbucket.org/thinkwalsh/think-walsh-datatypes.git) PHP · 356 lines
PHPreprocessor.php (https://github.com/constructions-incongrues/phpreprocessor.git) PHP · 214 lines
1 <?php
2 namespace Com\AramisAuto;
4 class PHPreprocessor
5 {
6 /**
61 // Output results
62 $file = new \SplFileObject('php://stdout', 'w');
63 $file->fwrite($this->_generateProperties($tokens));
64 }
71 $files = $this->_findDistFiles($options['src']);
73 // Unserialize tokens
74 $tokensFiles = explode(',', $options['properties']);
75 $tokens = array();
openid_file_store.php (https://github.com/F5/zetacomponents.git) PHP · 301 lines
1 <?php
2 /**
3 * File containing the ezcAuthenticationOpenidFileStore class.
245 /**
246 * Returns the unserialized association linked to the OpenID provider URL.
247 *
248 * Returns false if the association could not be retrieved or if it expired.
260 }
262 $data = unserialize( file_get_contents( $file ) );
263 return $data;
264 }
File.php (https://github.com/leerbag/zf2.git) PHP · 209 lines
1 <?php
2 /**
3 * Zend Framework
157 * @param string $id Cache id
158 * @param boolean $doNotTestCacheValidity If set to true, the cache validity won't be tested
159 * @param boolean $doNotUnserialize Do not serialize (even if automatic_serialization is true) => for internal use
160 * @return mixed|false Cached datas
161 */
162 public function load($id, $doNotTestCacheValidity = false, $doNotUnserialize = false)
163 {
164 if (!$doNotTestCacheValidity) {
165 if ($this->test($id)) {
166 return parent::load($id, true, $doNotUnserialize);
167 }
168 return false;
User.php (https://github.com/xoops-pi/engine.git) PHP · 180 lines
1 <?php
2 /**
3 * XOOPS user meta registry
29 * @copyright Xoops Engine http://www.xoopsengine.org/
30 * @license http://www.fsf.org/copyleft/gpl.html GNU public license
31 * @author Taiwen Jiang <phppp@users.sourceforge.net>
32 * @since 3.0
33 * @package Xoops_Core
50 $view["method"] = array($row->module . "_profile", $row->view);
51 } elseif (!empty($row->options)) {
52 $view["options"] = unserialize($row->options);
53 }
64 }
65 if (!empty($input)) {
66 $input = unserialize($input);
67 if (is_string($input) && !empty($input)) {
68 $input = array("type" => $input);
model.php (https://github.com/zakgrant/forkcms.git) PHP · 394 lines
Profiler.php (https://github.com/xbojer/gfw.git) PHP · 243 lines
1 <?php
3 /*
123 public function import($data)
124 {
125 $profile = unserialize(base64_decode($data));
127 if ($this->storage->read($profile->getToken())) {
176 // forces collectors to become "read/only" (they loose their object dependencies)
177 $profile->addCollector(unserialize(serialize($collector)));
178 }
Snapshot.php (https://gitlab.com/ppapadatis/products-management-platform) PHP · 419 lines
1 <?php
2 /*
3 * This file is part of the GlobalState package.
4 *
5 * (c) Sebastian Bergmann <sebastian@phpunit.de>
6 *
7 * For the full copyright and license information, please view the LICENSE
311 $this->canBeSerialized($GLOBALS[$key]) &&
312 !$this->blacklist->isGlobalVariableBlacklisted($key)) {
313 $this->globalVariables[$key] = unserialize(serialize($GLOBALS[$key]));
314 }
315 }
327 if (isset($GLOBALS[$superGlobalArray]) && is_array($GLOBALS[$superGlobalArray])) {
328 foreach ($GLOBALS[$superGlobalArray] as $key => $value) {
329 $this->superGlobalVariables[$superGlobalArray][$key] = unserialize(serialize($value));
330 }
331 }
basic.php (https://github.com/kamarulismail/kamarul-playground.git) PHP · 168 lines
1 <?php
2 /**
3 * File containing the ezcWebdavBasicPathFactory class.
41 *
42 * Those will get a '/' appended on re-serialization. Works only if they
43 * had been unserialized before.
44 *
45 * @var array(string=>bool)
106 public function parseUriToPath( $uri )
107 {
108 $requestPath = parse_url( trim( $uri ), PHP_URL_PATH );
110 $requestPath = str_replace( '//', '/', $requestPath );
134 // Attach fragment to avoid performing operations occasionally
135 if ( ( $frag = parse_url( $uri, PHP_URL_FRAGMENT ) ) !== null )
136 {
137 $requestPath .= "#$frag";
LaminasPriorityQueueStub.php (https://github.com/Sylius/Sylius.git) PHP · 348 lines
1 <?php
3 /**
18 use function serialize;
19 use function sprintf;
20 use function unserialize;
22 /**
224 /**
225 * Unserialize a string into a PriorityQueue object
226 *
227 * Serialization format is compatible with {@link Laminas\Stdlib\SplPriorityQueue}
230 * @return void
231 */
232 public function unserialize($data)
233 {
234 foreach (unserialize($data) as $item) {
TypeConverter.php (https://bitbucket.org/adek23/type-converter.git) PHP · 508 lines
1 <?php
2 /**
3 * @copyright Copyright 2006-2012, Miles Johnson - http://milesj.me
4 * @license http://opensource.org/licenses/mit-license.php - Licensed under the MIT License
5 * @link http://milesj.me/code/php/type-converter
110 */
111 public static function isSerialized($data) {
112 $ser = @unserialize($data);
114 return ($ser !== false) ? $ser : false;
ClassMetadataTest.php (https://gitlab.com/pr0055/symfonypizza) PHP · 298 lines
1 <?php
3 /*
19 use Symfony\Component\Validator\Tests\Fixtures\PropertyConstraint;
21 class ClassMetadataTest extends \PHPUnit_Framework_TestCase
22 {
23 const CLASSNAME = 'Symfony\Component\Validator\Tests\Fixtures\Entity';
229 $this->metadata->addGetterConstraint('lastName', new ConstraintB());
231 $metadata = unserialize(serialize($this->metadata));
233 $this->assertEquals($this->metadata, $metadata);
Test.php (https://github.com/koala-framework/koala-framework.git) PHP · 253 lines
Pager.php (https://github.com/tobiasstrebitzer/SonataAdminBundle.git) PHP · 611 lines
SessionTest.php (https://bitbucket.org/jokusafet/magento2.git) PHP · 208 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
23 * @subpackage integration_tests
24 * @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
25 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26 */
28 class Mage_Core_Model_Resource_SessionTest extends PHPUnit_Framework_TestCase
29 {
30 /**
Input.php (https://gitlab.com/dleonov/my-framework-two) PHP · 419 lines
1 <?php
3 /**
355 /**
356 * Method to unserialize the input.
357 *
358 * @param string $input The serialized input.
362 * @since 12.1
363 */
364 public function unserialize($input)
365 {
366 // Unserialize the options, data, and inputs.
367 list($this->options, $this->data, $this->inputs) = unserialize($input);
369 // Load the filter.
InfoTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 255 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
10 use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
12 class InfoTest extends \PHPUnit_Framework_TestCase
13 {
14 /** @var \Magento\Payment\Model\InfoInterface */
18 protected $objectManagerHelper;
20 /** @var \Magento\Framework\Model\Context|\PHPUnit_Framework_MockObject_MockObject */
21 protected $contextMock;
23 /** @var \Magento\Framework\Registry|\PHPUnit_Framework_MockObject_MockObject */
24 protected $registryMock;
Minsaleqty.php (https://github.com/speedupmate/Magento-CE-Mirror.git) PHP · 208 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_CatalogInventory
23 * @copyright Copyright (c) 2006-2020 Magento, Inc. (http://www.magento.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
82 } else if (is_string($value) && !empty($value)) {
83 try {
84 return Mage::helper('core/unserializeArray')->unserialize($value);
85 } catch (Exception $e) {
86 return array();
revisions.php (https://gitlab.com/suporte.spturis/carnaval2015.spturis.com.br) PHP · 457 lines
ReflectionFunctionTest.php (https://github.com/cgmartin/zf2.git) PHP · 189 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
15 * @group Zend_Server
16 */
17 class ReflectionFunctionTest extends \PHPUnit_Framework_TestCase
18 {
19 public function test__construct()
117 $r = new Reflection\ReflectionFunction($function);
118 $s = serialize($r);
119 $u = unserialize($s);
120 $this->assertTrue($u instanceof Reflection\ReflectionFunction);
121 $this->assertEquals('', $u->getNamespace());
Translate.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 490 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
11 * Translate library
12 *
13 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
14 * @SuppressWarnings(PHPMD.TooManyFields)
124 * @param \Magento\Framework\App\Language\Dictionary $packDictionary
125 *
126 * @SuppressWarnings(PHPMD.ExcessiveParameterList)
127 */
128 public function __construct(
473 $data = $this->_cache->load($this->getCacheId());
474 if ($data) {
475 $data = unserialize($data);
476 }
477 return $data;
IniReaderTest.php (https://github.com/kunit/cakephp.git) PHP · 306 lines
5 * PHP 5
6 *
7 * CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
8 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
9 *
13 *
14 * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
15 * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
16 * @package Cake.Test.Case.Configure
17 * @since CakePHP(tm) v 2.0
30 /**
31 * Test data to serialize and unserialize.
32 *
33 * @var array
widget_m.php (https://github.com/JamieLomas/pyrocms.git) PHP · 332 lines
1 <?php defined('BASEPATH') OR exit('No direct script access allowed');
2 /**
3 * @package PyroCMS
29 if ($result)
30 {
31 $this->unserialize_fields($result);
32 }
49 if ($result)
50 {
51 array_map(array($this, 'unserialize_fields'), $result);
52 }
75 if ($result)
76 {
77 array_map(array($this, 'unserialize_fields'), $result);
78 }
Poll.php (https://github.com/daohoangson/DTUI_201105.git) PHP · 398 lines
Abstract.php (https://github.com/speedupmate/Magento-CE-Mirror.git) PHP · 281 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Bundle
23 * @copyright Copyright (c) 2006-2020 Magento, Inc. (http://www.magento.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
197 }
198 if (isset($options['bundle_selection_attributes'])) {
199 return unserialize($options['bundle_selection_attributes']);
200 }
201 return null;
Item.php (https://github.com/timglabisch/pimcore.git) PHP · 387 lines
Queue.php (https://github.com/speedupmate/Magento-CE-Mirror.git) PHP · 195 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Core
23 * @copyright Copyright (c) 2006-2020 Magento, Inc. (http://www.magento.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
26 class Mage_Core_Model_Resource_Email_Queue extends Mage_Core_Model_Resource_Db_Abstract
37 /**
38 * Load recipients, unserialize message parameters
39 *
40 * @param Mage_Core_Model_Abstract $object
SessionTest.php (https://github.com/israelnoguera/parejas.git) PHP · 232 lines
1 <?php
3 /*
21 * @author Robert Schönthal <seroscho@googlemail.com>
22 */
23 class SessionTest extends \PHPUnit_Framework_TestCase
24 {
25 protected $storage;
135 $this->assertSame($compare, $this->session->serialize());
137 $this->session->unserialize($compare);
139 $_storage = new \ReflectionProperty(get_class($this->session), 'storage');
Route.php (https://bitbucket.org/laborautonomo/laborautonomo-site.git) PHP · 594 lines
Sql.php (https://github.com/ewandor/horde.git) PHP · 319 lines
1 <?php
2 /**
3 * Ingo_Storage_Filters_Sql is the object used to hold user-defined filtering
61 'action-value' => Horde_String::convertCharset($row['rule_value'], $this->_params['charset'], 'UTF-8'),
62 'flags' => (int)$row['rule_flags'],
63 'conditions' => empty($row['rule_conditions']) ? null : Horde_String::convertCharset(unserialize($row['rule_conditions']), $this->_params['charset'], 'UTF-8'),
64 'combine' => (int)$row['rule_combine'],
65 'stop' => (bool)$row['rule_stop'],
70 if (empty($data) && !$readonly) {
71 $data = @unserialize($GLOBALS['prefs']->getDefault('rules'));
72 if ($data) {
73 foreach ($data as $val) {
ContextListener.php (https://gitlab.com/martinstti/silex-microframework-rest) PHP · 176 lines
SerializerTest.php (https://github.com/leerbag/zf2.git) PHP · 138 lines
1 <?php
2 /**
3 * Zend Framework
39 * @license http://framework.zend.com/license/new-bsd New BSD License
40 */
41 class SerializerTest extends \PHPUnit_Framework_TestCase
42 {
43 public function setUp()
70 public function testFactoryValidCall()
71 {
72 $serializer = Serializer::factory('PhpSerialize');
73 $this->assertTrue($serializer instanceof Adapter\PHPSerialize);
97 public function testChangeDefaultAdapterWithInstance()
98 {
99 $newAdapter = new Adapter\PhpSerialize();
101 Serializer::setDefaultAdapter($newAdapter);
widget_m.php (https://github.com/ekoisa/pyrocms.git) PHP · 332 lines
1 <?php defined('BASEPATH') OR exit('No direct script access allowed');
2 /**
3 * Model to handle widgets
29 if ($result)
30 {
31 $this->unserialize_fields($result);
32 }
49 if ($result)
50 {
51 array_map(array($this, 'unserialize_fields'), $result);
52 }
75 if ($result)
76 {
77 array_map(array($this, 'unserialize_fields'), $result);
78 }
JsonTest.php (https://github.com/zucchi/zf2.git) PHP · 165 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
19 * @group Zend_Serializer
20 */
21 class JsonTest extends \PHPUnit_Framework_TestCase
22 {
23 /**
97 }
99 public function testUnserializeString()
100 {
101 $value = '"test"';
102 $expected = 'test';
104 $data = $this->adapter->unserialize($value);
105 $this->assertEquals($expected, $data);
106 }
AclTest.php (https://gitlab.com/Isaki/le331.fr) PHP · 206 lines
1 <?php
3 /**
183 }
185 public function testSerializeUnserialize()
186 {
187 $collection = new \PropelObjectCollection();
197 $acl = new Acl($collection, $this->getAclObjectIdentity(), new PermissionGrantingStrategy());
198 $serialized = serialize($acl);
199 $unserialized = unserialize($serialized);
201 $this->assertNotEmpty($serialized);
202 $this->assertNotEmpty($unserialized);
203 $this->assertInstanceOf('Propel\PropelBundle\Security\Acl\Domain\Acl', $unserialized);
Sql.php (https://github.com/finger2000/horde.git) PHP · 319 lines
1 <?php
2 /**
3 * Ingo_Storage_Filters_Sql is the object used to hold user-defined filtering
5 *
6 * See the enclosed file LICENSE for license information (ASL). If you
7 * did not receive this file, see http://www.horde.org/licenses/asl.php.
8 *
9 * @author Jan Schneider <jan@horde.org>
61 'action-value' => Horde_String::convertCharset($row['rule_value'], $this->_params['charset'], 'UTF-8'),
62 'flags' => (int)$row['rule_flags'],
63 'conditions' => empty($row['rule_conditions']) ? null : Horde_String::convertCharset(unserialize($row['rule_conditions']), $this->_params['charset'], 'UTF-8'),
64 'combine' => (int)$row['rule_combine'],
65 'stop' => (bool)$row['rule_stop'],
70 if (empty($data) && !$readonly) {
71 $data = @unserialize($GLOBALS['prefs']->getDefault('rules'));
72 if ($data) {
73 foreach ($data as $val) {
Serializer.php (https://github.com/kennethjiang/Wolke.git) PHP · 171 lines
1 <?php
3 class HTMLPurifier_DefinitionCache_Serializer extends
31 $file = $this->generateFilePath($config);
32 if (!file_exists($file)) return false;
33 return unserialize(file_get_contents($file));
34 }
152 $chmod = '775';
153 } else {
154 // PHP's probably running as nobody, so we'll
155 // need to give global permissions
156 $chmod = '777';
phpserializer.js (https://gitlab.com/ign/bahra) JavaScript · 324 lines
1 /* phpserializer.js - JavaScript to PHP serialize / unserialize class.
2 *
3 * This class is designed to convert php variables to javascript
4 * and javascript variables to php with a php serialize unserialize
5 * compatible way.
6 *
182 }
184 function unserialize(ss) {
185 var p = 0, ht = [], hv = 1; r = null;
186 function unser_null() {
234 default: return false;
235 }
236 a[k] = __unserialize();
237 }
238 p++;
ServiceDescription.php (https://bitbucket.org/cesarmedrano/cesarmedrano.git) PHP · 329 lines
AclCache.php (https://gitlab.com/cuza/Clinic_Recods) PHP · 239 lines
1 <?php
3 namespace Doctrine\Bundle\DoctrineCacheBundle\Acl\Model;
127 /**
128 * Unserialize a given ACL.
129 *
130 * @param string $serialized
132 * @return \Symfony\Component\Security\Acl\Model\AclInterface
133 */
134 private function unserializeAcl($serialized)
135 {
136 $acl = unserialize($serialized);
235 $serialized = $this->cache->fetch($key);
237 return $this->unserializeAcl($serialized);
238 }
239 }
XCache_xcache.php (https://bitbucket.org/xperez/xcache.git) PHP · 197 lines
1 <?php
2 /**
3 * XCache XCache Caching Class
60 return TRUE;
62 return unserialize($cache);
64 }
173 if ( ! extension_loaded('xcache') OR ini_get('xcache.size') == "0")
174 {
175 self::logMessage('error', 'The XCACHE PHP extension must be loaded to use XCache Cache.');
176 return FALSE;
177 }
193 // End Class
195 /* End of file Cache_memcache.php */
196 /* Location: ./system/libraries/Cache/drivers/Cache_dummy.php */
PredisStore.php (https://gitlab.com/BeS/io.schiessle.org) PHP · 211 lines
1 <?php
3 /**
4 * Supplies Redis server store backend for OpenID servers and consumers.
5 * Uses Predis library {@see https://github.com/nrk/predis}.
6 * Requires PHP >= 5.3.
7 *
8 * LICENSE: See the COPYING file included in this distribution.
18 * Import the interface for creating a new store class.
19 */
20 require_once 'Auth/OpenID/Interface.php';
22 /**
23 * Supplies Redis server store backend for OpenID servers and consumers.
24 * Uses Predis library {@see https://github.com/nrk/predis}.
25 * Requires PHP >= 5.3.
26 *
27 * @package OpenID
Session.class.php (https://gitlab.com/llwhois/woaimm) PHP · 628 lines
1 <?php
2 // +----------------------------------------------------------------------
3 // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
4 // +----------------------------------------------------------------------
5 // | Copyright (c) 2006-2012 http://thinkphp.cn All rights reserved.
6 // +----------------------------------------------------------------------
7 // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
9 // | Author: liu21st <liu21st@gmail.com>
10 // +----------------------------------------------------------------------
11 // $Id: Session.class.php 2702 2012-02-02 12:35:01Z liu21st $
13 define("HTTP_SESSION_STARTED", 1);
22 * @subpackage Util
23 * @author liu21st <liu21st@gmail.com>
24 * @version $Id: Session.class.php 2702 2012-02-02 12:35:01Z liu21st $
25 +------------------------------------------------------------------------------
26 */
Response.php (https://bitbucket.org/Alex_PK/tasty.git) PHP · 359 lines
Chain.php (https://github.com/proyectoalba/alba.git) PHP · 223 lines
1 <?php
2 /*
3 * $Id$
17 * This software consists of voluntary contributions made by many individuals
18 * and is licensed under the LGPL. For more information, see
19 * <http://www.phpdoctrine.org>.
20 */
28 * @subpackage Record
29 * @author Konsta Vesterinen <kvesteri@cc.hut.fi>
30 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
31 * @link www.phpdoctrine.org
103 }
105 public function preUnserialize(Doctrine_Event $event)
106 {
107 foreach ($this->_listeners as $listener) {
RevisionTest.php (https://gitlab.com/link233/bootmw) PHP · 493 lines
1 <?php
3 /**
71 */
72 public function testGetRevisionTextGzip() {
73 $this->checkPHPExtension( 'zlib' );
75 $row = new stdClass;
111 */
112 public function testGetRevisionTextUtf8NativeGzip() {
113 $this->checkPHPExtension( 'zlib' );
115 $row = new stdClass;
126 */
127 public function testGetRevisionTextUtf8LegacyGzip() {
128 $this->checkPHPExtension( 'zlib' );
130 $row = new stdClass;
TokenUtils.php (https://gitlab.com/iamgraeme/royalmile) PHP · 300 lines
1 <?php
2 namespace WebSharks\ZenCache;
35 } else { // For the current blog ID.
36 $token = $self->domainMappingUrlFilter($self->currentUrl());
37 $token = $self->parseUrl($token, PHP_URL_HOST);
38 }
39 }
156 $self->hostDirToken = function ($dashify = false, $consider_domain_mapping = false, $path = null) use ($self) {
157 if (!isset($path)) { // Use current/default path?
158 $path = (string) $self->parseUrl($_SERVER['REQUEST_URI'], PHP_URL_PATH);
159 }
160 $path = '/'.ltrim((string) $path, '/'); // Force leading slash.
185 if ($token !== '/') { // Perhaps NOT the main site?
186 $blog_paths_file = $self->cacheDir().'/'.strtolower(SHORT_NAME).'-blog-paths';
187 if (!is_file($blog_paths_file) || !in_array($token, unserialize(file_get_contents($blog_paths_file)), true)) {
188 $token = '/'; // NOT a real/valid child blog path.
189 }
Entry.php (https://github.com/Exercise/symfony.git) PHP · 208 lines
tourinfrance_fonctions.php (https://bitbucket.org/pombredanne/spip-zone-treemap.git) PHP · 216 lines
1 <?php
2 function traiter_donnees_tourinfrance($url_flux, $id_flux, $infos_flux, $update_flux=false) {
6 $xml = simplexml_load_file($url_flux);
8 $tab_infos_flux = unserialize($infos_flux);
75 function inserer_donnees_tourinfrance($id_flux, $commun_srlz, $extra_srlz) {
77 $commun = unserialize($commun_srlz);
78 $extra = unserialize($extra_srlz);
BigInt.php (https://github.com/grandison/budo16.git) PHP · 313 lines
18 * @author Alexander Valyalkin <valyala@gmail.com>
19 * @copyright 2005, 2006 Alexander Valyalkin
20 * @license http://www.php.net/license/3_0.txt PHP License 3.0
21 * @version 1.2.0b
22 * @link http://pear.php.net/package/Crypt_RSA
28 * Provides set of math functions, which are used by Crypt_RSA package
29 * This class is a wrapper for big_int PECL extension,
30 * which could be loaded from http://pecl.php.net/packages/big_int
31 *
32 * @category Encryption
34 * @author Alexander Valyalkin <valyala@gmail.com>
35 * @copyright 2005, 2006 Alexander Valyalkin
36 * @license http://www.php.net/license/3_0.txt PHP License 3.0
37 * @link http://pear.php.net/package/Crypt_RSA
60 {
61 if (!extension_loaded('big_int')) {
62 if (!@dl('big_int.' . PHP_SHLIB_SUFFIX) && !@dl('php_big_int.' . PHP_SHLIB_SUFFIX)) {
63 // cannot load big_int extension
64 $this->errstr = 'Crypt_RSA package requires big_int PECL package. ' .
PREPAID.php (https://github.com/axxtel/agilebill.git) PHP · 154 lines
1 <?php
3 /**
19 */
21 require_once PATH_MODULES.'voip/base_voip_plugin.inc.php';
23 class plgn_prov_PREPAID extends base_voip_plugin
38 {
39 // check if prepaid type is ani or pin, if so, escape:
40 $unserial = unserialize($product->fields['prod_plugin_data']);
41 if(!empty($unserial['type']) && ( $unserial['type']=='ani' || $unserial['type']=='pin' ) ) return true;
63 {
64 # todo: check that the pin is random!
65 include_once(PATH_MODULES.'voip_prepaid/voip_prepaid.inc.php');
66 $prepaid= new voip_prepaid;
DoctrineAclCache.php (https://github.com/nattaphat/hgis.git) PHP · 223 lines
File.php (https://gitlab.com/unofficial-mirrors/moodle) PHP · 164 lines
1 <?php
2 /**
3 * SimplePie
4 *
5 * A PHP-Based RSS and Atom Feed Framework.
6 * Takes the hard work out of managing a complete RSS/Atom solution.
7 *
39 * @author Ryan McCue
40 * @link http://simplepie.org/ SimplePie
41 * @license http://www.opensource.org/licenses/bsd-license.php BSD License
42 */
124 if (file_exists($this->name) && is_readable($this->name))
125 {
126 return unserialize(file_get_contents($this->name));
127 }
128 return false;
User.php (https://github.com/intraweb-modules13/IWmenu.git) PHP · 100 lines
1 <?php
3 class IWmenu_Api_User extends Zikula_AbstractApi {
38 $sv = ModUtil::func('IWmain', 'user', 'genSecurityValue');
40 $iconbase = 'index.php?module=IWmenu&func=getFile&fileName=' . ModUtil::getVar('IWmenu', 'imagedir') . '/';
42 $menuitems = Array();
45 $currentLang = ZLanguage::getLanguageCode();
46 foreach ($items as $item) {
47 $itemTextArray = unserialize($item['text']);
48 $item['text'] = (isset($itemTextArray[$currentLang])) ? $itemTextArray[$currentLang] : '';
49 $itemUrlArray = unserialize($item['url']);
76 $url = str_replace('?', '**', $item['url']);
77 $url = str_replace('&', '*', $url);
78 $menuitem['url'] = 'index.php?module=IWwebbox&url=' . $url;
79 $menuitem['target'] = '';
80 } else {
Field.php (https://github.com/quickapps-fr/QuickApps-CMS.git) PHP · 212 lines
1 <?php
2 /**
3 * Field Model
4 *
5 * PHP version 5
6 *
7 * @package QuickApps.Plugin.Field.Model
60 public function beforeSave() {
61 if (isset($this->data['Field']['field_module'])) {
62 $this->data['Field']['settings'] = @unserialize($this->data['Field']['settings']);
63 $before = $this->hook("{$this->data['Field']['field_module']}_before_save_instance", $this);
64 $this->data['Field']['settings'] = !is_array($this->data['Field']['settings']) ? array() : $this->data['Field']['settings'];
Token.php (https://github.com/noelg/symfony-sandbox.git) PHP · 269 lines
monitoring_result.php (https://gitlab.com/Rad1calDreamer/honey) PHP · 394 lines
CapacitanceTest.php (https://github.com/bhaumik25/zend-framework.git) PHP · 382 lines
1 <?php
2 /**
3 * @package Zend_Measure
9 * Zend_Measure_Capacitance
10 */
11 require_once 'Zend/Measure/Capacitance.php';
13 /**
14 * PHPUnit test case
15 */
16 require_once 'PHPUnit/Framework/TestCase.php';
21 * @subpackage UnitTests
22 */
23 class Zend_Measure_CapacitanceTest extends PHPUnit_Framework_TestCase
24 {
revisions_administrations.php (https://bitbucket.org/pombredanne/spip-zone-treemap.git) PHP · 106 lines
sfNamespacedParameterHolder.class.php (https://github.com/bheneka/gitta.git) PHP · 384 lines
1 <?php
3 /*
33 * The default namespace may be overridden at initialization as follows:
34 * <code>
35 * <?php
36 * $mySpecialPH = new sfNamespacedParameterHolder('symfony/special');
37 * ?>
372 /**
373 * Unserializes a sfNamespacedParameterHolder instance.
374 *
375 * @param string $serialized A serialized sfNamespacedParameterHolder instance
376 */
377 public function unserialize($serialized)
378 {
379 $data = unserialize($serialized);
Preference.php (https://github.com/reoring/sabel.git) PHP · 282 lines
1 <?php
3 /**
9 * @author Mori Reo <mori.reo@sabel.jp>
10 * @copyright 2004-2008 Mori Reo <mori.reo@sabel.jp>
11 * @license http://www.opensource.org/licenses/bsd-license.php BSD License
12 */
13 class Sabel_Preference
219 }
221 return unserialize($this->backend->get($key));
222 }
247 }
249 return unserialize(base64_decode($this->backend->get($key)));
250 }
Serializer.php (https://github.com/udotelaar/zf2.git) PHP · 352 lines
1 <?php
2 /**
3 * Zend Framework
137 $serializer = $options->getSerializer();
138 $result = $event->getResult();
139 $result = $serializer->unserialize($result);
140 $event->setResult($result);
141 }
153 $result = $event->getResult();
154 foreach ($result as &$value) {
155 $value = $serializer->unserialize($value);
156 }
157 $event->setResult($result);
170 $item = $event->getResult();
171 if (isset($item['value'])) {
172 $item['value'] = $serializer->unserialize($item['value']);
173 }
174 $event->setResult($item);
db.kvdriver.php (git://github.com/jelix/jelix.git) PHP · 324 lines
1 <?php
2 /**
3 * @package jelix
79 foreach ($rs as $rec) {
80 $result[$rec->k_key] = unserialize($rs->unescapeBin($rec->k_value));
81 }
94 }
96 return unserialize($rs->unescapeBin($result->k_value));
97 }
195 return false;
196 }
197 $value = unserialize($rs->unescapeBin($rec->k_value)).$value;
198 $sql = 'UPDATE '.$table.' SET k_value= '.$this->_connection->quote2(serialize($value), false, true).' WHERE k_key='.$key;
199 if ($this->_connection->exec($sql)) {
mmcontroller.php (https://github.com/vmen015/Victor.git) PHP · 154 lines
1 <?php
3 class mmcontroller extends controller {
133 if ($this->cache_refresh || $feed === false) {
134 $ch = curl_init();
135 // curl_setopt($ch, CURLOPT_URL, "http://pipes.yahoo.com/pipes/pipe.run?_id=0c92b34341bb61e94f06e4cf8839537c&_render=php");
136 curl_setopt($ch, CURLOPT_URL, $this->config['yahooblogfeeds'][$which]);
137 curl_setopt($ch, CURLOPT_HEADER, 0);
144 }
146 $this->data['blogfeed'] = unserialize($feed);
147 } else {
148 $this->data['blogfeed'] = array();
query.php
(http://forceworkbench.googlecode.com/svn/trunk/workbench/)
PHP · 996 lines
✨ Summary
This PHP code is part of a Salesforce Workbench application, handling query-related functionality. It generates query results, exports data to CSV, and allows users to execute queries asynchronously. The code also handles errors, warnings, and export options, providing a user-friendly interface for interacting with Salesforce data.
This PHP code is part of a Salesforce Workbench application, handling query-related functionality. It generates query results, exports data to CSV, and allows users to execute queries asynchronously. The code also handles errors, warnings, and export options, providing a user-friendly interface for interacting with Salesforce data.
65 //query is processed by the correct function
66 if (isset($_POST['queryMore']) && isset($_SESSION['queryLocator'])) {
67 require_once 'header.php';
68 // $queryRequest->setExportTo('screen');
69 displayQueryForm($queryRequest);
102 }
103 } else {
104 require_once 'header.php';
105 if ($queryRequest->getExportTo() == null) $queryRequest->setExportTo('screen');
106 $queryRequest->setQueryAction('Query');
937 if ($records) {
938 try {
939 $csvFile = fopen('php://output','w') or die("Error opening php://output");
940 $csvFilename = "export" . date('YmdHis') . ".csv";
941 header("Content-Type: application/csv");