100+ results for 'php ob_get_contents'

Not the results you expected?

sitemailer_.php (https://gitlab.com/nvtdn2006/azora) PHP · 384 lines

1 <?php

2 class SiteMailer

3 {

51

52 $this->headers .= "MIME-Version: 1.0\r\n";

53 //$this->headers .= "Content-Type: multipart/mixed; boundary=\"PHP-mixed-" . $this->randomHash . "\"\r\n";

54 $this->headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";

55 }

89 /*if ($this->attachment != '')

90 {

91 $this->msgBody .= "\r\n--PHP-mixed-" . $this->randomHash . "--";

92 $this->msgBody .= $this->attachment;

93 $this->msgBody .= "\r\n--PHP-mixed-" . $this->randomHash . "--";

106 ob_start();

107 include($filepath);

108 $content = ob_get_contents();

109 ob_end_clean();

110 return $content;

GifCreator.php (https://gitlab.com/billyprice1/mc-skintools) PHP · 349 lines

1 <?php

2

3 namespace GifCreator;

8 * @link https://github.com/Sybio/GifCreator

9 * @author Sybio (Clément Guillemain / @Sybio01)

10 * @license http://opensource.org/licenses/gpl-license.php GNU Public License

11 * @copyright Clément Guillemain

12 * @modified by Max Korlaar

99 ob_start();

100 imagegif($frames[$i]);

101 $this->frameSources[] = ob_get_contents();

102 ob_end_clean();

103

113 ob_start();

114 imagegif($resourceImg);

115 $this->frameSources[] = ob_get_contents();

116 ob_end_clean();

117

unicode.php (https://github.com/mcrider/pkpUpgradeTestSuite.git) PHP · 269 lines

1 <?php

2 /**

3 * @version $Id: unicode.php,v 1.1 2008/10/10 20:52:53 mj Exp $

8 * Portions created by the Initial Developer are Copyright (C) 1998

9 * the Initial Developer. All Rights Reserved.

10 * Ported to PHP by Henri Sivonen (http://hsivonen.iki.fi)

11 * Slight modifications to fit with phputf8 library by Harry Fuecks (hfuecks gmail com)

12 * @see http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUTF8ToUnicode.cpp

13 * @see http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUnicodeToUTF8.cpp

14 * @see http://hsivonen.iki.fi/php-utf8/

15 * @package utf8

16 * @subpackage unicode

24 * are not allowed.

25 * Returns false if the input string isn't a valid UTF-8 octet sequence

26 * and raises a PHP error at level E_USER_WARNING

27 * Note: this function has been modified slightly in this library to

28 * trigger errors on encountering bad bytes

unicode.php (https://github.com/shafiqissani/Jewelery-Ecommerce-.git) PHP · 269 lines

1 <?php

2 /**

3 * @version $Id: unicode.php 10381 2008-06-01 03:35:53Z pasamio $

8 * Portions created by the Initial Developer are Copyright (C) 1998

9 * the Initial Developer. All Rights Reserved.

10 * Ported to PHP by Henri Sivonen (http://hsivonen.iki.fi)

11 * Slight modifications to fit with phputf8 library by Harry Fuecks (hfuecks gmail com)

12 * @see http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUTF8ToUnicode.cpp

13 * @see http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUnicodeToUTF8.cpp

14 * @see http://hsivonen.iki.fi/php-utf8/

15 * @package utf8

16 * @subpackage unicode

24 * are not allowed.

25 * Returns false if the input string isn't a valid UTF-8 octet sequence

26 * and raises a PHP error at level E_USER_WARNING

27 * Note: this function has been modified slightly in this library to

28 * trigger errors on encountering bad bytes

unicode.php (https://github.com/pjwiseman/joomla-cms.git) PHP · 269 lines

1 <?php

2 /**

3 * @version $Id$

8 * Portions created by the Initial Developer are Copyright (C) 1998

9 * the Initial Developer. All Rights Reserved.

10 * Ported to PHP by Henri Sivonen (http://hsivonen.iki.fi)

11 * Slight modifications to fit with phputf8 library by Harry Fuecks (hfuecks gmail com)

12 * @see http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUTF8ToUnicode.cpp

13 * @see http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUnicodeToUTF8.cpp

14 * @see http://hsivonen.iki.fi/php-utf8/

15 * @package utf8

16 * @subpackage unicode

24 * are not allowed.

25 * Returns false if the input string isn't a valid UTF-8 octet sequence

26 * and raises a PHP error at level E_USER_WARNING

27 * Note: this function has been modified slightly in this library to

28 * trigger errors on encountering bad bytes

dumper.php (https://bitbucket.org/laborautonomo/laborautonomo-site.git) PHP · 359 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: dumper.php 1782 2008-04-25 17:09:06Z pp11 $

7 */

8 /**

352 ob_start();

353 print_r($variable);

354 $formatted = ob_get_contents();

355 ob_end_clean();

356 return $formatted;

wprp.plugins.php (https://github.com/sharpmachine/whiteantelopestudio.com.git) PHP · 303 lines

1 <?php

2

3 /**

8 function _wprp_get_plugins() {

9

10 require_once( ABSPATH . '/wp-admin/includes/plugin.php' );

11

12 // Get all plugins

89 return new WP_Error( 'disallow-file-mods', __( "File modification is disabled with the DISALLOW_FILE_MODS constant.", 'wpremote' ) );

90

91 include_once ( ABSPATH . 'wp-admin/includes/admin.php' );

92 require_once ( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );

93 require_once WPRP_PLUGIN_PATH . 'inc/class-wprp-plugin-upgrader-skin.php';

94

95 // check for filesystem access

class.mvc_view.php (https://bitbucket.org/kenaku/karate.git) PHP · 288 lines

1 <?php

2

3 class C_MVC_View extends C_Component

9

10

11 function define($template, $params=array(), $engine='php', $context=FALSE)

12 {

13 parent::define($context);

21 * @param context $context

22 */

23 function initialize($template, $params=array(), $engine='php', $context=FALSE)

24 {

25 parent::initialize($context);

140 $old_element = $this->object->_queue[$count - 1];

141

142 $content = ob_get_contents();

143 ob_clean();

144

image.php (https://gitlab.com/Ltaimao/wecenter) PHP · 437 lines

1 <?php

2 /*

3 +--------------------------------------------------------------------------

379

380 $func_output($dst_img);

381 $sae_storage->write('uploads', $this->new_image, ob_get_contents());

382

383 ob_end_clean();

395

396 $func_output($dst_img, null, $this->quality);

397 $sae_storage->write('uploads', $this->new_image, ob_get_contents());

398

399 ob_end_clean();

dumper.php (https://github.com/paintitgold/myspace-php-sdk.git) PHP · 360 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: dumper.php 1723 2008-04-08 00:34:10Z lastcraft $

7 */

8 /**

353 ob_start();

354 print_r($variable);

355 $formatted = ob_get_contents();

356 ob_end_clean();

357 return $formatted;

articles.php (https://github.com/vaughnpaul/NOS.git) PHP · 249 lines

1 <?php

2 /*

3 $Id: articles.php, v1.0 2003/12/04 12:00:00 ra Exp $

214 if (($refresh == true) || !read_cache($cache_output, 'topics_box-' . $language . '.cache' . $tPath, $auto_expire)) {

215 ob_start();

216 // include(DIR_WS_BOXES . 'articles.php');

217 include(DIR_WS_BOXES . FILENAME_ARTICLESS);

218 $cache_output = ob_get_contents();

237 if (($refresh == true) || !read_cache($cache_output, 'authors_box-' . $language . '.cache' . $authors_id, $auto_expire)) {

238 ob_start();

239 //include(DIR_WS_BOXES . 'authors.php');

240 include(DIR_WS_BOXES . FILENAME_AUTHORS);

241 $cache_output = ob_get_contents();

FunctionFrontendTest.php (https://github.com/leerbag/zf2.git) PHP · 219 lines

1 <?php

2 /**

3 * Zend Framework

53 * @group Zend_Cache

54 */

55 class FunctionFrontendTest extends \PHPUnit_Framework_TestCase

56 {

57

100 ob_implicit_flush(false);

101 $return = $this->_instance->call('foobar', array('param1', 'param2'));

102 $data = ob_get_contents();

103 ob_end_clean();

104 ob_implicit_flush(true);

112 ob_implicit_flush(false);

113 $return = $this->_instance->call('\ZendTest\Cache\foobar', array('param3', 'param4'));

114 $data = ob_get_contents();

115 ob_end_clean();

116 ob_implicit_flush(true);

views.class.php (https://github.com/cjuarez/Come-en-Colima.git) PHP · 147 lines

1 <?php

2 /* ===========================

3

4 FlavorPHP - because php should have a better taste

5 homepage: http://www.flavorphp.com/

6 git repository: https://github.com/Axloters/FlavorPHP

7

8 FlavorPHP is a free software licensed under the MIT license

18 =========================== */

19 ?>

20 <?php

21

22 class views {

dumper.php (https://github.com/orchestra-io/sample-openx.git) PHP · 360 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: dumper.php 7321 2007-06-05 09:08:01Z andrew.hill@openads.org $

7 */

8 /**

353 ob_start();

354 print_r($variable);

355 $formatted = ob_get_contents();

356 ob_end_clean();

357 return $formatted;

index.php (https://github.com/cybernet/CyBerFuN-xBTiT.git) PHP · 94 lines

1 <?php

2 ob_start();

3 if ($CURUSER["uid"] > 1)

10 <table class=lista width="474" align="center">

11 <tr>

12 <td class=header align=center width="26"><?php echo $language["OPTION"] ?></td>

13 <td class=header align=center width="319"><?php echo $language["WHAT_ABOUT"] ?></td>

14 <td class=header align=center width="41"><?php echo $language["POINTS"] ?></td>

15 <td class=header align=center width="62"><?php echo $language["EXCHANGE"] ?> </td>

16 </tr>

17 <?php

18 $uid=$CURUSER['uid'];

19 $r=do_sqlquery("SELECT * from {$TABLE_PREFIX}users where id=$uid");

dumper.php (https://github.com/greevex/mzz-framework-blank-application.git) PHP · 360 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: dumper.php 2460 2008-04-08 21:03:22Z mz $

7 */

8 /**

353 ob_start();

354 print_r($variable);

355 $formatted = ob_get_contents();

356 ob_end_clean();

357 return $formatted;

dumper.php (https://github.com/teamplus/teamplus.git) PHP · 360 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: dumper.php 6354 2009-04-15 02:41:21Z mvdam $

7 */

8 /**

353 ob_start();

354 print_r($variable);

355 $formatted = ob_get_contents();

356 ob_end_clean();

357 return $formatted;

Class.php (https://github.com/massiveart/ZF-ZOOLU.git) PHP · 244 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: Class.php 20379 2010-01-18 14:40:57Z mabe $

21 */

22

24 * @see Zend_Cache_Core

25 */

26 require_once 'Zend/Cache/Core.php';

27

28

220 ob_implicit_flush(false);

221 $return = call_user_func_array(array($this->_cachedEntity, $name), $parameters);

222 $output = ob_get_contents();

223 ob_end_clean();

224 $data = array($output, $return);

Class.php (https://gitlab.com/florianocomercial/centreon) PHP · 244 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: Class.php 20379 2010-01-18 14:40:57Z mabe $

21 */

22

24 * @see Zend_Cache_Core

25 */

26 require_once 'Zend/Cache/Core.php';

27

28

220 ob_implicit_flush(false);

221 $return = call_user_func_array(array($this->_cachedEntity, $name), $parameters);

222 $output = ob_get_contents();

223 ob_end_clean();

224 $data = array($output, $return);

dumper.php (https://bitbucket.org/volatileeight/prado.git) PHP · 401 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: dumper.php 1532 2006-12-01 12:28:55Z xue $

7 */

8 /**

353 ob_start();

354 print_r($variable);

355 $formatted = ob_get_contents();

356 ob_end_clean();

357 return $formatted;

383 /**

384 * Tries to determine if the method call is an assertion.

385 * @param array $frame PHP stack frame.

386 * @access private

387 * @static

dumper.php (https://github.com/hatone/moodle.git) PHP · 360 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: dumper.php,v 1.4 2010/12/14 17:35:45 moodlerobot Exp $

7 */

8 /**

353 ob_start();

354 print_r($variable);

355 $formatted = ob_get_contents();

356 ob_end_clean();

357 return $formatted;

dumper.php (https://github.com/nigeldaley/moodle.git) PHP · 360 lines

1 <?php

2 /**

3 * base include file for SimpleTest

353 ob_start();

354 print_r($variable);

355 $formatted = ob_get_contents();

356 ob_end_clean();

357 return $formatted;

testoutputlib.php (https://github.com/viggof/moodle.git) PHP · 165 lines

1 <?php

2

3 // This file is part of Moodle - http://moodle.org/

18

19 /**

20 * Unit tests for (some of) ../outputlib.php.

21 *

22 * @package moodlecore

28 die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page

29 }

30 require_once($CFG->libdir . '/outputlib.php');

31

32

35 *

36 * These tests assume that developer debug mode is on, which, at the time of

37 * writing, is true. admin/tool/unittest/index.php forces it on.

38 *

39 * @copyright 2009 Tim Hunt

Class.php (https://github.com/Martin1982/IBMessagingWorkshopServer.git) PHP · 244 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: Class.php 20379 2010-01-18 14:40:57Z mabe $

21 */

22

24 * @see Zend_Cache_Core

25 */

26 // require_once 'Zend/Cache/Core.php';

27

28

220 ob_implicit_flush(false);

221 $return = call_user_func_array(array($this->_cachedEntity, $name), $parameters);

222 $output = ob_get_contents();

223 ob_end_clean();

224 $data = array($output, $return);

blogs.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 69 lines

1 <?php

2 /**

3 * @package EasyBlog

4 * @copyright Copyright (C) 2010 Stack Ideas Private Limited. All rights reserved.

5 * @license GNU/GPL, see LICENSE.php

6 * EasyBlog is free software. This version may have been modified pursuant

7 * to the GNU General Public License, and as distributed it includes or

58 <div class="button2-left">

59 <div class="blank">

60 <a rel="{handler: 'iframe', size: {x: 750, y: 475}}" href="<?php echo JRoute::_( 'index.php?option=com_easyblog&view=blogs&tmpl=component&browse=1&browsefunction=insertBlog' );?>" title="Select an Article" class="modal"><?php echo JText::_( 'Select' ); ?></a>

61 </div>

62 </div>

63 <input type="hidden" id="item_id" name="<?php echo $control_name;?>[<?php echo $name;?>]" value="<?php echo $id;?>" />

64 <?php

template.php (https://github.com/Shigaru/shigaru.git) PHP · 446 lines

1 <?php

2 /**

3 *

27

28 /**

29 * A hack to support __construct() on PHP 4

30 * Hint: descendant classes have no PHP4 class_name() constructors,

122

123 /**

124 * A hack to support __construct() on PHP 4

125 * Hint: descendant classes have no PHP4 class_name() constructors,

230 function load( $template ) {

231

232 $templateFileName = $this->getRoot().DS.$template.'.php';

233

234 if (is_file($templateFileName)) {

testoutputlib.php (https://github.com/hatone/moodle.git) PHP · 165 lines

1 <?php

2

3 // This file is part of Moodle - http://moodle.org/

18

19 /**

20 * Unit tests for (some of) ../outputlib.php.

21 *

22 * @package moodlecore

28 die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page

29 }

30 require_once($CFG->libdir . '/outputlib.php');

31

32

35 *

36 * These tests assume that developer debug mode is on, which, at the time of

37 * writing, is true. admin/report/unittest/index.php forces it on.

38 *

39 * @copyright 2009 Tim Hunt

main.act.php (https://github.com/adamfranco/concerto.git) PHP · 258 lines

1 <?php

2 /**

3 * @package concerto.modules.admin

9 */

10

11 require_once(POLYPHONY."/main/library/AbstractActions/MainWindowAction.class.php");

12

13 /**

75 print "\n</ul>";

76

77 $introText = new Block(ob_get_contents(),2);

78 $actionRows->add($introText, "100%", null, CENTER, CENTER);

79 ob_end_clean();

93 print "\n</ul>";

94

95 $introText = new Block(ob_get_contents(),2);

96 $actionRows->add($introText, "100%", null, CENTER, CENTER);

97 ob_end_clean();

renderer.php (https://github.com/markn86/moodle.git) PHP · 173 lines

1 <?php

2 // This file is part of Moodle - http://moodle.org/

3 //

52 ob_start();

53 $form->display();

54 $html .= ob_get_contents();

55 ob_end_clean();

56

114

115 if (isset($eventinformation['parentclass'])) {

116 $url = new moodle_url('eventdetail.php', array('eventname' => $eventinformation['parentclass']));

117 $html .= html_writer::tag('dt', get_string('parentevent', 'report_eventlist'));

118 $html .= html_writer::tag('dd', html_writer::link($url, $eventinformation['parentclass']));

Renderer.php (https://github.com/riaf/ethna.git) PHP · 336 lines

1 <?php

2 // vim: foldmethod=marker

3 /**

4 * Renderer.php

5 *

6 * @author Kazuhiro Hosoi <hosoi@gree.co.jp>

7 * @license http://www.opensource.org/licenses/bsd-license.php The BSD License

8 * @package Ethna

9 * @version $Id: e3e9c8f68ab4a40e933215e67c8a90c383e7c09f $

30 protected $ctl;

31

32 /** @protected array [appid]-ini.phpのレンダラ設定 */

33 protected $config;

34

ConfigTest.php (https://github.com/bhaumik25/zend-framework.git) PHP · 262 lines

1 <?php

2

3 /**

11 * Zend_Config

12 */

13 require_once 'Zend/Config.php';

14

15 /**

16 * PHPUnit test case

17 */

18 require_once 'PHPUnit/Framework/TestCase.php';

19

20

24 * @subpackage UnitTests

25 */

26 class Zend_ConfigTest extends PHPUnit_Framework_TestCase

27 {

28 protected $_iniFileConfig;

unicode.php (https://github.com/osarrat/sigmah-website.git) PHP · 269 lines

1 <?php

2 /**

3 * @version $Id: unicode.php,v 1.2 2006/02/26 13:20:44 harryf Exp $

8 * Portions created by the Initial Developer are Copyright (C) 1998

9 * the Initial Developer. All Rights Reserved.

10 * Ported to PHP by Henri Sivonen (http://hsivonen.iki.fi)

11 * Slight modifications to fit with phputf8 library by Harry Fuecks (hfuecks gmail com)

12 * @see http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUTF8ToUnicode.cpp

13 * @see http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUnicodeToUTF8.cpp

14 * @see http://hsivonen.iki.fi/php-utf8/

15 * @package utf8

16 * @subpackage unicode

24 * are not allowed.

25 * Returns false if the input string isn't a valid UTF-8 octet sequence

26 * and raises a PHP error at level E_USER_WARNING

27 * Note: this function has been modified slightly in this library to

28 * trigger errors on encountering bad bytes

dumper.php (https://github.com/kugu/limb.git) PHP · 360 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: dumper.php 7198 2008-11-01 11:57:17Z korchasa $

7 */

8 /**

353 ob_start();

354 print_r($variable);

355 $formatted = ob_get_contents();

356 ob_end_clean();

357 return $formatted;

options-shortcodes.php (https://gitlab.com/iamgraeme/royalmile) PHP · 555 lines

1 <?php

2

3 if ( !function_exists('psp_getLocationsList') ) { function psp_getLocationsList() {

22 ?>

23 <div class="psp-form-row">

24 <label><?php _e('Select location:', 'psp'); ?></label>

25 <div class="psp-form-item large">

26 <span class="formNote">&nbsp;</span>

28 <select id="psp-location-id" name="location_id" style="width:120px;">

29 <option value="all">All locations</option>

30 <?php

31 foreach ($res as $key => $value) {

32 $val = '';

38 </div>

39 </div>

40 <?php

41 $output = ob_get_contents();

modscript.class.php (https://bitbucket.org/orchdork10159/dnsman.ly.git) PHP · 175 lines

1 <?php

2 /**

3 * @package modx

4 */

5 /**

6 * An element representing executable PHP script content.

7 *

8 * {@inheritdoc}

38 if (strncmp($v, '<?', 2) == 0) {

39 $v= substr($v, 2);

40 if (strncmp($v, 'php', 3) == 0) $v= substr($v, 3);

41 }

42 if (substr($v, -2, 2) == '?>') $v= substr($v, 0, -2);

65 ob_start();

66 $this->_output= $scriptName($this->_properties);

67 $this->_output= ob_get_contents() . $this->_output;

68 ob_end_clean();

69 if ($this->_output && is_string($this->_output)) {

dumper.php (https://bitbucket.org/jstechnologies/cats.git) PHP · 402 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: dumper.php 424 2006-07-21 02:20:17Z will $

7 */

8 /**

353 ob_start();

354 print_r($variable);

355 $formatted = ob_get_contents();

356 ob_end_clean();

357 return $formatted;

383 /**

384 * Tries to determine if the method call is an assertion.

385 * @param array $frame PHP stack frame.

386 * @access private

387 * @static

functions.php (https://github.com/digitalstrategyworks/Reese-WordPress.git) PHP · 1074 lines

1 <?php

2

3 /**

10 */

11 function add_openhook_options_page() {

12 add_theme_page(__('Thesis OpenHook', 'thesis_openhook'), __('Thesis OpenHook', 'thesis_openhook'), 'edit_themes', dirname(__FILE__) . '/options.php');

13 # add_theme_page(__('Thesis Custom Styling', 'thesis_openhook'), __('Thesis Custom Styling', 'thesis_openhook'), 'edit_themes', dirname(__FILE__) . '/css-edit.php');

14 # add_theme_page(__('Thesis Custom Programming', 'thesis_openhook'), __('Thesis Custom Programming', 'thesis_openhook'), 'edit_themes', dirname(__FILE__) . '/php-edit.php');

15 }

16

23 register_setting('thesis_options', 'openhook_save_button');

24 register_setting('thesis_options', 'openhook_wp_head');

25 register_setting('thesis_options', 'openhook_wp_head_php');

26 register_setting('thesis_options', 'openhook_before_html');

27 register_setting('thesis_options', 'openhook_before_html_php');

TestCase.php (https://github.com/ewandor/horde.git) PHP · 172 lines

1 <?php

2 /**

3 * Test base.

4 *

5 * PHP version 5

6 *

7 * @category Horde

10 * @author Gunnar Wrobel <wrobel@pardus.de>

11 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1

12 * @link http://pear.horde.org/index.php?package=Components

13 */

14

26 * @author Gunnar Wrobel <wrobel@pardus.de>

27 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1

28 * @link http://pear.horde.org/index.php?package=Components

29 */

30 class Components_TestCase

class-filesystem-translationfile.php (https://gitlab.com/oxidigitaluser/liguelista) PHP · 349 lines

1 <?php

2

3 require_once('class-translationfile.php');

22

23 $current_parent = $parent_file;

24 $parent_file = 'tools.php'; //needed for screen icon :-)

25 if (function_exists('set_current_screen')) set_current_screen('tools'); //WP 3.0 fix

26

27 //check the file system

28 ob_start();

29 $url = 'admin-ajax.php';

30 if ( false === ($credentials = request_filesystem_credentials($url)) ) {

31 $data = ob_get_contents();

42 if ( ! WP_Filesystem($credentials) ) {

43 request_filesystem_credentials($url, '', true); //Failed to connect, Error and request again

44 $data = ob_get_contents();

45 ob_end_clean();

46 if( ! empty($data) ){

load.php (https://github.com/MilkZoft/ZanPHP.git) PHP · 491 lines

1 <?php

2 if (!defined("ACCESS")) {

3 die("Error: You don't have permission to access here...");

4 }

5

6 include "singleton.php";

7

8 class ZP_Load

27 $name = strtolower($name);

28

29 if (file_exists("www/applications/$application/classes/$name.php")) {

30 include_once "www/applications/$application/classes/$name.php";

31 } elseif (file_exists("www/classes/$name.php")) {

32 include_once "www/classes/$name.php";

PageShortcodesPlugin.php (https://github.com/dflydev/page-shortcodes.git) PHP · 228 lines

1 <?php

2 /**

3 * Page Shortcodes WordPress Plugin

128 $foundTemplate = locate_template($templates);

129 if ( ! $foundTemplate ) {

130 $foundTemplate = $this->localTemplate('psp-page-meta.php');

131 }

132 return $this->includeTemplate($foundTemplate, array(

167 $foundTemplate = locate_template($templates);

168 if ( ! $foundTemplate ) {

169 $foundTemplate = $this->localTemplate('psp-page-list.php');

170 }

171

178 protected function createTemplateSearchPath($page, $templateName, $templates = null) {

179 if ( $templates === null ) $templates = array();

180 $templates[] = implode('-', array('page', $page->post_name, $templateName . '.php'));

181 $templates[] = implode('-', array('page', $page->ID, $templateName . '.php'));

core.php (https://github.com/cookcrowd/Backend.git) PHP · 422 lines

1 <?php

2 namespace Zurv;

3

371 extract($vars);

372 include $this->_template;

373 $render = ob_get_contents();

374 ob_end_clean();

375

modtranslate095.class.php (https://bitbucket.org/orchdork10159/dnsman.ly.git) PHP · 168 lines

1 <?php

2 /**

3 * MODX Revolution

123 }

124

125 $log= ob_get_contents();

126 ob_end_clean();

127 if ($toFile) {

161 }

162 }

163 $output .= ob_get_contents();

164 ob_end_clean();

165 }

head.php (https://github.com/dextercowley/joomla-cms.git) PHP · 243 lines

1 <?php

2 /**

3 * @package Joomla.Platform

36 ob_start();

37 echo $this->fetchHead($this->_doc);

38 $buffer = ob_get_contents();

39 ob_end_clean();

40

side_menu.inc.php (https://github.com/atutor/webcalendar.git) PHP · 48 lines

1 <?php

2

3 global $savant, $_config, $_base_href;

35 $this_date = chunk_split($row2['cal_date'], 4, '-');

36 $this_date = trim(chunk_split($this_date, 7, '-'), '-');

37 echo '<li><a href="'.$webcalendar_url_db.'view_entry.php?id='.$row2['cal_id'].SEP.'date='.$row2['cal_date'].'" onclick="window.open(\' '.$webcalendar_url_db.'view_entry.php?id='.$row2['cal_id'].SEP.'date='.$row2['cal_date'].'\',\'calendarwin\',\'width=600,height=520,scrollbars=yes, resizable=yes\'); return false">'.$row2['cal_name'].'</a><br /><small><small> ('.$this_date.')</small></small></li>';

38 }

39 }

40 echo '</ul>';

41

42 $savant->assign('dropdown_contents', ob_get_contents());

43 ob_end_clean();

44

45 $savant->assign('title', _AT('current_calendar'));

46 $savant->display('include/box.tmpl.php');

47

48 ?>

home.php (https://github.com/essa/sharetronix_ja.git) PHP · 134 lines

1 <?php

2

3 if( $this->user->is_logged ) {

5 }

6

7 $this->load_langfile('inside/global.php');

8 $this->load_langfile('outside/global.php');

9 $this->load_langfile('inside/dashboard.php');

10 $this->load_langfile('outside/home.php');

92 $D->parsedpost_attfile_maxlen -= 12;

93 }

94 $this->load_template('single_post.php');

95 }

96 unset($D->p);

Reporting.php (https://bitbucket.org/lordgnu/php_codesniffer.git) PHP · 231 lines

13 * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence

14 * @link http://pear.php.net/package/PHP_CodeSniffer

15 */

16

18 include_once dirname(__FILE__).'/../CodeSniffer.php';

19 } else {

20 include_once 'PHP/CodeSniffer.php';

21 }

22

32 * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence

33 * @version Release: @package_version@

34 * @link http://pear.php.net/package/PHP_CodeSniffer

35 */

36 class PHP_CodeSniffer_Reporting

58 if (false === ($reportClass instanceof PHP_CodeSniffer_Report)) {

59 throw new PHP_CodeSniffer_Exception('Class "'.$reportClassName.'" must implement the "PHP_CodeSniffer_Report" interface.');

60 }

61

template-tags.php (https://gitlab.com/najomie/fit-hippie) PHP · 779 lines

1 <?php

2 /**

3 * Template functions that can be used to create new templates

76 ob_start();

77 MS_Helper_Html::html_link( MS_Helper_Template::$ms_single_box['link'] );

78 $html = ob_get_contents();

79 ob_end_clean();

80

90 $html .= MS_Helper_Html::html_element( $field );

91 }

92 $html = ob_get_contents();

93 ob_end_clean();

94

103 ob_start();

104 MS_Helper_Html::html_element( MS_Helper_Template::$ms_single_box['button'] );

105 $html = ob_get_contents();

106 ob_end_clean();

107

comment.php (https://gitlab.com/Svyrydov/test-project) PHP · 344 lines

1 <?php

2

3 /*

69

70 // validate page

71 if( $pagenow == 'comment.php' ) {

72

73 return true;

119 * edit_comment

120 *

121 * This function is run on the admin comment.php page and will render the ACF fields within custom metaboxes to look native

122 *

123 * @type function

172 if( $field_group['ID'] && acf_current_user_can_admin() ) {

173

174 $o['edit_url'] = admin_url('post.php?post=' . $field_group['ID'] . '&action=edit');

175

176 }

write.id3v1.php (https://github.com/AJenbo/ubuntudanmark.dk.git) PHP · 147 lines

1 <?php

2 /////////////////////////////////////////////////////////////////

3 /// getID3() by James Heinrich <info@getid3.org> //

8 /////////////////////////////////////////////////////////////////

9 // //

10 // write.id3v1.php //

11 // module for writing ID3v1 tags //

12 // dependencies: module.tag.id3v1.php //

14 /////////////////////////////////////////////////////////////////

15

16 getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.tag.id3v1.php', __FILE__, true);

17

18 class getid3_write_id3v1

33 $this->setRealFileSize();

34 if (($this->filesize <= 0) || !getid3_lib::intValueSupported($this->filesize)) {

35 $this->errors[] = 'Unable to WriteID3v1('.$this->filename.') because filesize ('.$this->filesize.') is larger than '.round(PHP_INT_MAX / 1073741824).'GB';

36 return false;

37 }

api.php (https://github.com/mmakaay/Modules.git) PHP · 224 lines

1 <?php

2

3 /**

47 // We only need to include the english language file in that case.

48 if (! isset($PHORUM['DATA']['LANG']['mod_google_maps'])) {

49 include_once dirname(__FILE__) . "/lang/english.php";

50 }

51

111 // Grab the map code.

112 ob_start();

113 include dirname(__FILE__) . "/maptool/{$maptool_type}.php";

114 $maptool = ob_get_contents();

class.redux_filesystem.php (https://gitlab.com/mattswann/launch-housing) PHP · 215 lines

1 <?php

2

3 if ( ! defined( 'ABSPATH' ) ) {

39 if ( false === ( $this->creds = request_filesystem_credentials( $form_url, $method, false, $context ) ) ) {

40 $this->creds = array();

41 $this->parent->ftp_form = ob_get_contents();

42 ob_end_clean();

43

56 /* incorrect connection data - ask for credentials again, now with error message */

57 request_filesystem_credentials( $form_url, '', true, $context );

58 $this->parent->ftp_form = ob_get_contents();

59 ob_end_clean();

60

76

77 // Setup the filesystem with creds

78 require_once( ABSPATH . '/wp-admin/includes/template.php' );

79 require_once( ABSPATH . '/wp-admin/includes/file.php' );

widgets.php (https://bitbucket.org/bsnowman/classyblog.git) PHP · 574 lines

1 <?php

2 /**

3 *

540 ob_start();

541 the_widget( $widget_name, $args['instance'], array( 'before_title' => '', 'after_title' => '', 'widget_id' => '-1' ) );

542 $out = ob_get_contents();

543 ob_end_clean();

544 return $out;

walker_menubar_start_el.php (https://gitlab.com/relacilia/cakra) PHP · 112 lines

1 <?php

2 function walker_menubar_start_el( $item_output, $item, $depth, $args ){

3 global $wp_registered_widgets, $wp_registered_sidebars;

85 }

86

87 $menubar_widgets_output .= ob_get_contents();

88 ob_end_clean();

89 }

view.php (https://github.com/shin2/concrete5.git) PHP · 124 lines

92 }

93

94 if (file_exists(DIR_MODELS . '/' . DIRNAME_ATTRIBUTES . '/' . DIRNAME_ATTRIBUTE_TYPES . '/' . $atHandle . '/' . $view . '.php')) {

95 $file = DIR_MODELS . '/' . DIRNAME_ATTRIBUTES . '/' . DIRNAME_ATTRIBUTE_TYPES . '/' . $atHandle . '/' . $view . '.php';

99 $pkgHandle = PackageList::getHandle($this->attributeType->getPackageID());

100 $dirp = is_dir(DIR_PACKAGES . '/' . $pkgHandle) ? DIR_PACKAGES . '/' . $pkgHandle : DIR_PACKAGES_CORE . '/' . $pkgHandle;

101 if (file_exists($dirp . '/' . DIRNAME_MODELS . '/' . DIRNAME_ATTRIBUTES . '/' . DIRNAME_ATTRIBUTE_TYPES . '/' . $atHandle . '/' . $view . '.php')) {

102 $file = $dirp . '/' . DIRNAME_MODELS . '/' . DIRNAME_ATTRIBUTES . '/' . DIRNAME_ATTRIBUTE_TYPES . '/' . $atHandle . '/' . $view . '.php';

105

106 if (!isset($file)) {

107 if (file_exists(DIR_MODELS_CORE . '/' . DIRNAME_ATTRIBUTES . '/' . DIRNAME_ATTRIBUTE_TYPES . '/' . $atHandle . '/' . $view . '.php')) {

108 $file = DIR_MODELS_CORE . '/' . DIRNAME_ATTRIBUTES . '/' . DIRNAME_ATTRIBUTE_TYPES . '/' . $atHandle . '/' . $view . '.php';

117

118 if ($return) {

119 $contents = ob_get_contents();

120 ob_end_clean();

121 return $contents;

unicode.php (https://github.com/shafiqissani/IgenxSolutions.git) PHP · 269 lines

1 <?php

2 /**

3 * @version $Id: unicode.php 7692 2007-06-08 20:41:29Z tcp $

8 * Portions created by the Initial Developer are Copyright (C) 1998

9 * the Initial Developer. All Rights Reserved.

10 * Ported to PHP by Henri Sivonen (http://hsivonen.iki.fi)

11 * Slight modifications to fit with phputf8 library by Harry Fuecks (hfuecks gmail com)

12 * @see http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUTF8ToUnicode.cpp

13 * @see http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUnicodeToUTF8.cpp

14 * @see http://hsivonen.iki.fi/php-utf8/

15 * @package utf8

16 * @subpackage unicode

24 * are not allowed.

25 * Returns false if the input string isn't a valid UTF-8 octet sequence

26 * and raises a PHP error at level E_USER_WARNING

27 * Note: this function has been modified slightly in this library to

28 * trigger errors on encountering bad bytes

index.php (https://github.com/postme/PHP-NIST-RBAC-library.git) PHP · 338 lines

1 <?php

2 /**

3 * NIST Core RBAC

6 * @version 0.66

7 * @copyright M.E. Post

8 * @license http://opensource.org/licenses/gpl-license.php GNU Public License

9 */

10

11 /**

12 * NIST RBAC PHP API Test Framework

13 */

14

21 * Include the helper functions

22 */

23 include dirname(__FILE__) . '/../../include/php/include.php';

24

25 /**

ExportToValue.php (https://bitbucket.org/gfelizola/pacaembu-institucional.git) PHP · 270 lines

1 <?php

2 /*

3 "Contact Form to Database" Copyright (C) 2011-2012 Michael Simpson (email : michael.d.simpson@gmail.com)

20 */

21

22 require_once('ExportBase.php');

23 require_once('CFDBExport.php');

247 break;

248 }

249 $output = ob_get_contents();

250 ob_end_clean();

251 // If called from a shortcode, need to return the text,

Class.php (https://github.com/allanfreitas/php-framework-benchmarks.git) PHP · 244 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: Class.php 20378 2010-01-18 14:38:21Z mabe $

21 */

22

24 * @see Zend_Cache_Core

25 */

26 require_once 'Zend/Cache/Core.php';

27

28

220 ob_implicit_flush(false);

221 $return = call_user_func_array(array($this->_cachedEntity, $name), $parameters);

222 $output = ob_get_contents();

223 ob_end_clean();

224 $data = array($output, $return);

session.test.php (https://github.com/cgajardo/repositorium.git) PHP · 236 lines

1 <?php

2 /**

3 * SessionHelperTest file

5 * PHP versions 4 and 5

6 *

7 * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing>

8 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)

9 *

12 *

13 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)

14 * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests

15 * @package cake

16 * @subpackage cake.tests.cases.libs.view.helpers

17 * @since CakePHP(tm) v 1.2.0.4206

18 * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License

proxy.php (https://github.com/nbcutech/o3drupal.git) PHP · 66 lines

1 <?php

2 // FILE: proxy.php

10 // client script are only allowed to make requests to the same

11 // host that the script is served from. This is to prevent

12 // "cross-domain" scripting. With proxy.php, the javascript

13 // client can pass the requested URL in and get back the

14 // response from the external server.

15 //

16 // USAGE: "proxy_url" required parameter. For example:

17 // http://www.mydomain.com/proxy.php?proxy_url=http://www.yahoo.com

18 //

19

20 // proxy.php requires Troy's class_http. http://www.troywolf.com/articles

21 // Alter the path according to your environment.

22 require_once("class_http.php");

Helper.php (https://gitlab.com/ntphuc/BackendFeedy) PHP · 303 lines

1 <?php

2

3 namespace Yajra\Datatables;

103 }

104

105 $str = ob_get_contents();

106 ob_end_clean();

107

templateView.php (https://gitlab.com/billyprice1/Addon-Frontend) PHP · 218 lines

1 <?php

2 require_once('markerManager.php');

128 if (!is_file($templatePath . $templateFile)) throw new Exception(sprintf('Template file &quot;%s&quot; not found in the template path', $templateFile) );

129

130 if ($extension == 'php') {

131 ob_flush();

132 ob_start();

133 include($templatePath . $templateFile);

134 $output = ob_get_contents();

135 ob_end_clean();

136 return $output;

197 } else if (@is_file($templatePath . $markerName . '.html')) {

198 $content = $this->render($markerName . '.html');

199 } else if (@is_file($templatePath . $markerName . '.php')) {

200 $content = $this->getTemplate($markerName . '.php');

lmbTestTreeDirNodeTest.class.php (https://github.com/limb-php-framework/limb-app-buildman.git) PHP · 461 lines

115 touch(LIMB_VAR_DIR . '/FooTest.klass.php');

116

117 $node = new lmbTestTreeDirNode(LIMB_VAR_DIR, array('*test.php', '*Test.klass.php'), '%s.klass.php');

118 $nodes = $node->getChildren();

119 $this->assertEqual(sizeof($nodes), 3);

254 file_put_contents(LIMB_VAR_DIR . '/a/.setup.php', '<?php echo "|wow_start|"; ?>');

255 file_put_contents(LIMB_VAR_DIR . '/a/.teardown.php', '<?php echo "|wow_end|"; ?>');

256

257 file_put_contents(LIMB_VAR_DIR . '/a/skipped1_test.php', $skipped_test1->generate());

426 file_put_contents(LIMB_VAR_DIR . '/a/b/foo_test.php', $test2->generate());

427

428 file_put_contents(LIMB_VAR_DIR . '/a/b/.ignore.php', '<?php return false; ?>');

429

430 $root_node = new lmbTestTreeDirNode(LIMB_VAR_DIR);

443 $test = new GeneratedTestClass();

444

445 file_put_contents(LIMB_VAR_DIR . '/a/.setup.php', '<?php echo "No!" ?>');

446 file_put_contents(LIMB_VAR_DIR . '/a/bar_test.php', $test->generate());

dumper.php (https://github.com/limb-php-framework/limb-app-buildman.git) PHP · 402 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: dumper.php 4378 2006-10-27 10:04:53Z pachanga $

7 */

8 /**

353 ob_start();

354 print_r($variable);

355 $formatted = ob_get_contents();

356 ob_end_clean();

357 return $formatted;

383 /**

384 * Tries to determine if the method call is an assertion.

385 * @param array $frame PHP stack frame.

386 * @access private

387 * @static

cron-svn-pots.php (https://bitbucket.org/rchlmrtn/chiari.git) PHP · 117 lines

1 <?php

2 require_once dirname( __FILE__ ) . '/makepot.php';

6 ob_start();

7 system( "$command 2>&1", $exit_code );

8 $output = ob_get_contents();

9 ob_end_clean();

10 if ( $exit_code != 0 ) {

32 -d Dry-run

33 -f Fast - do not update checkouts

34 <?php

35 die;

36 }

dumper.php (https://github.com/kennethjiang/Wolke.git) PHP · 360 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: dumper.php,v 1.29 2006/05/13 14:37:16 lastcraft Exp $

7 */

8 /**

353 ob_start();

354 print_r($variable);

355 $formatted = ob_get_contents();

356 ob_end_clean();

357 return $formatted;

session.test.php (https://github.com/motaheri/Coordino.git) PHP · 236 lines

1 <?php

2 /**

3 * SessionHelperTest file

5 * PHP versions 4 and 5

6 *

7 * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing>

8 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)

9 *

12 *

13 * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)

14 * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests

15 * @package cake

16 * @subpackage cake.tests.cases.libs.view.helpers

17 * @since CakePHP(tm) v 1.2.0.4206

18 * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License

Spawn.php (https://github.com/Spawnm/Spawn-Framework.git) PHP · 201 lines

1 <?php

2 /**

3 * Spawn Framework

40

41 /**

42 * load bootstrap.php

43 */

44 public function bootstrap($di)

136

137 if(Config::load('Uri')->get('base') != $base) {

138 $config = include(ROOT_PATH.'Bin/Config/Uri.php');

139

140 $config['base'] = $base;

141 Config::load('Uri')->set('base',$base);

142

143 $data = '<?php '.PHP_EOL.'return $config = '.var_export($config, true).';';

144 file_put_contents(ROOT_PATH.'Bin/Config/Uri.php', $data);

OutputTestCase.php (https://github.com/robertleeplummerjr/bluebox.git) PHP · 195 lines

39 * @author Sebastian Bergmann <sb@sebastian-bergmann.de>

40 * @copyright 2002-2009 Sebastian Bergmann <sb@sebastian-bergmann.de>

41 * @license http://www.opensource.org/licenses/bsd-license.php BSD License

42 * @version SVN: $Id: OutputTestCase.php 4404 2008-12-31 09:27:18Z sb $

45 */

46

47 require_once 'PHPUnit/Framework.php';

48 require_once 'PHPUnit/Util/Filter.php';

49

50 PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');

51

52 /**

62 * @since Class available since Release 3.0.0

63 */

64 abstract class PHPUnit_Extensions_OutputTestCase extends PHPUnit_Framework_TestCase

65 {

66 /**

ClassFrontendTest.php (https://github.com/WebTricks/WebTricks-CMS.git) PHP · 280 lines

1 <?php

2 /**

3 * Zend Framework

26 require_once 'Zend/Cache.php';

27 require_once 'Zend/Cache/Frontend/Class.php';

28 require_once 'Zend/Cache/Backend/Test.php';

31 * PHPUnit test case

32 */

33 require_once 'PHPUnit/Framework/TestCase.php';

34

35 /**

144 ob_implicit_flush(false);

145 $return = $this->_instance1->foobar('param1', 'param2');

146 $data = ob_get_contents();

147 ob_end_clean();

148 ob_implicit_flush(true);

php.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 2590 lines

11 </PROPS>

12 <RULES IGNORE_CASE="TRUE">

13 <SPAN TYPE="MARKUP" DELEGATE="PHP">

14 <BEGIN>&lt;?php</BEGIN>

16 </SPAN>

17

18 <SPAN TYPE="MARKUP" DELEGATE="PHP">

19 <BEGIN>&lt;?</BEGIN>

20 <END>?&gt;</END>

21 </SPAN>

22

23 <SPAN TYPE="MARKUP" DELEGATE="PHP">

24 <BEGIN>&lt;%=</BEGIN>

25 <END>%&gt;</END>

64

65 <RULES SET="TAGS" DEFAULT="MARKUP">

66 <SPAN TYPE="MARKUP" DELEGATE="PHP">

67 <BEGIN>&lt;?php</BEGIN>

index.php (https://github.com/LeifW/Janrain-Sample-Code.git) PHP · 91 lines

1 <?php

2 /**

3 * Copyright 2011

6 */

7 /**

8 * Below is a very simple PHP 5 script that

9 * implements an Engage token URL to collect

10 * and output the results from auth_info.

11 * The code below assumes you have the

12 * CURL HTTP fetching library with SSL and

13 * PHP JSON support.

14 */

15

16 ob_start();

17 require_once('../library/engage.auth.lib.php');

18 $debug_array = array('Debug out:');

19

math-fallback.php (https://github.com/livinglab/openlab.git) PHP · 164 lines

1 <?php

2

3 if ( ! class_exists( 'Jetpack_Protect_Math_Authenticate' ) ) {

81 ob_start();

82 ?>

83 <h2><?php esc_html_e( 'Please solve this math problem to prove that you are not a bot. Once you solve it, you will need to log in again.', 'jetpack' ); ?></h2>

84 <?php if ($error): ?>

85 <h3><?php esc_html_e( 'Your answer was incorrect, please try again.', 'jetpack' ); ?></h3>

86 <?php endif ?>

87

88 <form action="<?php echo wp_login_url(); ?>" method="post" accept-charset="utf-8">

89 <?php Jetpack_Protect_Math_Authenticate::math_form(); ?>

90 <input type="hidden" name="jetpack_protect_process_math_form" value="1" id="jetpack_protect_process_math_form" />

91 <p><input type="submit" value="<?php esc_attr_e( 'Continue &rarr;', 'jetpack' ); ?>"></p>

92 </form>

93 <?php

Error_Handler.class.php (https://github.com/slikk66/DbAdmin.git) PHP · 450 lines

1 <?php

2 /* vim: set expandtab sw=4 ts=4 sts=4: */

3 /**

4 * Holds class PMA_Error_Handler

5 *

6 * @package PhpMyAdmin

7 */

8

9 if (! defined('PHPMYADMIN')) {

10 exit;

11 }

14 *

15 */

16 require_once './libraries/Error.class.php';

17

18 /**

callback.php (https://github.com/bolis97/joomla-cms.git) PHP · 171 lines

1 <?php

2 /**

3 * @package Joomla.Platform

29 *

30 * The callback definition can be in several forms:

31 * - Standard PHP Callback array see <http://php.net/callback> [recommended]

32 * - Function name as a string eg. 'foo' for function foo()

33 * - Static method name as a string eg. 'MyClass::myMethod' for method myMethod() of class MyClass

64 // Normalize callback

65 if (is_array($callback)) {

66 // We have a standard php callback array -- do nothing

67 } elseif (strstr($callback, '::')) {

68 // This is shorthand for a static method callback classname::methodname

73 * This is a really not so smart way of doing this... we provide this for backward compatability but this

74 * WILL! disappear in a future version. If you are using this syntax change your code to use the standard

75 * PHP callback array syntax: <http://php.net/callback>

76 *

77 * We have to use some silly global notation to pull it off and this is very unreliable

ClassFrontend.php (https://github.com/leerbag/zf2.git) PHP · 255 lines

1 <?php

2 /**

3 * Zend Framework

221 ob_implicit_flush(false);

222 $return = call_user_func_array(array($this->_cachedEntity, $name), $parameters);

223 $output = ob_get_contents();

224 ob_end_clean();

225 $data = array($output, $return);

ReleaseTest.php (https://github.com/ewandor/horde.git) PHP · 257 lines

1 <?php

2 /**

3 * Test the version processing.

4 *

5 * PHP version 5

6 *

7 * @category Horde

10 * @author Gunnar Wrobel <wrobel@pardus.de>

11 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1

12 * @link http://pear.horde.org/index.php?package=Release

13 */

14

16 * Prepare the test setup.

17 */

18 require_once dirname(__FILE__) . '/../Autoload.php';

19

20 /**

dynamic-cache-test.php (https://gitlab.com/darmawan.fatria/df-skp-2014) PHP · 182 lines

1 <?php

2

3 /*

17 * Placeholder/template tag: the string of random characters placed in your

18 * theme file or printed in an action where the dynamic content will go.

19 * Output buffer (ob): any text that is printed by PHP to be sent to the browser

20 * but captured by PHP for further manipulation.

102 * to be written to that cache file but also, it has to be replaced with

103 * dynamic content before the page is shown to the user.

104 * More on output buffers here: http://php.net/ob_start

105 *

106 * Unfortunately an extra output buffer is often required when capturing dynamic

107 * content such as sidebar widgets. Due to a quirk of the way PHP works it's

108 * not possible to have an output buffer run in an output buffer callback. That

109 * dynamic content has to be generated before the callback function is reached.

class_form.php (https://github.com/nadavkav/MoodleTAO.git) PHP · 418 lines

1 <?php

2 //----------------------------------------------------------------------------------------------

3 // Desc: Print out form elements and their labels in a standardised way

274 function getAddRemoveSupportingJavascript() {

275 // WARNING: Make sure the javascript only gets outputted once on the page

276 if (! strpos(ob_get_contents(), 'addSearchToDestList')) {

277 ob_start();

278 ?>

355 }

356 </script>

357 <?php

358 }

359 }

Head.php (https://github.com/urkle/INQ-Calculators.git) PHP · 279 lines

1 <?php

2 /*

3 * Head.php

154 }

155 if (self::$memcached) {

156 self::$memcached->set($tag.'-'.$modstamp, ob_get_contents());

157 ob_end_flush();

158 }

cron_trait.php (https://github.com/markn86/moodle.git) PHP · 129 lines

1 <?php

2 // This file is part of Moodle - http://moodle.org/

3 //

40 $cron = new \mod_forum\task\cron_task();

41 $cron->execute();

42 $output = ob_get_contents();

43 ob_end_clean();

44

83 ob_start();

84 $this->runAdhocTasks(\mod_forum\task\send_user_notifications::class, $user->id);

85 $output = ob_get_contents();

86 ob_end_clean();

87

109 ob_start();

110 $this->runAdhocTasks(\mod_forum\task\send_user_digests::class, $user->id);

111 $output = ob_get_contents();

112 ob_end_clean();

113

ExportToValue.php (https://gitlab.com/VTTE/sitios-vtte) PHP · 296 lines

1 <?php

2 /*

3 "Contact Form to Database" Copyright (C) 2011-2012 Michael Simpson (email : michael.d.simpson@gmail.com)

20 */

21

22 require_once('ExportBase.php');

23 require_once('CFDBExport.php');

24 require_once('CFDBShortCodeContentParser.php');

25

26 class ExportToValue extends ExportBase implements CFDBExport {

271 }

272 echo $after;

273 $output = ob_get_contents();

274 ob_end_clean();

275 // If called from a shortcode, need to return the text,

Reporting.php (https://github.com/timglabisch/pimcore.git) PHP · 231 lines

13 * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence

14 * @link http://pear.php.net/package/PHP_CodeSniffer

15 */

16

18 include_once dirname(__FILE__).'/../CodeSniffer.php';

19 } else {

20 include_once 'PHP/CodeSniffer.php';

21 }

22

32 * @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence

33 * @version Release: 1.4.3

34 * @link http://pear.php.net/package/PHP_CodeSniffer

35 */

36 class PHP_CodeSniffer_Reporting

58 if (false === ($reportClass instanceof PHP_CodeSniffer_Report)) {

59 throw new PHP_CodeSniffer_Exception('Class "'.$reportClassName.'" must implement the "PHP_CodeSniffer_Report" interface.');

60 }

61

dumper.php (https://github.com/jonaustin/craigslist-housing-mapper.git) PHP · 402 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: dumper.php 4 2006-04-25 02:08:26Z phpnut $

7 */

8 /**

353 ob_start();

354 print_r($variable);

355 $formatted = ob_get_contents();

356 ob_end_clean();

357 return $formatted;

383 /**

384 * Tries to determine if the method call is an assertion.

385 * @param array $frame PHP stack frame.

386 * @access private

387 * @static

svs3_stats_gameday2.php (https://github.com/miguelwicht/SVS-Web-App.git) PHP · 251 lines

5 ?>

6 <?

7 include("../mysql/dbConnect.php");

8 mysql_query("set names utf8;");

9 /*

245

246 $fp =fopen($cachefile,'w');

247 fwrite($fp, ob_get_contents());

248 fclose($fp);

249 ob_end_flush();

topspin_shortcodes.php (https://github.com/ezmiller/topspin-wordpress.git) PHP · 176 lines

45 $templatefile = 'templates/topspin-'.$templateMode.'/featured-item.php';

46 ## 3.1

47 if(file_exists(TOPSPIN_CURRENT_THEME_PATH.'/topspin-'.$templateMode.'/featured-item.php')) { $templatefile = TOPSPIN_CURRENT_THEME_PATH.'/topspin-'.$templateMode.'/featured-item.php'; }

48 elseif(file_exists(TOPSPIN_CURRENT_THEMEPARENT_PATH.'/topspin-'.$templateMode.'/featured-item.php')) { $templatefile = TOPSPIN_CURRENT_THEMEPARENT_PATH.'/topspin-'.$templateMode.'/featured-item.php'; }

49 ## 3.0.0

50 if(file_exists(TOPSPIN_CURRENT_THEME_PATH.'/topspin-templates/featured-item.php')) { $templatefile = TOPSPIN_CURRENT_THEME_PATH.'/topspin-templates/featured-item.php'; }

51 elseif(file_exists(TOPSPIN_CURRENT_THEMEPARENT_PATH.'/topspin-templates/featured-item.php')) { $templatefile = TOPSPIN_CURRENT_THEMEPARENT_PATH.'/topspin-templates/featured-item.php'; }

101 $templatefile = 'templates/topspin-'.$templateMode.'/item-listings.php';

102 ## 3.1

103 if(file_exists(TOPSPIN_CURRENT_THEME_PATH.'/topspin-'.$templateMode.'/item-listings.php')) { $templatefile = TOPSPIN_CURRENT_THEME_PATH.'/topspin-'.$templateMode.'/item-listings.php'; }

104 elseif(file_exists(TOPSPIN_CURRENT_THEMEPARENT_PATH.'/topspin-'.$templateMode.'/item-listings.php')) { $templatefile = TOPSPIN_CURRENT_THEMEPARENT_PATH.'/topspin-'.$templateMode.'/item-listings.php'; }

168 if(file_exists(TOPSPIN_CURRENT_THEME_PATH.'/topspin-templates/nav-menu.php')) { $templatefile = TOPSPIN_CURRENT_THEME_PATH.'/topspin-templates/nav-menu.php'; }

169 elseif(file_exists(TOPSPIN_CURRENT_THEMEPARENT_PATH.'/topspin-templates/nav-menu.php')) { $templatefile = TOPSPIN_CURRENT_THEMEPARENT_PATH.'/topspin-templates/nav-menu.php'; }

170 include($templatefile);

171 $html = ob_get_contents();

fBuffer.php (https://github.com/shalinipriya/combaticus.git) PHP · 269 lines

1 <?php

2 /**

3 * Provides a single, simplified interface for [http://php.net/outcontrol output buffering] to prevent nested buffering issues and provide a more logical API

82 );

83 }

84 return ob_get_contents();

85 }

86

118

119 // ob_get_clean() actually turns off output buffering, so we do it the long way

120 $contents = ob_get_contents();

121 ob_clean();

122

147 * Starts output buffering

148 *

149 * @param boolean $gzip If the buffered output should be gzipped using [http://php.net/ob_gzhandler `ob_gzhandler()`]

150 * @return void

151 */

easy_xml.php (https://github.com/evpozdniakov/FW.git) PHP · 118 lines

1 <?php

2

3 ###################################################################################

4 #

5 # XML Library, by Keith Devens, version 1.2b

6 # http://keithdevens.com/software/phpxml

7 #

8 # This code is Open Source, released under terms similar to the Artistic License.

13 ###################################################################################

14 # XML_unserialize: takes raw XML as a parameter (a string)

15 # and returns an equivalent PHP data structure

16 ###################################################################################

17 function & XML_unserialize(&$xml){

22 }

23 ###################################################################################

24 # XML_serialize: serializes any PHP data structure into XML

25 # Takes one parameter: the data to serialize. Must be an array.

26 ###################################################################################

%%8A^8A9^8A9DBDDF%%submissionsInEditing.tpl.php (https://github.com/mcrider/pkpUpgradeTestSuite.git) PHP · 75 lines

1 <?php /* Smarty version 2.6.10, created on 2005-09-21 12:20:14

2 compiled from editor/submissionsInEditing.tpl */ ?>

3 <?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');

4 smarty_core_load_plugins(array('plugins' => array(array('function', 'translate', 'editor/submissionsInEditing.tpl', 17, false),array('function', 'page_info', 'editor/submissionsInEditing.tpl', 58, false),array('function', 'page_links', 'editor/submissionsInEditing.tpl', 59, false),array('block', 'iterate', 'editor/submissionsInEditing.tpl', 31, false),array('modifier', 'date_format', 'editor/submissionsInEditing.tpl', 36, false),array('modifier', 'escape', 'editor/submissionsInEditing.tpl', 37, false),array('modifier', 'truncate', 'editor/submissionsInEditing.tpl', 38, false),)), $this); ?>

5

48 " class="action"><?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['submission']->getArticleTitle())) ? $this->_run_mod_handler('truncate', true, $_tmp, 40, "...") : smarty_modifier_truncate($_tmp, 40, "...")))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>

49 </a></td>

50 <td><?php if ($this->_tpl_vars['submission']->getCopyeditorDateFinalCompleted()): echo ((is_array($_tmp=$this->_tpl_vars['submission']->getCopyeditorDateFinalCompleted())) ? $this->_run_mod_handler('date_format', true, $_tmp, $this->_tpl_vars['dateFormatTrunc']) : smarty_modifier_date_format($_tmp, $this->_tpl_vars['dateFormatTrunc'])); else: ?>&mdash;<?php endif; ?></td>

51 <td><?php if ($this->_tpl_vars['layoutAssignment']->getDateCompleted()): echo ((is_array($_tmp=$this->_tpl_vars['layoutAssignment']->getDateCompleted())) ? $this->_run_mod_handler('date_format', true, $_tmp, $this->_tpl_vars['dateFormatTrunc']) : smarty_modifier_date_format($_tmp, $this->_tpl_vars['dateFormatTrunc'])); else: ?>&mdash;<?php endif; ?></td>

52 <td><?php if ($this->_tpl_vars['proofAssignment']->getDateLayoutEditorCompleted()): echo ((is_array($_tmp=$this->_tpl_vars['proofAssignment']->getDateLayoutEditorCompleted())) ? $this->_run_mod_handler('date_format', true, $_tmp, $this->_tpl_vars['dateFormatTrunc']) : smarty_modifier_date_format($_tmp, $this->_tpl_vars['dateFormatTrunc'])); else: ?>&mdash;<?php endif; ?></td>

53 <td><?php $this->assign('editAssignment', $this->_tpl_vars['submission']->getEditor()); echo $this->_tpl_vars['editAssignment']->getEditorInitials(); ?>

57 <td colspan="9" class="<?php if ($this->_tpl_vars['submissions']->eof()): ?>end<?php endif; ?>separator">&nbsp;</td>

58 </tr>

59 <?php $_block_content = ob_get_contents(); ob_end_clean(); echo $this->_plugins['block']['iterate'][0][0]->smartyIterate($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat=false); } array_pop($this->_tag_stack); if ($this->_tpl_vars['submissions']->wasEmpty()): ?>

60 <tr>

61 <td colspan="9" class="nodata"><?php echo $this->_plugins['function']['translate'][0][0]->smartyTranslate(array('key' => "submissions.noSubmissions"), $this);?>

class-activetables-admin.php (https://gitlab.com/ogar.vasily/activetables) PHP · 203 lines

1 <?php

2

3 /**

96 if ($action == 'edit') {

97 ob_start();

98 include_once(WPAT_PLUGIN_DIR . 'admin/partials/edit-table.tpl.php');

99 $page_content = ob_get_contents();

118

119 ob_start();

120 include_once(WPAT_PLUGIN_DIR . 'admin/partials/all-tables.tpl.php');

121 $page_content = ob_get_contents();

139

140 ob_start();

141 include_once(WPAT_PLUGIN_DIR . 'admin/partials/edit-table.tpl.php');

142 $page_content = ob_get_contents();

template.class.php (https://github.com/saePixel/jcore.git) PHP · 294 lines

1 <?php

2

3 /***************************************************************************

4 * template.class.php

5 *

6 * Jul 05, 07:00:00 2009

41 template::$selected = $row;

42

43 if (@is_file('template/'.WEBSITE_TEMPLATE.'/template.php'))

44 include_once('template/'.WEBSITE_TEMPLATE.'/template.php');

71 $obcontent = null;

72 $successfiles = $this->installFiles();

73 $obcontent = ob_get_contents();

74

75 ob_end_clean();

issue183268.php (https://gitlab.com/essere.lab.public/qualitas.class-corpus) PHP · 151 lines

1 <?php

2

3 /*

4 * $LastChangedDate: 2010-04-14 03:44:57 +0200 (Wed, 14 Apr 2010) $

5 * $Rev: 1550 $

6 * $Id: Recruiters.php 1550 2010-04-14 01:44:57Z goran $

7 */

8

80 href=":server:/js/dojox/form/resources/FileInput.css?:version:"

81 type="text/css" />

82 <?php

83 $this->css = ob_get_contents();

dumper.php (https://github.com/akelos/v1.git) PHP · 402 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: dumper.php,v 1.28 2006/01/03 01:17:07 lastcraft Exp $

7 */

8 /**

353 ob_start();

354 print_r($variable);

355 $formatted = ob_get_contents();

356 ob_end_clean();

357 return $formatted;

383 /**

384 * Tries to determine if the method call is an assertion.

385 * @param array $frame PHP stack frame.

386 * @access private

387 * @static

shortcodes.php (https://bitbucket.org/adatux_/uakami.git) PHP · 737 lines

1 <?php

2

3 /**

164

165 // Put output into usable variable

166 $output = ob_get_contents();

167

168 // Unset globals

%%AF^AFD^AFD65FDE%%backIssues.tpl.php (https://github.com/mcrider/pkpUpgradeTestSuite.git) PHP · 88 lines

1 <?php /* Smarty version 2.6.9, created on 2005-07-08 06:01:58

2 compiled from editor/issues/backIssues.tpl */ ?>

3 <?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');

4 smarty_core_load_plugins(array('plugins' => array(array('function', 'translate', 'editor/issues/backIssues.tpl', 17, false),array('function', 'page_info', 'editor/issues/backIssues.tpl', 59, false),array('function', 'page_links', 'editor/issues/backIssues.tpl', 60, false),array('block', 'iterate', 'editor/issues/backIssues.tpl', 39, false),array('modifier', 'date_format', 'editor/issues/backIssues.tpl', 42, false),array('modifier', 'escape', 'editor/issues/backIssues.tpl', 44, false),)), $this); ?>

5

47 <?php $this->_tag_stack[] = array('iterate', array('from' => 'issues','item' => 'issue')); $this->_plugins['block']['iterate'][0][0]->smartyIterate($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat=true);while ($_block_repeat) { ob_start(); ?>

48 <tr valign="top">

49 <td><a href="<?php echo $this->_tpl_vars['requestPageUrl']; ?>

50 /issueToc/<?php echo $this->_tpl_vars['issue']->getIssueId(); ?>

58 /removeIssue/<?php echo $this->_tpl_vars['issue']->getIssueId(); ?>

59 " onclick="return confirm('<?php echo ((is_array($_tmp=$this->_plugins['function']['translate'][0][0]->smartyTranslate(array('key' => "editor.issues.confirmDelete"), $this))) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript'));?>

60 ')" class="action"><?php echo $this->_plugins['function']['translate'][0][0]->smartyTranslate(array('key' => "common.delete"), $this);?>

62 </tr>

63 <tr>

64 <td colspan="4" class="<?php if ($this->_tpl_vars['issues']->eof()): ?>end<?php endif; ?>separator">&nbsp;</td>

65 </tr>

66 <?php $_block_content = ob_get_contents(); ob_end_clean(); echo $this->_plugins['block']['iterate'][0][0]->smartyIterate($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat=false); } array_pop($this->_tag_stack); if ($this->_tpl_vars['issues']->wasEmpty()): ?>

COMObject.class.php (https://github.com/Gamepay/xp-contrib.git) PHP · 206 lines

1 <?php

2 /* This class is part of the XP framework

3 *

199 ob_start();

200 com_print_typeinfo($this->h);

201 preg_match('/class ([^ ]+) \{ \/\* GUID=([^ ]+) \*\//', ob_get_contents(), $matches);

202 ob_end_clean();

203 return $this->getClassName().'(->'.get_class($this->h).'<'.$matches[1].'>@'.$matches[2].')';

%%AB^ABE^ABE61EE5%%contexts.tpl.php (https://github.com/mcrider/pkpUpgradeTestSuite.git) PHP · 90 lines

1 <?php /* Smarty version 2.6.9, created on 2005-07-08 06:02:02

2 compiled from rtadmin/contexts.tpl */ ?>

3 <?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');

4 smarty_core_load_plugins(array('plugins' => array(array('function', 'translate', 'rtadmin/contexts.tpl', 16, false),array('function', 'page_info', 'rtadmin/contexts.tpl', 45, false),array('function', 'page_links', 'rtadmin/contexts.tpl', 46, false),array('block', 'iterate', 'rtadmin/contexts.tpl', 30, false),array('modifier', 'escape', 'rtadmin/contexts.tpl', 34, false),)), $this); ?>

5

33 </tr>

34 <tr><td class="headseparator" colspan="3">&nbsp;</td></tr>

35 <?php $this->_tag_stack[] = array('iterate', array('from' => 'contexts','item' => 'context')); $this->_plugins['block']['iterate'][0][0]->smartyIterate($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat=true);while ($_block_repeat) { ob_start(); ?>

36 <tr valign="top">

37 <td><?php echo $this->_tpl_vars['context']->getTitle(); ?>

50 " class="action"><?php echo $this->_plugins['function']['translate'][0][0]->smartyTranslate(array('key' => "rt.admin.contexts.metadata"), $this);?>

51 </a>&nbsp;&nbsp;<a href="<?php echo $this->_tpl_vars['requestPageUrl']; ?>

52 /searches/<?php echo $this->_tpl_vars['version']->getVersionId(); ?>

60 </a></td>

61 </tr>

62 <tr><td class="<?php if ($this->_tpl_vars['contexts']->eof()): ?>end<?php endif; ?>separator" colspan="3"></td></tr>

63 <?php $_block_content = ob_get_contents(); ob_end_clean(); echo $this->_plugins['block']['iterate'][0][0]->smartyIterate($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat=false); } array_pop($this->_tag_stack); ?>

StoryTestCase.php (https://github.com/ewandor/horde.git) PHP · 177 lines

1 <?php

2 /**

3 * Base for scenario based testing of this package.

4 *

5 * PHP version 5

6 *

7 * @category Kolab

10 * @author Gunnar Wrobel <wrobel@pardus.de>

11 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1

12 * @link http://pear.horde.org/index.php?package=Kolab_Filter

13 */

14

26 * @author Gunnar Wrobel <wrobel@pardus.de>

27 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1

28 * @link http://pear.horde.org/index.php?package=Kolab_Filter

29 */

30 class Horde_Kolab_Filter_StoryTestCase

class-wp-customize-panel.php (https://gitlab.com/darmawan.fatria/df-skp-2014) PHP · 333 lines

250 ob_start();

251 $this->maybe_render();

252 $template = trim( ob_get_contents() );

253 ob_end_clean();

254 return $template;

296 $classes = 'accordion-section control-section control-panel control-panel-' . $this->type;

297 ?>

298 <li id="accordion-panel-<?php echo esc_attr( $this->id ); ?>" class="<?php echo esc_attr( $classes ); ?>">

299 <h3 class="accordion-section-title" tabindex="0">

300 <?php echo esc_html( $this->title ); ?>

305 </ul>

306 </li>

307 <?php

308 }

309

CLITest.php (https://github.com/GunioRobot/phpca.git) PHP · 180 lines

139 public function testRunDisplaysErrorWhenNoFilesToAnalyze()

140 {

141 $result = $this->runCLI(array('cli.php', '-p', trim(exec('which php')), __DIR__ . '/_testdata/Application/none'));

142

143 $this->assertContains('Error: No PHP files to analyze', $result);

160 public function testRunDisplayOkMessageWhenAnalyzingFilesWithoutViolations()

161 {

162 $result = $this->runCLI(array('cli.php', '-p', trim(exec('which php')), __DIR__ . '/_testdata/Application/pass'));

163

164 $this->assertContains("\n.\n", $result);

171 public function testRunDisplayLintErrorWhenAnalyzingFilesWithLintErrors()

172 {

173 $result = $this->runCLI(array('cli.php', '-p', trim(exec('which php')), __DIR__ . '/_testdata/lint_fail.php'));

174

175 $this->assertContains("\nE\n", $result);

tests.php4 (https://swig.svn.sourceforge.net/svnroot/swig) PHP · 228 lines ✨ Summary

This PHP code is a comprehensive class for validating and checking various aspects of PHP code, including classes, functions, variables, resources, and more. It provides methods to check for existence, type, equality, nullness, and resource status, as well as warning and failure messages. The class can be used to ensure the integrity and consistency of PHP code before execution.

1 <?php

2

3 // do we have true global vars or just GETSET functions?

204 ob_start();

205 var_dump($arg);

206 $result=ob_get_contents();

207 ob_end_clean();

208 return $result;