100+ results for 'php var_export'
Not the results you expected?
persistent_object_property.php (https://github.com/kamarulismail/kamarul-playground.git) PHP · 261 lines
24 * the PHP object.
25 * @property int $propertyType
26 * The type of the PHP property. See class constants PHP_TYPE_*.
27 * @property ezcPersistentPropertyConverter|null $converter
28 * A converter object that will automatically perform converters on
40 {
42 const PHP_TYPE_STRING = 1;
43 const PHP_TYPE_INT = 2;
46 const PHP_TYPE_OBJECT = 5;
47 const PHP_TYPE_BOOL = 6;
49 /**
68 * $propertyName to the name of the PHP object property it refers to.
69 * The $type defines the type of the resulting PHP property, the database
70 * value will be casted accordingly after load.
71 *
XmlDescriptor.php (https://gitlab.com/madwanz64/laravel) PHP · 231 lines
1 <?php
3 /*
188 $objectXML->appendChild($defaultsXML = $dom->createElement('defaults'));
189 $defaults = \is_array($argument->getDefault()) ? $argument->getDefault() : (\is_bool($argument->getDefault()) ? [var_export($argument->getDefault(), true)] : ($argument->getDefault() ? [$argument->getDefault()] : []));
190 foreach ($defaults as $default) {
191 $defaultsXML->appendChild($defaultXML = $dom->createElement('default'));
217 if ($option->acceptValue()) {
218 $defaults = \is_array($option->getDefault()) ? $option->getDefault() : (\is_bool($option->getDefault()) ? [var_export($option->getDefault(), true)] : ($option->getDefault() ? [$option->getDefault()] : []));
219 $objectXML->appendChild($defaultsXML = $dom->createElement('defaults'));
ImageSizeTest.php (https://github.com/agelang/zf2.git) PHP · 205 lines
ImageSizeTest.php (https://github.com/WebTricks/WebTricks-CMS.git) PHP · 248 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: ImageSizeTest.php 22668 2010-07-25 14:50:46Z thomas $
21 */
23 // Call Zend_Validate_File_ImageSizeTest::main() if this source file is executed directly.
24 if (!defined("PHPUnit_MAIN_METHOD")) {
25 define("PHPUnit_MAIN_METHOD", "Zend_Validate_File_ImageSizeTest::main");
29 * Test helper
30 */
31 require_once dirname(__FILE__) . '/../../../TestHelper.php';
33 /**
FilesSizeTest.php (https://github.com/WebTricks/WebTricks-CMS.git) PHP · 235 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: FilesSizeTest.php 20454 2010-01-20 22:50:59Z thomas $
21 */
23 // Call Zend_Validate_File_FilesSizeTest::main() if this source file is executed directly.
24 if (!defined("PHPUnit_MAIN_METHOD")) {
25 define("PHPUnit_MAIN_METHOD", "Zend_Validate_File_FilesSizeTest::main");
29 * Test helper
30 */
31 require_once dirname(__FILE__) . '/../../../TestHelper.php';
33 /**
MimeTypeTest.php (https://github.com/bate/zf2.git) PHP · 259 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
61 $expected,
62 $validator->isValid($filetest, $files),
63 "Test expected " . var_export($expected, 1) . " with " . var_export($options, 1)
64 . "\nMessages: " . var_export($validator->getMessages(), 1)
194 $expected,
195 $validator->isValid($filetest, $files),
196 "Test expected " . var_export($expected, 1) . " with " . var_export($options, 1)
197 . "\nMessages: " . var_export($validator->getMessages(), 1)
203 $expected,
204 $validator->isValid($filetest, $files),
205 "Test expected " . var_export($expected, 1) . " with " . var_export($options, 1)
206 . "\nMessages: " . var_export($validator->getMessages(), 1)
TestCase.php (https://github.com/shevron/zf2.git) PHP · 330 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
14 use Zend\Config\Config;
15 use Zend\Cloud\QueueService\Factory,
16 PHPUnit_Framework_TestCase as PHPUnitTestCase;
18 /**
24 * @subpackage UnitTests
25 */
26 abstract class TestCase extends PHPUnitTestCase
27 {
28 /**
91 try {
92 $messages = $this->_commonQueue->receiveMessages($queueURL);
93 $this->fail('An exception should have been thrown if the queue has been deleted; received ' . var_export($messages, 1));
94 } catch (\Zend\Cloud\QueueService\Exception\ExceptionInterface $e) {
95 $this->assertTrue(true);
Serializer.php (https://bitbucket.org/hill2steve/mobileroom.git) PHP · 291 lines
smarty_internal_compile_foreach.php (https://github.com/usualoma/movabletype.git) PHP · 343 lines
1 <?php
2 /**
3 * Smarty Internal Plugin Compile Foreach
198 $compiler->nocache = $compiler->nocache | $compiler->tag_nocache;
199 // generate output code
200 $output = "<?php\n";
201 $output .= "\$_from = \$_smarty_tpl->smarty->ext->_foreach->init(\$_smarty_tpl, $from, " .
202 var_export($item, true);
203 if ($name || $needTotal || $key) {
204 $output .= ', ' . var_export($needTotal, true);
205 }
206 if ($name || $key) {
208 }
209 if ($name) {
210 $output .= ', ' . var_export($name, true) . ', ' . var_export($namedAttr, true);
211 }
212 $output .= ");\n";
teilgewaesserbenutzungen.php (https://github.com/srahn/kvwmap.git) PHP · 352 lines
1 <?php
2 class Teilgewaesserbenutzungen extends WrPgObject {
184 $this->log->log_info('*** Teilgewaesserbenutzungen->getEntgeltsatz ***');
186 $this->log->log_debug('artBenutzungId: ' . var_export($artBenutzungId, true));
187 $this->log->log_debug('befreit: ' . var_export($befreit, true));
188 $this->log->log_debug('zugelassen: ' . var_export($zugelassen, true));
189 $this->log->log_debug('ermaessigt: ' . var_export($ermaessigt, true));
284 // print_r($teilgewaesserbenutzung_value_array);
285 $this->log->log_debug('teilgewaesserbenutzung_value_array: ' . var_export($teilgewaesserbenutzung_value_array, true));
287 return $this->create(
BaseReportAnswer.php (https://github.com/mori-dev/emacs-symfony.git) PHP · 488 lines
1 <?php
57 } elseif (!is_int($this->created_at)) {
58 $ts = strtotime($this->created_at);
59 if ($ts === -1 || $ts === false) { throw new PropelException("Unable to parse value of [created_at] as date/time value: " . var_export($this->created_at, true));
60 }
61 } else {
105 if ($v !== null && !is_int($v)) {
106 $ts = strtotime($v);
107 if ($ts === -1 || $ts === false) { throw new PropelException("Unable to parse date/time value for [created_at] from input: " . var_export($v, true));
108 }
109 } else {
284 public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
285 {
286 $pos = ReportAnswerPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
NullTest.php (https://github.com/zucchi/zf2.git) PHP · 294 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
19 * @group Zend_Filter
20 */
21 class NullTest extends \PHPUnit_Framework_TestCase
22 {
23 public function testConstructorOptions()
60 $message = sprintf(
61 '%s (%s) is not filtered as %s; type = %s',
62 var_export($value, true),
63 gettype($value),
64 var_export($expected, true),
82 $message = sprintf(
83 '%s (%s) is not filtered as %s; type = %s',
84 var_export($value, true),
85 gettype($value),
86 var_export($expected, true),
ImageSizeTest.php (https://bitbucket.org/Dal-Papa/is-340-publish-base.git) PHP · 243 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: ImageSizeTest.php 24593 2012-01-05 20:35:02Z matthew $
21 */
23 // Call Zend_Validate_File_ImageSizeTest::main() if this source file is executed directly.
24 if (!defined("PHPUnit_MAIN_METHOD")) {
25 define("PHPUnit_MAIN_METHOD", "Zend_Validate_File_ImageSizeTest::main");
29 * @see Zend_Validate_File_ImageSize
30 */
31 require_once 'Zend/Validate/File/ImageSize.php';
33 /**
RouterDebugCommand.php (https://github.com/nattaphat/hgis.git) PHP · 192 lines
Writer.php (https://gitlab.com/xolotsoft/pumasruiz) PHP · 311 lines
1 <?php namespace Illuminate\Log;
3 use Closure;
296 if (is_array($parameters[0]))
297 {
298 $parameters[0] = var_export($parameters[0], true);
299 }
300 elseif ($parameters[0] instanceof JsonableInterface)
304 elseif ($parameters[0] instanceof ArrayableInterface)
305 {
306 $parameters[0] = var_export($parameters[0]->toArray(), true);
307 }
308 }
SearchService.php (https://gitlab.com/contextualcode/symfony-ez5-search-bundle) PHP · 428 lines
1 <?php
2 namespace ThinkCreative\SearchBundle\Services;
3 use ThinkCreative\SearchBundle\Solr\SolrQuery;
222 default:
223 if ($facetField->field()) {
224 $facetField->param("f." . $facetField->field() . ".facet.{$ffKey}", var_export($ffValue, true));
225 } else {
226 $facetField->param("facet.{$ffKey}", var_export($ffValue, true));
FilesSizeTest.php (https://github.com/leerbag/zf2.git) PHP · 202 lines
1 <?php
2 /**
3 * Zend Framework
35 * @group Zend_Validator
36 */
37 class FilesSizeTest extends \PHPUnit_Framework_TestCase
38 {
39 public function setUp()
64 $element[1],
65 $validator->isValid(__DIR__ . '/_files/testsize.mo'),
66 "Tested with " . var_export($element, 1)
67 );
68 $this->assertEquals(
69 $element[2],
70 $validator->isValid(__DIR__ . '/_files/testsize2.mo'),
71 "Tested with " . var_export($element, 1)
72 );
73 $this->assertEquals(
MethodScanner.php (https://github.com/noose/zf2.git) PHP · 332 lines
debug.php (https://github.com/ameximes/akelos.git) PHP · 127 lines
1 <?php
3 # This file is part of the Akelos Framework
34 }elseif(AK_DEV_MODE){
35 $result = "\n".
36 str_replace("\n"," ",var_export($this->_Model->getAttributes(),true));
37 $result .= "\n";
38 echo $result;
53 public function dbugging($trace_this_on_debug_mode = null) {
54 if(!empty($this->_Model->getAdapter()->debug) && !empty($trace_this_on_debug_mode)){
55 $message = !is_scalar($trace_this_on_debug_mode) ? var_export($trace_this_on_debug_mode, true) : (string)$trace_this_on_debug_mode;
56 AkDebug::trace($message);
57 }
Resolver.php (https://github.com/eugenix/phpreflector.git) PHP · 278 lines
Serializer.php (https://gitlab.com/pr0055/symfonypizza) PHP · 285 lines
ImageSizeTest.php (https://github.com/nbcutech/o3drupal.git) PHP · 243 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: ImageSizeTest.php 23775 2011-03-01 17:25:24Z ralph $
21 */
23 // Call Zend_Validate_File_ImageSizeTest::main() if this source file is executed directly.
24 if (!defined("PHPUnit_MAIN_METHOD")) {
25 define("PHPUnit_MAIN_METHOD", "Zend_Validate_File_ImageSizeTest::main");
29 * @see Zend_Validate_File_ImageSize
30 */
31 require_once 'Zend/Validate/File/ImageSize.php';
33 /**
BaseBuilder.php (https://github.com/activeingredient/AdmingeneratorGeneratorBundle.git) PHP · 343 lines
1 <?php
3 namespace Admingenerator\GeneratorBundle\Builder;
22 abstract class BaseBuilder implements BuilderInterface
23 {
24 const TWIG_EXTENSION = '.php.twig';
26 /**
54 protected $twigFilters = array(
55 'addslashes',
56 'var_export',
57 'is_numeric',
58 'ucfirst',
70 /**
71 * (non-PHPdoc)
72 * @see Builder/Admingenerator\GeneratorBundle\Builder.BuilderInterface::__construct()
73 */
Method.php (https://gitlab.com/FSalazarH/WaitlessWeb) PHP · 220 lines
1 <?php
2 /**
3 * This file is part of phpDocumentor.
6 * file that was distributed with this source code.
7 *
8 * @copyright 2010-2015 Mike van Riel<mike@phpdoc.org>
9 * @license http://www.opensource.org/licenses/mit-license.php MIT
10 * @link http://phpdoc.org
11 */
13 namespace phpDocumentor\Reflection\DocBlock\Tags;
15 use phpDocumentor\Reflection\DocBlock\Description;
class.csstidy_csst.php (https://bitbucket.org/pombredanne/spip-zone-treemap.git) PHP · 135 lines
1 <?php
3 require_once 'class.Text_Diff_Renderer_parallel.php';
20 var $settings = array();
22 /** Expected var_export() output of $css->css[41] (no at block) */
23 var $expect = '';
123 'auto',
124 array(
125 explode("\n", $this->print?$this->expect:var_export($this->expect,true)),
126 explode("\n", $this->print?$this->actual:var_export($this->actual,true))
sjcycle.php (https://bitbucket.org/pombredanne/spip-zone-treemap.git) PHP · 129 lines
CaptchaTest.php (https://github.com/Exercise/zf2.git) PHP · 156 lines
1 <?php
2 /**
3 * Zend Framework
36 * @group Zend_Form
37 */
38 class CaptchaTest extends \PHPUnit_Framework_TestCase
39 {
40 public function setUp()
120 );
121 $valid = $this->form->isValid($data);
122 $this->assertTrue($valid, var_export($this->form->getMessages(), 1));
123 }
130 $decorators = $this->element->getDecorators();
131 $this->assertTrue(is_array($decorators));
132 $this->assertTrue(array_key_exists('Zend\Form\Decorator\Errors', $decorators), 'Missing Errors decorator' . var_export(array_keys($decorators), 1));
133 $this->assertTrue(array_key_exists('Zend\Form\Decorator\Description', $decorators), 'Missing Description decorator' . var_export(array_keys($decorators), 1));
1810.php (https://gitlab.com/iranjith4/hhvm) PHP · 325 lines
shared.php (https://github.com/rjdjohnston/core.git) PHP · 220 lines
1 <?php
3 class Check {
26 public static function warn ( $string ) { self::show_check_div( $string, 'warn' ); }
28 // Check the level of php available
29 public static function PHP ( $required ) {
31 Check::bad( "Your PHP version is too low, the minimum required is $required." );
32 else
33 Check::good( "PHP Version " . phpversion() . " meets requirement." );
34 }
36 public static function SettingValue ( $setting, $expected ) {
37 if( $expected != ini_get( $setting ) )
38 Check::bad( "PHP Setting '$setting' should be '". var_export( $expected, true ) . "'." );
39 else
40 Check::good( "PHP Setting '$setting' is '" . var_export( $expected, true ) ."'." );
ImageSizeTest.php (https://github.com/Exercise/zf2.git) PHP · 253 lines
1 <?php
2 /**
3 * Zend Framework
30 // Call Zend_Validate_File_ImageSizeTest::main() if this source file is executed directly.
31 if (!defined("PHPUnit_MAIN_METHOD")) {
32 define("PHPUnit_MAIN_METHOD", "Zend_Validate_File_ImageSizeTest::main");
49 * @group Zend_Validate
50 */
51 class ImageSizeTest extends \PHPUnit_Framework_TestCase
52 {
53 /**
58 public static function main()
59 {
60 $suite = new \PHPUnit_Framework_TestSuite("Zend_Validate_File_ImageSizeTest");
61 $result = \PHPUnit_TextUI_TestRunner::run($suite);
ExportPhparray.php (https://gitlab.com/luyxtran264/myproject) PHP · 242 lines
19 /**
20 * Handles the export for the PHP Array class
21 *
22 * @package PhpMyAdmin-Export
76 '<?php' . $GLOBALS['crlf']
77 . '/**' . $GLOBALS['crlf']
78 . ' * Export to PHP Array plugin for PHPMyAdmin' . $GLOBALS['crlf']
79 . ' * @version 0.2b' . $GLOBALS['crlf']
80 . ' */' . $GLOBALS['crlf'] . $GLOBALS['crlf']
184 // fix variable names (based on
185 // http://www.php.net/manual/language.variables.basics.php)
186 if (!preg_match(
187 '/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/',
Stream.php (https://gitlab.com/reasonat/test8) PHP · 245 lines
1 <?php
2 namespace GuzzleHttp\Psr7;
6 /**
7 * PHP stream implementation.
8 *
9 * @var $stream
199 } elseif (fseek($this->stream, $offset, $whence) === -1) {
200 throw new \RuntimeException('Unable to seek to stream position '
201 . $offset . ' with whence ' . var_export($whence, true));
202 }
203 }
ExistsTest.php (https://github.com/Exercise/zf2.git) PHP · 215 lines
1 <?php
2 /**
3 * Zend Framework
29 // Call Zend_Validate_File_ExistsTest::main() if this source file is executed directly.
30 if (!defined("PHPUnit_MAIN_METHOD")) {
31 define("PHPUnit_MAIN_METHOD", "Zend_Validate_File_ExistsTest::main");
50 * @group Zend_Validate
51 */
52 class ExistsTest extends \PHPUnit_Framework_TestCase
53 {
54 /**
59 public static function main()
60 {
61 $suite = new \PHPUnit_Framework_TestSuite("Zend_Validate_File_ExistsTest");
62 $result = \PHPUnit_TextUI_TestRunner::run($suite);
IsImageTest.php (https://bitbucket.org/sasezaki/mirror-zf1-standard-trunk-tests-validate-dir.git) PHP · 196 lines
1 <?php
2 /**
3 * Zend Framework
23 // Call Zend_Validate_File_IsImageTest::main() if this source file is executed directly.
24 if (!defined("PHPUnit_MAIN_METHOD")) {
25 define("PHPUnit_MAIN_METHOD", "Zend_Validate_File_IsImageTest::main");
29 * @see Zend_Validate_File_IsImage
30 */
31 require_once 'Zend/Validate/File/IsImage.php';
33 /**
41 * @group Zend_Validate
42 */
43 class Zend_Validate_File_IsImageTest extends PHPUnit_Framework_TestCase
44 {
45 /**
ProviderTest.php (https://github.com/emjliano/phly.git) PHP · 159 lines
1 <?php
2 /**
3 * Phly - PHp LibrarY
13 // Call Phly_PubSub_ProviderTest::main() if this source file is executed directly.
14 if (!defined("PHPUnit_MAIN_METHOD")) {
15 define("PHPUnit_MAIN_METHOD", "Phly_PubSub_ProviderTest::main");
19 * Test helper
20 */
21 require_once dirname(__FILE__) . '/../../TestHelper.php';
23 /**
24 * Phly_PubSub
25 */
26 require_once 'Phly/PubSub/Provider.php';
28 /**
Module.php (https://bitbucket.org/mrblackus/micro-muffin.git) PHP · 383 lines
1 <?php
3 /*
31 /**
32 * Compiles the node to PHP.
33 *
34 * @param Twig_Compiler A Twig_Compiler instance
48 if (!$this->getAttribute('index'))
49 {
50 $compiler->write('<?php');
51 }
131 $compiler
132 ->write("\n\n")
133 // if the filename contains */, add a blank to avoid a PHP parse error
134 ->write("/* " . str_replace('*/', '* /', $this->getAttribute('filename')) . " */\n")
135 ->write('class ' . $compiler->getEnvironment()->getTemplateClass($this->getAttribute('filename'), $this->getAttribute('index')))
ExcludeMimeTypeTest.php (https://github.com/mfairchild365/zf2.git) PHP · 139 lines
function.intl-is-failure.html (https://bitbucket.org/thncr/manuals.git) HTML · 109 lines
10 <div class="next" style="text-align: right; float: right;"><a href="book.mbstring.html">多字节字符串</a></div>
11 <div class="up"><a href="ref.intl.html">intl 函数</a></div>
12 <div class="home"><a href="index.html">PHP Manual</a></div>
13 </div><hr /><div id="function.intl-is-failure" class="refentry">
14 <div class="refnamediv">
15 <h1 class="refname">intl_is_failure</h1>
16 <p class="verinfo">(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)</p><p class="refpurpose"><span class="refname">intl_is_failure</span> — <span class="dc-title">Check whether the given error code indicates failure</span></p>
18 </div>
74 <div class="phpcode"><code><span style="color: #000000">
75 <span style="color: #0000BB"><?php<br /></span><span style="color: #007700">function </span><span style="color: #0000BB">check</span><span style="color: #007700">( </span><span style="color: #0000BB">$err_code </span><span style="color: #007700">)<br />{<br /> </span><span style="color: #0000BB">var_export</span><span style="color: #007700">( </span><span style="color: #0000BB">intl_is_failure</span><span style="color: #007700">( </span><span style="color: #0000BB">$err_code </span><span style="color: #007700">) );<br /> echo </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #0000BB">check</span><span style="color: #007700">( </span><span style="color: #0000BB">U_ZERO_ERROR </span><span style="color: #007700">);<br /></span><span style="color: #0000BB">check</span><span style="color: #007700">( </span><span style="color: #0000BB">U_USING_FALLBACK_WARNING </span><span style="color: #007700">);<br /></span><span style="color: #0000BB">check</span><span style="color: #007700">( </span><span style="color: #0000BB">U_ILLEGAL_ARGUMENT_ERROR </span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?></span>
76 </span>
77 </code></div>
106 <div class="next" style="text-align: right; float: right;"><a href="book.mbstring.html">多字节字符串</a></div>
107 <div class="up"><a href="ref.intl.html">intl 函数</a></div>
108 <div class="home"><a href="index.html">PHP Manual</a></div>
109 </div></body></html>
QueueBaseTest.php (https://github.com/mfairchild365/zf2.git) PHP · 249 lines
1 <?php
2 /**
3 * Zend Framework
43 * @group Zend_Queue
44 */
45 abstract class QueueBaseTest extends \PHPUnit_Framework_TestCase
46 {
47 protected function setUp()
175 // ------------------------------------ count()
176 $this->assertEquals($this->queue->count(), 1, var_export($this->queue->getAdapter()->getData(), 1));
178 // ------------------------------------ receive()
AkXmlRpcServer.php (https://github.com/akelos/v1.git) PHP · 174 lines
1 <?php
2 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
51 $api_method =& $api_methods[$k];
52 $public_name = AkInflector::variablize($api_method->public_name);
53 $signatures = var_export(array_merge($api_method->returns, $api_method->expects), true);
54 $documentation = var_export($this->_getDocumentationForMethod($api_method), true);
101 function _generateServerClassCode()
102 {
103 $this->_serverClassCode = "<?php
104 class {$this->options['dynamic_server_class_name']} extends AkIxrInstrospectionServer
105 {
130 {
131 $this->_generateServerClassCode();
132 eval('?>'.$this->_serverClassCode.'<?php ');
133 $Server =& new $this->options['dynamic_server_class_name'];
134 $this->_linkWebServicesToServer($Server);
hooks.php (https://github.com/SeanJA/php-hook.git) PHP · 242 lines
sfOAuth1.class.php (https://github.com/edse/Elastball.git) PHP · 383 lines
1 <?php
2 /**
3 *
161 /**
162 * (non-PHPdoc)
163 * @see plugins/sfDoctrineOAuthPlugin/lib/sfOAuth::requestAuth()
164 */
181 $this->getName(),
182 $this->getRequestAuthUrl(),
183 var_export($this->getAuthParameters(), true)
184 )
185 );
199 /**
200 * (non-PHPdoc)
201 * @see plugins/sfDoctrineOAuthPlugin/lib/sfOAuth::getAccessToken()
202 */
smarty_internal_compile_foreach.php (https://gitlab.com/webbroteam/satisfaction-mvc) PHP · 298 lines
1 <?php
2 /**
3 * Smarty Internal Plugin Compile Foreach
167 isset($namedAttr[ 'show' ]) || isset($itemAttr[ 'last' ]) || isset($namedAttr[ 'last' ]);
168 // generate output code
169 $output = "<?php\n";
170 $output .= "\$_from = \$_smarty_tpl->smarty->ext->_foreach->init(\$_smarty_tpl, $from, " .
171 var_export($item, true);
172 if ($name || $needTotal || $key) {
173 $output .= ', ' . var_export($needTotal, true);
174 }
175 if ($name || $key) {
177 }
178 if ($name) {
179 $output .= ', ' . var_export($name, true) . ', ' . var_export($namedAttr, true);
180 }
181 $output .= ");\n";
persistent_object_id_property.php (https://github.com/F5/zetacomponents.git) PHP · 253 lines
1 <?php
2 /**
3 * File containing the ezcPersistentObjectIdProperty class.
27 * Defines a persistent object id field.
28 *
29 * The column should be of type int both in PHP and in the database, usually.
30 * If you want to use a string ID, you need to use the {@link
31 * ezcPersistentManualGenerator} and set the ID property of the affected object
43 * value.
44 * @property string $propertyName The name of the PersistentObject property
45 * that holds the value in the PHP object.
46 * @property int $propertyType The type of the PHP property. See class
47 * constants ezcPersistentObjectProperty::PHP_TYPE_*.
48 * @property int $visibility The visibility of the property. This property is deprecated!
49 * @property ezcPersistentGeneratorDefinition $generator
Module.php (https://bitbucket.org/alessandro-aglietti/itis-leonardo-da-vinci.git) PHP · 372 lines
1 <?php
3 /*
32 /**
33 * Compiles the node to PHP.
34 *
35 * @param Twig_Compiler A Twig_Compiler instance
47 {
48 if (!$this->getAttribute('index')) {
49 $compiler->write('<?php');
50 }
124 $compiler
125 ->write("\n\n")
126 // if the filename contains */, add a blank to avoid a PHP parse error
127 ->write("/* ".str_replace('*/', '* /', $this->getAttribute('filename'))." */\n")
128 ->write('class '.$compiler->getEnvironment()->getTemplateClass($this->getAttribute('filename'), $this->getAttribute('index')))
Seccion.php (https://github.com/bng5/CMS.git) PHP · 112 lines
1 <?php
3 /**
4 *
5 * BackTrace
6 * admin secciones_const.php
7 *
8 * @author pablo
95 print_r($item);
96 }
97 file_put_contents(RUTA_CARPETA.'cms2/datos/seccion/'.$id.'.'.$leng_cod.'.php', "<?php\nreturn ".var_export($item, true).";\n?>");
98 }
99 }
106 */
107 public static function obtener($id, $leng_cod) {
108 return include(RUTA_CARPETA.'bng5/datos/seccion/'.$id.'.'.$leng_cod.'.php');
109 }
110 }
Node.php (https://gitlab.com/remyvianne/krowkaramel) PHP · 140 lines
1 <?php
2 namespace MailPoetVendor\Twig\Node;
3 if (!defined('ABSPATH')) exit;
28 $attributes = [];
29 foreach ($this->attributes as $name => $value) {
30 $attributes[] = \sprintf('%s: %s', $name, \str_replace("\n", '', \var_export($value, \true)));
31 }
32 $repr = [static::class . '(' . \implode(', ', $attributes)];
var_export.php (https://github.com/ameximes/akelos.git) PHP · 136 lines
8 // | that is bundled with this package in the file LICENSE, and is |
9 // | available at through the world-wide-web at |
10 // | http://www.php.net/license/3_0.txt. |
11 // | If you did not receive a copy of the PHP license and are unable to |
16 // +----------------------------------------------------------------------+
17 //
18 // $Id: var_export.php,v 1.15 2005/12/05 14:24:27 aidan Exp $
22 * Replace var_export()
23 *
24 * @category PHP
25 * @package PHP_Compat
26 * @link http://php.net/function.var_export
27 * @author Aidan Lister <aidan@php.net>
ClassMapGenerator.php (https://github.com/benja-M-1/composer.git) PHP · 145 lines
1 <?php
3 /*
35 }
37 file_put_contents($file, sprintf('<?php return %s;', var_export($maps, true)));
38 }
64 $path = $file->getRealPath();
66 if (pathinfo($path, PATHINFO_EXTENSION) !== 'php') {
67 continue;
68 }
97 throw new \RuntimeException('Could not scan for classes inside '.$path.": \n".$e->getMessage(), 0, $e);
98 }
99 $T_TRAIT = version_compare(PHP_VERSION, '5.4', '<') ? -1 : T_TRAIT;
101 $classes = array();
sfMondongoExtensionForms.php (https://github.com/pycmam/sfMondongoPlugin.git) PHP · 304 lines
1 <?php
3 /*
130 $widgets[$reference['field']] = array(
131 'class' => 'sfWidgetFormMondongoChoice',
132 'options' => var_export($options, true),
133 );
134 }
162 $validators[$reference['field']] = array(
163 'class' => 'sfValidatorMondongoChoice',
164 'options' => var_export($options, true),
165 );
166 }
PriorityQueueTest.php (https://github.com/cgmartin/zf2.git) PHP · 164 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
15 * @group Zend_Stdlib
16 */
17 class PriorityQueueTest extends \PHPUnit_Framework_TestCase
18 {
19 /**
46 $test[] = $item;
47 }
48 $this->assertSame($expected, $test, 'Expected: ' . var_export($expected, 1) . "\nReceived:" . var_export($test, 1));
49 }
58 );
59 $test = $this->queue->toArray();
60 $this->assertSame($expected, $test, var_export($test, 1));
61 }
objprof.php (https://gitlab.com/iranjith4/hhvm) PHP · 237 lines
6 function get_instances(string $cls, ?array $objs) {
7 if (!$objs) return 0;
8 return hphp_array_idx(hphp_array_idx($objs, $cls, array()), "instances", 0);
9 }
10 function get_bytes_eq(string $cls, ?array $objs) {
19 function get_bytes(string $cls, ?array $objs) {
20 if (!$objs) return 0;
21 return hphp_array_idx(hphp_array_idx($objs, $cls, array()), "bytes", 0);
22 }
23 function get_bytesd(string $cls, ?array $objs) {
24 if (!$objs) return 0;
25 return hphp_array_idx(hphp_array_idx($objs, $cls, array()),
26 "bytes_normalized", 0);
27 }
DotenvDumpCommand.php (https://github.com/stof/symfony.git) PHP · 122 lines
1 <?php
3 /*
23 /**
24 * A console command to compile .env files into a PHP-optimized file called .env.local.php.
25 *
26 * @internal
27 */
28 #[Autoconfigure(bind: ['$projectDir' => '%kernel.project_dir%', '$defaultEnv' => '%kernel.environment%'])]
29 #[AsCommand(name: 'dotenv:dump', description: 'Compiles .env files to .env.local.php')]
30 final class DotenvDumpCommand extends Command
31 {
52 ->addOption('empty', null, InputOption::VALUE_NONE, 'Ignore the content of .env files')
53 ->setHelp(<<<'EOT'
54 The <info>%command.name%</info> command compiles .env files into a PHP-optimized file called .env.local.php.
56 <info>%command.full_name%</info>
MimeTypeTest.php (https://github.com/bruisedlee/zf2.git) PHP · 270 lines
1 <?php
2 /**
3 * Zend Framework
76 $expected,
77 $validator->isValid($filetest, $files),
78 "Test expected " . var_export($expected, 1) . " with " . var_export($options, 1)
79 . "\nMessages: " . var_export($validator->getMessages(), 1)
205 $expected,
206 $validator->isValid($filetest, $files),
207 "Test expected " . var_export($expected, 1) . " with " . var_export($options, 1)
208 . "\nMessages: " . var_export($validator->getMessages(), 1)
214 $expected,
215 $validator->isValid($filetest, $files),
216 "Test expected " . var_export($expected, 1) . " with " . var_export($options, 1)
217 . "\nMessages: " . var_export($validator->getMessages(), 1)
ViewTest.php (https://github.com/zucchi/zf2.git) PHP · 293 lines
18 use Zend\View\Model\ViewModel;
19 use Zend\View\Model\JsonModel;
20 use Zend\View\Renderer\PhpRenderer;
21 use Zend\View\Renderer;
22 use Zend\View\Resolver;
78 $this->view->render($this->model);
80 $expected = var_export(new ViewVariables(array(
81 'parent' => 'node',
82 'child1' => var_export(array('foo' => 'bar'), true),
148 $expected = var_export(new ViewVariables(array(
149 'parent' => 'node',
150 'child1' => var_export(array('foo' => 'bar'), true),
151 'child2' => json_encode(array('bar' => 'baz')),
152 )), true);
237 'content' => __DIR__ . '/_templates/nested-view-model-content.phtml',
238 ));
239 $phpRenderer = new PhpRenderer();
240 $phpRenderer->setCanRenderTrees(true);
SignatureFormatter.php (https://gitlab.com/judielsm/Handora) PHP · 269 lines
1 <?php
3 /*
97 }
99 if (version_compare(PHP_VERSION, '5.4', '>=') && $reflector->isTrait()) {
100 $chunks[] = 'trait';
101 } else {
249 $value = $param->getDefaultValue();
250 $typeStyle = self::getTypeStyle($value);
251 $value = is_array($value) ? 'array()' : is_null($value) ? 'null' : var_export($value, true);
252 }
253 $default = sprintf(' = <%s>%s</%s>', $typeStyle, OutputFormatter::escape($value), $typeStyle);
ControllerTest.php (https://github.com/tine20/Tine-2.0-Open-Source-Groupware-and-CRM.git) PHP · 248 lines
1 <?php
2 /**
3 * Tine 2.0 - http://www.tine20.org
173 $syncrotonContact = $controller->getEntry(new Syncroton_Model_SyncCollection(array('collectionId' => $syncrotonFolder->serverId)), $serverId);
174 $this->fail('should have thrown Syncroton_Exception_NotFound: '
175 . var_export($syncrotonContact, TRUE)
176 . ' tine contact: ' . print_r(Addressbook_Controller_Contact::getInstance()->get($serverId)->toArray(), TRUE));
177 } catch (Syncroton_Exception_NotFound $senf) {
MethodScanner.php (https://github.com/brazza/zf2.git) PHP · 342 lines
account.php (https://github.com/Keilaron/TweetBeagle.git) PHP · 165 lines
1 <?php
3 class Controller_Account extends Controller_Template {
46 $requestToken = $ta->getRequestToken();
48 Log::debug(var_export($requestToken, true));
50 if ($requestToken)
104 $user = $ta->verifyCredentials();
106 Log::debug(var_export($accessToken, true));
108 Session::set('access_token', $accessToken);
163 }
165 /* End of file account.php */
Spawn.php (https://github.com/Spawnm/Spawn-Framework.git) PHP · 201 lines
1 <?php
2 /**
3 * Spawn Framework
41 /**
42 * load bootstrap.php
43 */
44 public function bootstrap($di)
137 if(Config::load('Uri')->get('base') != $base) {
138 $config = include(ROOT_PATH.'Bin/Config/Uri.php');
140 $config['base'] = $base;
141 Config::load('Uri')->set('base',$base);
143 $data = '<?php '.PHP_EOL.'return $config = '.var_export($config, true).';';
144 file_put_contents(ROOT_PATH.'Bin/Config/Uri.php', $data);
ProxyBuilder.php (https://gitlab.com/reasonat/test8) PHP · 352 lines
1 <?php
3 namespace Drupal\Component\ProxyBuilder;
84 // For cases in which the implemented interface is a child of another
85 // interface, getInterfaceNames() also returns the parent. This causes a
86 // PHP error.
87 // In order to avoid that, check for each interface, whether one of its
88 // parents is also in the list and exclude it.
275 if ($parameter->isDefaultValueAvailable()) {
276 $parameter_string .= ' = ';
277 $parameter_string .= var_export($parameter->getDefaultValue(), TRUE);
278 }
Actions.test.php (https://github.com/quarkness/piwik.git) PHP · 105 lines
1 <?php
2 if(!defined('PIWIK_CONFIG_TEST_INCLUDED'))
3 {
4 require_once dirname(__FILE__)."/../../../tests/config_test.php";
5 }
7 require_once 'Actions/Actions.php';
8 require_once 'Tracker/Action.php';
93 $expected = $test['expected'];
94 $processed = $action->public_getActionExplodedNames($params['name'],$params['type']);
95 $this->assertEqual($processed, $expected, "Processed: ".var_export($processed, true) . " | Expected: ". var_export($expected, true));
96 }
97 }
sfServiceContainerDumperGraphviz.php (https://github.com/xdade/diem.git) PHP · 222 lines
Serializer.php (https://github.com/Faianca/symfony.git) PHP · 252 lines
MethodScanner.php (https://github.com/cgmartin/zf2.git) PHP · 540 lines
ProviderRepository.php (https://gitlab.com/jjpa2018/dashboard) PHP · 210 lines
FSCache.php (https://github.com/JeCat/framework.git) PHP · 200 lines
1 <?php
2 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
3 // 这个文件是 JeCat PHP框架的一部分,该项目和此文件 均遵循 GNU 自由软件协议
6 //
7 //
8 // JeCat PHP框架 的正式全名是:Jellicle Cat PHP Framework。
9 // “Jellicle Cat”出自 Andrew Lloyd Webber的音乐剧《猫》(《Prologue:Jellicle Songs for Jellicle Cats》)。
10 // JeCat 是一个开源项目,它像音乐剧中的猫一样自由,你可以毫无顾忌地使用JCAT PHP框架。JCAT 由中国团队开发维护。
50 $sDataPath = $this->sFolderPrefix.trim($sDataPath,'/') ;
52 // 尝试 .php
53 if( is_file($sDataPath.'.php') )
75 else
76 {
77 $sSerialize = "<?php\r\nreturn ".var_export($data,true).' ;' ;
78 $sFilePath = $sDataPath.'.php' ;
Writer.php (https://gitlab.com/judielsm/Handora) PHP · 375 lines
Imap.php (https://github.com/pauln/moodle.git) PHP · 280 lines
1 <?php
3 /**
18 * limitations under the License.
19 *
20 * PHP Version 5
21 *
22 * @file CAS/ProxiedService/Imap.php
23 * @category Authentication
24 * @package PhpCAS
25 * @author Adam Franco <afranco@middlebury.edu>
26 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
27 * @link https://wiki.jasig.org/display/CASC/phpCAS
28 */
Manager.php (https://github.com/noose/zf2.git) PHP · 307 lines
1 <?php
3 namespace Zend\Module;
117 foreach ($module->getDependencies() as $dep => $depInfo) {
118 preg_match('/(<|lt|<=|le|>|gt|>=|ge|==|=|eq|!=|<>|ne)?(\d.*)/',$depInfo['version'], $matches, PREG_OFFSET_CAPTURE);
119 if ($dep === 'php') {
120 if (!version_compare(PHP_VERSION, $matches[2][0], $matches[1][0] ?: '>=')) {
127 } elseif (substr($dep, 0, 4) === 'ext/') {
128 $extName = substr($dep, 4);
129 if (!version_compare(phpversion($extName), $matches[2][0], $matches[1][0] ?: '>=')) {
130 if ($depInfo['required'] == true) {
131 throw new \RuntimeException("Required dependency unsatisfied: {$dep} {$depInfo['version']}");
301 protected function saveConfigCache($config)
302 {
303 $content = "<?php\nreturn " . var_export($config->toArray(), 1) . ';';
304 file_put_contents($this->getOptions()->getCacheFilePath(), $content);
305 return $this;
Serializer.php (https://github.com/1ed/symfony.git) PHP · 328 lines
Descriptor.php (https://gitlab.com/cuza/Clinic_Recods) PHP · 308 lines
RouteCollection.php (https://gitlab.com/vannh/portal_training) PHP · 305 lines
1 <?php
2 /**
3 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
4 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
5 *
9 *
10 * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
11 * @link http://cakephp.org CakePHP(tm) Project
12 * @since 3.0.0
13 * @license http://www.opensource.org/licenses/mit-license.php MIT License
255 }
256 }
257 throw new MissingRouteException(['url' => var_export($url, true), 'context' => $context]);
258 }
ApacheUrlMatcherTest.php (https://gitlab.com/xolotsoft/pumasruiz) PHP · 152 lines
Mysql.php (https://github.com/zeon/qpkg-piwik.git) PHP · 221 lines
1 <?php
2 /**
3 * Piwik - Open source web analytics
5 * @link http://piwik.org
6 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
7 * @version $Id: Mysql.php 2967 2010-08-20 15:12:43Z vipsoft $
8 *
9 * @category Piwik
67 $this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
68 // we may want to setAttribute(PDO::ATTR_TIMEOUT ) to a few seconds (default is 60) in case the DB is locked
69 // the piwik.php would stay waiting for the database... bad!
70 // we delete the password from this object "just in case" it could be printed
71 $this->password = '';
75 * on mysqlnd support, PHP version, and OS.
76 * see ZF-7428 and http://bugs.php.net/bug.php?id=47224
77 */
78 if(!empty($this->charset))
TestCase.php (https://github.com/jtai/zf2.git) PHP · 343 lines
1 <?php
2 /**
3 * Zend Framework
25 Zend\Config\Config,
26 Zend\Cloud\QueueService\Factory,
27 PHPUnit_Framework_TestCase as PHPUnitTestCase;
29 /**
37 * @license http://framework.zend.com/license/new-bsd New BSD License
38 */
39 abstract class TestCase extends PHPUnitTestCase
40 {
41 /**
104 try {
105 $messages = $this->_commonQueue->receiveMessages($queueURL);
106 $this->fail('An exception should have been thrown if the queue has been deleted; received ' . var_export($messages, 1));
107 } catch (\Zend\Cloud\QueueService\Exception $e) {
108 $this->assertTrue(true);
Drawer.php (https://bitbucket.org/hanutimes/hanutimes.git) PHP · 279 lines
HashTest.php (https://github.com/zucchi/zf2.git) PHP · 155 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
21 * @group Zend_Validator
22 */
23 class HashTest extends \PHPUnit_Framework_TestCase
24 {
25 /**
42 $element[1],
43 $validator->isValid(__DIR__ . '/_files/picture.jpg'),
44 "Tested with " . var_export($element, 1)
45 );
46 }
58 $element[1],
59 $validator->isValid(__DIR__ . '/_files/picture.jpg'),
60 "Tested with " . var_export($element, 1)
61 );
62 }
Builtin.php (https://bitbucket.org/211enterprises/laracing.git) PHP · 426 lines
1 <?php
3 class QuickBooks_XML_Backend_BuiltIn implements QuickBooks_XML_Backend
119 {
120 $errnum = QuickBooks_XML::ERROR_DANGLING;
121 $errmsg = 'XML stack still contains this after parsing: ' . var_export($stack, true);
122 return false;
123 }
341 {
342 $errnum = QuickBooks_XML::ERROR_DANGLING;
343 $errmsg = 'XML stack still contains this after parsing: ' . var_export($vstack, true);
344 return false;
345 }
Md5Test.php (https://bitbucket.org/Dal-Papa/is-340-publish-base.git) PHP · 208 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: Md5Test.php 24593 2012-01-05 20:35:02Z matthew $
21 */
23 // Call Zend_Validate_File_Md5Test::main() if this source file is executed directly.
24 if (!defined("PHPUnit_MAIN_METHOD")) {
25 define("PHPUnit_MAIN_METHOD", "Zend_Validate_File_Md5Test::main");
29 * @see Zend_Validate_File_Md5
30 */
31 require_once 'Zend/Validate/File/Md5.php';
33 /**
VariableTest.php (https://github.com/tokushima/rhaco1.git) PHP · 325 lines
1 <?php
2 Rhaco::import("lang.Variable");
3 Rhaco::import("lang.ObjectUtil");
13 $obj = ObjectUtil::mixin(new Dummy1(),new Dummy2(),array("calc",'$a,$b','return $a + $b;'));
15 if($this->assertTrue(is_object($obj),var_export($obj,true))){
16 $obj->id = 1;
17 $obj->value = "hoge";
29 $objmix = ObjectUtil::mixin($obj,new Dummy3());
31 if($this->assertTrue(is_object($objmix),var_export($obj,true))){
32 $this->assertEquals(">>>>1",$objmix->id());
33 $this->assertEquals("[hoge]",$objmix->value());
54 $obj = V::mixin(new Dummy1(),new Dummy2(),array("calc",'$a,$b','return $a + $b;'));
56 if($this->assertTrue(is_object($obj),var_export($obj,true))){
57 $obj->id = 1;
58 $obj->value = "hoge";
FunctionReflection.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 269 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
149 $argsLine = ($argument['type'] ? $argument['type'] . ' ' : '') . ($argument['by_ref'] ? '&' : '') . '$' . $name;
150 if (!$argument['required']) {
151 $argsLine .= ' = ' . var_export($argument['default'], true);
152 }
153 $args[] = $argsLine;
171 $phpReflections = parent::getParameters();
172 $zendReflections = array();
173 while ($phpReflections && ($phpReflection = array_shift($phpReflections))) {
174 $instance = new ParameterReflection($this->getName(), $phpReflection->getName());
175 $zendReflections[] = $instance;
176 unset($phpReflection);
177 }
178 unset($phpReflections);
PhpFileCacheTest.php (https://gitlab.com/techniconline/kmc) PHP · 179 lines
19 {
20 if (is_object($value) && !method_exists($value, '__set_state')) {
21 $this->markTestSkipped('PhpFileCache only allows objects that implement __set_state() and fully support var_export()');
22 }
45 {
46 if (is_object($value) && !method_exists($value, '__set_state')) {
47 $this->markTestSkipped('PhpFileCache only allows objects that implement __set_state() and fully support var_export()');
48 }
88 // update lifetime
89 $value['lifetime'] = $value['lifetime'] - 20;
90 file_put_contents($path, '<?php return unserialize(' . var_export(serialize($value), true) . ');');
92 // test expired data
Sha1Test.php (https://github.com/zucchi/zf2.git) PHP · 183 lines
WordCountTest.php (https://bitbucket.org/Dal-Papa/is-340-publish-base.git) PHP · 162 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: WordCountTest.php 24593 2012-01-05 20:35:02Z matthew $
21 */
23 // Call Zend_Validate_File_WordCountTest::main() if this source file is executed directly.
24 if (!defined("PHPUnit_MAIN_METHOD")) {
25 define("PHPUnit_MAIN_METHOD", "Zend_Validate_File_WordCountTest::main");
29 * @see Zend_Validate_File_WordCount
30 */
31 require_once 'Zend/Validate/File/WordCount.php';
33 /**
request.php (https://bitbucket.org/crevillo/enetcall.git) PHP · 209 lines
1 <?php
2 /**
3 * File containing the ezcMvcRequest class
190 * array('member_name'=>value).
191 *
192 * __set_state makes this class exportable with var_export.
193 * var_export() generates code, that calls this method when it
194 * is parsed with PHP.
195 *
196 * @param array(string=>mixed) $array
Md5Test.php (https://github.com/sidealice/zf2.git) PHP · 202 lines
FileCacheReader.php (https://bitbucket.org/alessandro-aglietti/itis-leonardo-da-vinci.git) PHP · 258 lines
1 <?php
2 /*
3 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
86 }
88 $path = $this->dir.'/'.strtr($key, '\\', '-').'.cache.php';
89 if (!file_exists($path)) {
90 $annot = $this->reader->getClassAnnotations($class);
121 }
123 $path = $this->dir.'/'.strtr($key, '\\', '-').'.cache.php';
124 if (!file_exists($path)) {
125 $annot = $this->reader->getPropertyAnnotations($property);
184 private function saveCacheFile($path, $data)
185 {
186 file_put_contents($path, '<?php return unserialize('.var_export(serialize($data), true).');');
187 }
MethodReturnedNullListener.php (https://gitlab.com/judielsm/Handora) PHP · 174 lines
3 /*
4 * This file is part of PhpSpec, A php toolset to drive emergent
5 * design by specification.
6 *
12 */
14 namespace PhpSpec\Listener;
16 use PhpSpec\CodeGenerator\GeneratorManager;
17 use PhpSpec\Console\IO;
18 use PhpSpec\Event\ExampleEvent;
19 use PhpSpec\Event\MethodCallEvent;
20 use PhpSpec\Event\SuiteEvent;
LineFormatter.php (https://gitlab.com/judielsm/Handora) PHP · 159 lines
UserCreationTrait.php (https://gitlab.com/reasonat/test8) PHP · 214 lines
ezSQL_oracleTNSTest_.php (git://github.com/jv2222/ezSQL.git) PHP · 262 lines
ConfigGenerator.php (https://gitlab.com/trungthao379/phpmyadmin) PHP · 182 lines
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Config file generator
5 *
6 * @package PhpMyAdmin-Setup
7 */
8 namespace PMA\setup\lib;
13 * Config file generation class
14 *
15 * @package PhpMyAdmin
16 */
17 class ConfigGenerator
33 // header
34 $ret = '<?php' . $crlf
35 . '/*' . $crlf
36 . ' * Generated configuration file' . $crlf
CakePHP.php (https://github.com/shama/cakephp.git) PHP · 278 lines
1 <?php
2 /**
3 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
4 * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
5 *
8 *
9 * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
10 * @link http://cakephp.org CakePHP(tm) Project
11 * @package Cake.Meta.CodeFormat
12 * @since CakePHP(tm) v 3.0
13 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
14 */
21 /**
22 * CakePHP Code Format
23 * Does the actual merging and writing in the CakePHP format for the Meta classes
AbstractSource.php (https://gitlab.com/crazybutterfly815/magento2) PHP · 179 lines
nopassword-setdbpass.php (https://bitbucket.org/steinb/nopassword.git) PHP · 112 lines
1 <?php
3 /* generate passwords for php access to mysql database,
4 * write php config file and sql code to set database passwords
5 *
6 * to be called by nopassword-setdbpass.sh
9 // filename of the configuration file containing the database passwords
10 // WARNING: this code will try to replace this file!
11 $dbpass_fname = dirname(__FILE__) . '/secrets/nopassword-dbpass.php';
13 // config file to read required usernames from
26 }
28 file_put_contents($dbpass_fname, "<?php\nnamespace nopassword;\n\$nopassword_dbpass = " . var_export($nopassword_dbpass, true) . ";\n?>");
30 unset($nopassword_dbpass);
Mysql.php (https://github.com/ntulip/piwik.git) PHP · 221 lines
1 <?php
2 /**
3 * Piwik - Open source web analytics
5 * @link http://piwik.org
6 * @license http://www.gnu.org/licenses/gpl-3.0.html Gpl v3 or later
7 * @version $Id: Mysql.php 1510 2009-10-20 14:57:46Z matt $
8 *
9 * @category Piwik
67 $this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
68 // we may want to setAttribute(PDO::ATTR_TIMEOUT ) to a few seconds (default is 60) in case the DB is locked
69 // the piwik.php would stay waiting for the database... bad!
70 // we delete the password from this object "just in case" it could be printed
71 $this->password = '';
75 * on mysqlnd support, PHP version, and OS.
76 * see ZF-7428 and http://bugs.php.net/bug.php?id=47224
77 */
78 if(!empty($this->charset))
FoundationProviderRepositoryTest.php (https://gitlab.com/tillkruss/framework) PHP · 87 lines
1 <?php
3 use Mockery as m;
5 class FoundationProviderRepositoryTest extends PHPUnit_Framework_TestCase
6 {
7 public function tearDown()
14 $app = m::mock('Illuminate\Foundation\Application');
16 $repo = m::mock('Illuminate\Foundation\ProviderRepository[createProvider,loadManifest,shouldRecompile]', [$app, m::mock('Illuminate\Filesystem\Filesystem'), [__DIR__.'/services.php']]);
17 $repo->shouldReceive('loadManifest')->once()->andReturn(['eager' => ['foo'], 'deferred' => ['deferred'], 'providers' => ['providers'], 'when' => []]);
18 $repo->shouldReceive('shouldRecompile')->once()->andReturn(false);
80 $repo = new Illuminate\Foundation\ProviderRepository(m::mock('Illuminate\Contracts\Foundation\Application'), $files = m::mock('Illuminate\Filesystem\Filesystem'), __DIR__.'/services.php');
81 $files->shouldReceive('put')->once()->with(__DIR__.'/services.php', '<?php return '.var_export(['foo'], true).';');
83 $result = $repo->writeManifest(['foo']);
Md5Test.php (https://github.com/nbcutech/o3drupal.git) PHP · 208 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: Md5Test.php 23775 2011-03-01 17:25:24Z ralph $
21 */
23 // Call Zend_Validate_File_Md5Test::main() if this source file is executed directly.
24 if (!defined("PHPUnit_MAIN_METHOD")) {
25 define("PHPUnit_MAIN_METHOD", "Zend_Validate_File_Md5Test::main");
29 * @see Zend_Validate_File_Md5
30 */
31 require_once 'Zend/Validate/File/Md5.php';
33 /**
modinstallsettings.class.php (https://github.com/francisreboucas/revolution.git) PHP · 103 lines
1 <?php
2 /**
3 * @package setup
13 $this->config = array_merge(array(),$config);
15 $this->fileName = $this->getCachePath().'settings.cache.php';
16 $this->load();
17 }
84 $expirationTS= $expire ? time() + $expire : time();
85 $expireContent= 'if(time() > ' . $expirationTS . '){return array();}';
86 $content = '<?php ' . $expireContent . ' return ' . var_export($this->settings, true) . ';';
88 $written= @ fwrite($file, $content);
NormalizedToLocalizedTest.php (https://github.com/Exercise/zf2.git) PHP · 237 lines
1 <?php
2 /**
3 * Zend Framework
33 * @group Zend_Filter
34 */
35 class NormalizedToLocalizedTest extends \PHPUnit_Framework_TestCase
36 {
37 /**
73 foreach ($valuesExpected as $key => $value) {
74 $this->assertEquals($valuesReceived[$key], $filter($value), 'failed filter of ' . var_export($value, 1));
75 }
76 }
92 foreach ($valuesExpected as $key => $value) {
93 $this->assertEquals($valuesReceived[$key], $filter($value), 'failed filter of ' . var_export($value, 1));
94 }
Zend_ValidateTest.php (https://github.com/Shreef/zf2.git) PHP · 207 lines
1 <?php
2 /**
3 * Zend Framework
28 * @license http://framework.zend.com/license/new-bsd New BSD License
29 */
30 class resources_languages_Zend_ValidateTest extends PHPUnit_Framework_TestCase
31 {
60 // include Zend_Validate translation tables
61 $translationFile = $entry->getPathname() . DIRECTORY_SEPARATOR . 'Zend_Validate.php';
62 if (file_exists($translationFile)) {
63 $translation = include $translationFile;
99 if (!empty($errors)) {
100 $this->fail(var_export($errors, true));
101 }
102 }
test_Minify.php (https://github.com/martinnemitz/Mage-Minify.git) PHP · 213 lines
1 <?php
3 // currently these only test serve() when passed the 'quiet' options
5 require_once '_inc.php';
6 require_once 'Minify.php';
42 $passed = assertTrue($expected === $output, 'Minify : 304 response');
43 if ($thisFileActive) {
44 echo "\nOutput: " .var_export($output, 1). "\n\n";
45 if (! $passed) {
46 echo "\n\n\n\n---Expected: " .var_export($expected, 1). "\n\n";
88 $passed = assertTrue($expected === $output, 'Minify : JS and Expires');
89 if ($thisFileActive) {
90 echo "\nOutput: " .var_export($output, 1). "\n\n";
91 if (! $passed) {
92 echo "\n\n\n\n---Expected: " .var_export($expected, 1). "\n\n";
apioauthaccesstoken.php (https://gitlab.com/BeS/io.schiessle.org) PHP · 122 lines
1 <?php
2 /**
3 * StatusNet, the distributed open-source microblogging tool
6 * request token for an access token)
7 *
8 * PHP version 5
9 *
10 * LICENCE: This program is free software: you can redistribute it and/or modify
78 } catch (Exception $e) {
79 common_log(LOG_WARNING, 'API OAuthException - ' . $e->getMessage());
80 common_debug(var_export($req, true));
81 $code = $e->getCode();
82 $this->clientError($e->getMessage(), empty($code) ? 401 : $code, 'text');
tree_output.php (https://bitbucket.org/ericsagnes/ezpublish-multisite.git) PHP · 300 lines
translation.php (https://bitbucket.org/crevillo/enetcall.git) PHP · 197 lines
1 <?php
2 /**
3 * @copyright Copyright (C) 2005-2010 eZ Systems AS. All rights reserved.
157 *
158 * This method returns a translated string and substitutes the parameters $param
159 * in the localized string with PHP code to place the variable data into
160 * the string at a later moment. Instead of the values for each of the
161 * parameters, an expression to get to the data should be sumbitted into
181 throw new ezcTranslationKeyNotAvailableException( $key );
182 }
183 $translatedString = var_export( $this->translationMap[$key]->translation, true );
184 // Little optimization to prevent preg if not needed, it bails out too
185 // if there is just a percent sign in the string without a valid
Drawer.php (https://github.com/schmanat/Imagine.git) PHP · 274 lines
1 <?php
3 /*
40 /**
41 * (non-PHPdoc)
42 * @see Imagine\Draw\DrawerInterface::arc()
43 */
58 * This function doesn't work properly because of a bug in GD
59 *
60 * (non-PHPdoc)
61 * @see Imagine\Draw\DrawerInterface::chord()
62 */
82 /**
83 * (non-PHPdoc)
84 * @see Imagine\Draw\DrawerInterface::ellipse()
85 */
sfServiceContainerDumperPhp.php (https://github.com/xdade/diem.git) PHP · 327 lines
1 <?php
3 /*
12 /**
13 * sfServiceContainerDumperPhp dumps a service container as a PHP class.
14 *
15 * @package symfony
18 * @version SVN: $Id$
19 */
20 class sfServiceContainerDumperPhp extends sfServiceContainerDumper
21 {
22 /**
23 * Dumps the service container as a PHP class.
24 *
25 * Available options:
PriorityQueueTest.php (https://github.com/necrogami/zf2.git) PHP · 168 lines
1 <?php
2 /**
3 * Zend Framework
33 * @license http://framework.zend.com/license/new-bsd New BSD License
34 */
35 class PriorityQueueTest extends \PHPUnit_Framework_TestCase
36 {
37 /**
64 $test[] = $item;
65 }
66 $this->assertSame($expected, $test, 'Expected: ' . var_export($expected, 1) . "\nReceived:" . var_export($test, 1));
67 }
76 );
77 $test = $this->queue->toArray();
78 $this->assertSame($expected, $test, var_export($test, 1));
79 }
XmlDescriptor.php (https://gitlab.com/judielsm/Handora) PHP · 263 lines
1 <?php
3 /*
215 $objectXML->appendChild($defaultsXML = $dom->createElement('defaults'));
216 $defaults = is_array($argument->getDefault()) ? $argument->getDefault() : (is_bool($argument->getDefault()) ? array(var_export($argument->getDefault(), true)) : ($argument->getDefault() ? array($argument->getDefault()) : array()));
217 foreach ($defaults as $default) {
218 $defaultsXML->appendChild($defaultXML = $dom->createElement('default'));
249 if ($option->acceptValue()) {
250 $defaults = is_array($option->getDefault()) ? $option->getDefault() : (is_bool($option->getDefault()) ? array(var_export($option->getDefault(), true)) : ($option->getDefault() ? array($option->getDefault()) : array()));
251 $objectXML->appendChild($defaultsXML = $dom->createElement('defaults'));
_edit_form.php (https://github.com/proyectoalba/alba.git) PHP · 86 lines
15 <?php foreach ($this->getPrimaryKey() as $pk): ?>
16 [?php echo object_input_hidden_tag($<?php echo $this->getSingularName() ?>, 'get<?php echo $pk->getPhpName() ?>') ?]
17 <?php endforeach; ?>
38 }
39 ?>
40 <fieldset id="sf_fieldset_<?php echo preg_replace('/[^a-z0-9_]/', '_', strtolower($category_name)) ?>" class="<?php if ($collapse): ?> collapse<?php endif; ?>">
41 <?php if ($category != 'NONE'): ?><h2>[?php echo __('<?php echo $category_name ?>') ?]</h2>
52 <?php endif; ?>
53 <div class="form-row">
54 [?php echo label_for('<?php echo $this->getParameterValue("edit.fields.".$column->getName().".label_for", $this->getSingularName()."[".$column->getName()."]") ?>', __($labels['<?php echo $this->getSingularName() ?>{<?php echo $column->getName() ?>}']), '<?php if ($column->isNotNull()): ?>class="required" <?php endif; ?>') ?]
55 <div class="content[?php if ($sf_request->hasError('<?php echo $this->getSingularName() ?>{<?php echo $column->getName() ?>}')): ?] form-error[?php endif; ?]">
70 <?php endforeach; ?>
72 [?php include_partial('edit_actions', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>)) ?]
74 </form>
config.php (https://github.com/leonardteo/INSE6530.git) PHP · 236 lines
1 <?php
2 /**
3 * Fuel is a fast, lightweight, community driven PHP5 framework.
8 * @license MIT License
9 * @copyright 2010 - 2011 Fuel Development Team
10 * @link http://fuelphp.com
11 */
31 $config = $file;
32 }
33 elseif ($paths = \Fuel::find_file('config', $file, '.php', true))
34 {
35 // Reverse the file list so that we load the core configs first and
74 }
75 $content = <<<CONF
76 <?php
77 /**
78 * Fuel is a fast, lightweight, community driven PHP5 framework.
AnnotationsCacheWarmerTest.php (https://github.com/symfony/FrameworkBundle.git) PHP · 175 lines
44 public function testAnnotationsCacheWarmerWithDebugDisabled()
45 {
46 file_put_contents($this->cacheDir.'/annotations.map', sprintf('<?php return %s;', var_export([__CLASS__], true)));
47 $cacheFile = tempnam($this->cacheDir, __FUNCTION__);
48 $reader = new AnnotationReader();
64 public function testAnnotationsCacheWarmerWithDebugEnabled()
65 {
66 file_put_contents($this->cacheDir.'/annotations.map', sprintf('<?php return %s;', var_export([__CLASS__], true)));
67 $cacheFile = tempnam($this->cacheDir, __FUNCTION__);
68 $reader = new AnnotationReader();
73 // Assert cache is valid
74 $phpArrayAdapter = new PhpArrayAdapter($cacheFile, new NullAdapter());
75 $reader = new PsrCachedReader(
76 $this->getReadOnlyReader(),