100+ results for 'php array_unshift'

Not the results you expected?

Logger.php (git://github.com/pmjones/php-framework-benchmarks.git) PHP · 393 lines

1 <?php

2

3 /*

107 public function pushHandler(HandlerInterface $handler)

108 {

109 array_unshift($this->handlers, $handler);

110 }

111

133 throw new \InvalidArgumentException('Processors must be valid callables (callback or object with an __invoke method), '.var_export($callback, true).' given');

134 }

135 array_unshift($this->processors, $callback);

136 }

137

160 {

161 if (!$this->handlers) {

162 $this->pushHandler(new StreamHandler('php://stderr', self::DEBUG));

163 }

164 $record = array(

Psr4Autoloader.php (https://github.com/sbourget/moodle.git) PHP · 148 lines

1 <?php

2

3 namespace Box\Spout\Autoloader;

5 /**

6 * Class Psr4Autoloader

7 * @see https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader-examples.md#class-example

8 */

9 class Psr4Autoloader

53 // retain the base directory for the namespace prefix

54 if ($prepend) {

55 \array_unshift($this->prefixes[$prefix], $baseDir);

56 } else {

57 \array_push($this->prefixes[$prefix], $baseDir);

114 // replace the namespace prefix with the base directory,

115 // replace namespace separators with directory separators

116 // in the relative class name, append with .php

117 $file = $baseDir

118 . \str_replace('\\', '/', $relativeClass)

package.module.nextgen_pagination.php (https://github.com/livinglab/openlab.git) PHP · 118 lines

1 <?php

2 /**

3 * Contains function(s) to generate a basic pagination widget

69 $prev_page = $selected_page - 1;

70 $link = $return['next'] = $this->object->set_param_for($current_url, 'nggpage', $prev_page);

71 array_unshift($pages, "<a class='next' href='{$link}' data-pageid={$prev_page}>{$prev_symbol}</a>");

72 }

73 $return['output'] = "<div class='ngg-navigation'>" . implode("\n", $pages) . "</div>";

fb-recommendations.php (https://github.com/elleeott/WPOC-boilerplate.git) PHP · 142 lines

1 <?php

2 function fb_get_recommendations_box($options = array()) {

3 if (empty($options['header'])) {

135 );

136

137 array_unshift($array['children'], $title_array, $header_array);

138 }

139

class.freshwork.php (https://bitbucket.org/freshworkstudio/sparta-ipad-pos.git) PHP · 230 lines

1 <?php

2 class Freshwork{

3 static $instance = null;

54 while (($model = readdir($dh)) !== false) {

55 if (!is_dir($dir.$model) && $model!="." && $model!=".."){

56 if(substr($model,-4) == ".php"){

57 //Convertir nombre de Archivos a Camel Case with _

58 $tmp[$dir.$model] = Model::file2name($model);

85 while (($model = readdir($dh)) !== false) {

86 if (!is_dir($dir.$model) && $model!="." && $model!=".."){

87 if(substr($model,-4) == ".php"){

88 //Convertir nombre de Archivos a Camel Case with _

89 $words = explode("_",substr($model,0,-4));

106 foreach($args as $js){

107 if(is_string($js)){

108 if($prepend)array_unshift($this->base_jss, $js);

109 else $this->base_jss[] = $js;

110 }

ObjectMixin.php (https://github.com/papousek/interlos-web.git) PHP · 178 lines

1 <?php

2

3 /**

63 // extension methods

64 if ($cb = $class->getExtensionMethod($name)) {

65 array_unshift($args, $_this);

66 return $cb->invokeArgs($args);

67 }

ObjectMixin.php (https://bitbucket.org/iiic/iszp.git) PHP · 247 lines

1 <?php

2

3 /**

66

67 } elseif ($cb = Reflection\ClassType::from($_this)->getExtensionMethod($name)) { // extension methods

68 array_unshift($args, $_this);

69 return $cb->invokeArgs($args);

70

Filter.php (https://github.com/miros/mvc_framework.git) PHP · 134 lines

1 <?php

2 /**

3 * PHPUnit

36 *

37 * @category Testing

38 * @package PHPUnit

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

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

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

42 * @link http://www.phpunit.de/

44 */

45

46 require_once 'File/Iterator/Factory.php';

47

48 /**

Main.php (https://bitbucket.org/kdms/sh-magento.git) PHP · 178 lines

1 <?php

2 class MW_FreeGift_Block_Adminhtml_Catalog_Edit_Tab_Main

3 extends Mage_Adminhtml_Block_Widget_Form

117 }

118 if (!$found) {

119 array_unshift($customerGroups, array('value'=>0, 'label'=>Mage::helper('catalogrule')->__('NOT LOGGED IN')));

120 }

121

autoloader.php (https://bitbucket.org/codeyash/bootstrap.git) PHP · 356 lines

1 <?php

2 /**

3 * Part of the Fuel framework.

8 * @license MIT License

9 * @copyright 2010 - 2013 Fuel Development Team

10 * @link http://fuelphp.com

11 */

12

200 if ($prefix)

201 {

202 array_unshift(static::$core_namespaces, $namespace);

203 }

204 else

316 $file = str_replace('\\', DS, $namespace).DS;

317 }

318 $file .= str_replace('_', DS, $class).'.php';

319

320 if ( ! $psr)

ORMWrapper.php (https://github.com/zephrax/cotyledon.git) PHP · 137 lines

1 <?php

2

3 namespace DB;

13 *

14 * You should include Idiorm before you include this file:

15 * require_once 'your/path/to/idiorm.php';

16 *

17 * BSD Licensed.

80 $args = func_get_args();

81 $filter_function = array_shift($args);

82 array_unshift($args, $this);

83 if (method_exists($this->_class_name, $filter_function)) {

84 return call_user_func_array(array($this->_class_name, $filter_function), $args);

RedirectMiddleware.php (https://gitlab.com/suporte.spturis/carnaval2015.spturis.com.br) PHP · 177 lines

1 <?php

2

3 namespace YoastSEO_Vendor\GuzzleHttp;

95 $historyHeader = $response->getHeader(self::HISTORY_HEADER);

96 $statusHeader = $response->getHeader(self::STATUS_HISTORY_HEADER);

97 \array_unshift($historyHeader, $uri);

98 \array_unshift($statusHeader, $statusCode);

functions.inc.php (https://github.com/martijnvermaat/quick-hacks.git) PHP · 160 lines

1 <?php

2 // UTF-8 functions

3 require_once(dirname(__FILE__) .'/includes/utf8.php');

4

5 // Translation

6 require_once(dirname(__FILE__) .'/includes/php-gettext/gettext.inc');

7 $domain = 'messages';

8 T_setlocale(LC_MESSAGES, $locale);

68 if (is_array($result)) {

69 $return = $result;

70 array_unshift($return, $key);

71 return $return;

72 } elseif ($result == true) {

88 global $cleanurls, $root;

89 if (!$cleanurls && $page != '') {

90 $page .= '.php';

91 }

92 return $root . $page .'/'. $ending;

FormExtension.php (https://bitbucket.org/wayfarer/verse.git) PHP · 256 lines

1 <?php

2

3 /*

162 $templates = $this->getTemplates($view);

163 $blocks = $view->get('types');

164 array_unshift($blocks, '_'.$view->get('id'));

165

166 foreach ($blocks as &$block) {

LiquidContext.class.php (https://github.com/garyc40/php-liquid.git) PHP · 341 lines

1 <?php

2 /**

3 * Liquid for PHP

5 * @package Liquid

6 * @copyright Copyright (c) 2011 Harald Hanek,

7 * fork of php-liquid (c) 2006 Mateo Murphy,

8 * based on Liquid for Ruby (c) 2006 Tobias Luetke

9 * @license http://www.opensource.org/licenses/mit-license.php

99 public function push()

100 {

101 array_unshift($this->_assigns, array());

102 return true;

103 }

297 }

298

299 // php4 doesn't support array access, so we have

300 // to use the invoke method instead

301 $object = $object->invokeDrop($next_part_name);

Loader.php (https://gitlab.com/bossagna/meik) PHP · 155 lines

1 <?php

2

3 namespace Drupal\cool;

16 $classes = self::getSubclassImplementations($parent_class_name);

17 if ($include) {

18 array_unshift($classes, $parent_class_name);

19 }

20 return $classes;

Search.php (https://github.com/jaws-project/jaws.git) PHP · 171 lines

1 <?php

2 /**

3 * Search boxes actions

6 * @package Search

7 * @author Jonathan Hernandez <ion@suavizado.com>

8 * @author Ali Fazelzadeh <afz@php.net>

9 * @copyright 2004-2022 Jaws Development Group

10 * @license http://www.gnu.org/copyleft/lesser.html

54 $gSearchable = $this->gadget->registry->fetch('searchable_gadgets');

55 $searchableGadgets = ($gSearchable=='*')? array_keys($gadgetList) : explode(', ', $gSearchable);

56 array_unshift($searchableGadgets, '*');

57

58 foreach ($searchableGadgets as $gadget) {

toolbar.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 302 lines

1 <?php

2 /**

3 * @package Joomla.Libraries

141 // Insert button into the front of the toolbar array.

142 $btn = func_get_args();

143 array_unshift($this->_bar, $btn);

144 return true;

145 }

236 }

237

238 $file = JFilterInput::getInstance()->clean(str_replace('_', DIRECTORY_SEPARATOR, strtolower($type)) . '.php', 'path');

239

240 jimport('joomla.filesystem.path');

296

297 // Add to the top of the search dirs.

298 array_unshift($this->_buttonPath, $dir);

299 }

300

Tokenizer.php (https://github.com/vadimonus/moodle.git) PHP · 322 lines

1 <?php

2

3 /*

4 * This file is part of Mustache.php.

5 *

6 * (c) 2010-2015 Justin Hileman

297

298 // Pragmas are hoisted to the front of the template.

299 array_unshift($this->tokens, array(

300 self::TYPE => self::T_PRAGMA,

301 self::NAME => $pragma,

Ruleset.php (https://github.com/Mordred/less.php.git) PHP · 269 lines

1 <?php

2

3 namespace Less\Node;

212 for ($i = count($rules) - 1; $i >= 0; $i--) {

213 if (array_search($rules[$i], $_rules) === FALSE) {

214 array_unshift($_rules, $rules[$i]);

215 }

216 }

Optimizer.php (https://bitbucket.org/lzimm/stash.git) PHP · 246 lines

1 <?php

2

3 /*

56 }

57

58 if (!version_compare(phpversion(), '5.4.0RC1', '>=') && self::OPTIMIZE_VAR_ACCESS === (self::OPTIMIZE_VAR_ACCESS & $this->optimizers) && !$env->isStrictVariables() && !$env->hasExtension('sandbox')) {

59 if ($this->inABody) {

60 if (!$node instanceof Twig_Node_Expression) {

61 if (get_class($node) !== 'Twig_Node') {

62 array_unshift($this->prependedNodes, array());

63 }

64 } else {

174 // disable the loop variable by default

175 $node->setAttribute('with_loop', false);

176 array_unshift($this->loops, $node);

177 } elseif (!$this->loops) {

178 // we are outside a loop

text.php (https://github.com/elinw/joomla-cms.git) PHP · 362 lines

1 <?php

2 /**

3 * @package Joomla.Platform

31 *

32 * Examples:

33 * <script>alert(Joomla.JText._('<?php echo JText::_("JDEFAULT", array("script"=>true));?>'));</script>

34 * will generate an alert message containing 'Default'

35 * <?php echo JText::_("JDEFAULT");?> it will generate a 'Default' string

112 *

113 * Examples:

114 * <?php echo JText::alt("JALL","language");?> it will generate a 'All' string in English but a "Toutes" string in French

115 * <?php echo JText::alt("JALL","module");?> it will generate a 'All' string in English but a "Tous" string in French

155 *

156 * Examples:

157 * <script>alert(Joomla.JText._('<?php echo JText::plural("COM_PLUGINS_N_ITEMS_UNPUBLISHED", 1, array("script"=>true));?>'));</script>

158 * will generate an alert message containing '1 plugin successfully disabled'

159 * <?php echo JText::plural("COM_PLUGINS_N_ITEMS_UNPUBLISHED", 1);?> it will generate a '1 plugin successfully disabled' string

helper.php (https://github.com/mathc/joomla-cms.git) PHP · 279 lines

1 <?php

2 /**

3 * @package Joomla.Platform

181 // If the path does not exist, add it.

182 if (!in_array($path, $paths)) {

183 array_unshift($paths, $path);

184 }

185 }

189

190 // Try to find the class file.

191 if ($file = JPath::find($paths, strtolower($type).'.php')) {

192 require_once $file;

193 }

271 foreach ($new as $path) {

272 if (!in_array($path, $paths)) {

273 array_unshift($paths, trim($path));

274 }

275 }

debug.php (https://github.com/Arkadiy-Sedelnikov/joostina-1.4.git) PHP · 112 lines

1 <?php

2 /**

3 * @package Joostina

4 * @copyright Авторские права (C) 2008-2010 Joostina team. Все права защищены.

5 * @license Лицензия http://www.gnu.org/licenses/gpl-2.0.htm GNU/GPL, или help/license.php

6 * Joostina! - свободное программное обеспечение распространяемое по условиям лицензии GNU/GPL

7 * Для получения информации о используемых расширениях и замечаний об авторском праве, смотрите файл help/copyright.php.

29 /* добавление сообщения в лог*/

30 function add($text, $top = 0){

31 $top ? array_unshift($this->_log, $text) : $this->_log[] = $text;

32 }

33

ArrayList.class.php (https://gitlab.com/fangfangchen/xianpipa) PHP · 240 lines

1 <?php

2 // +----------------------------------------------------------------------

3 // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]

4 // +----------------------------------------------------------------------

5 // | Copyright (c) 2009 http://thinkphp.cn All rights reserved.

6 // +----------------------------------------------------------------------

7 // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )

58 //

59 public function unshift($element) {

60 return (array_unshift($this->_elements,$element))?true : false;

61 }

62

Arr.php (https://gitlab.com/leon0399/damnit-engine) PHP · 475 lines

1 <?php

2

3 namespace Illuminate\Support;

358 {

359 if (is_null($key)) {

360 array_unshift($array, $value);

361 } else {

362 $array = [$key => $value] + $array;

Tasklist.php (https://github.com/finger2000/horde.git) PHP · 158 lines

1 <?php

2 /**

3 * The Horde_LoginTasks_Tasklist:: class is used to store the list of

71 switch ($task->priority) {

72 case Horde_LoginTasks::PRIORITY_HIGH:

73 array_unshift($this->_tasks, $task);

74 break;

75

Router.php (https://gitlab.com/koodersmiikka/operaatio-terveys) PHP · 214 lines

1 <?php

2 namespace Concrete\Core\Routing;

3 use Symfony\Component\Routing\Generator\UrlGenerator;

133 {

134 foreach ($routes as $route => $route_settings) {

135 array_unshift($route_settings, $route);

136 call_user_func_array(array($this, 'register'), $route_settings);

137 }

Amalgamator.php (https://github.com/livinglab/openlab.git) PHP · 305 lines

1 <?php

2 /**

3 * Merge pre-3.0 duplicate venues and organizers

68 array_push( $buckets[ $hash ], $id );

69 } else {

70 array_unshift( $buckets[ $hash ], $id );

71 }

72 }

116 array_push( $buckets[ $hash ], $id );

117 } else {

118 array_unshift( $buckets[ $hash ], $id );

119 }

120 }

268 'post_type' => Tribe__Events__Main::POSTTYPE,

269 'page' => $settings->adminSlug,

270 ], admin_url( 'edit.php' )

271 )

272 );

Optimizer.php (https://gitlab.com/pr0055/symfonypizza) PHP · 271 lines

1 <?php

2

3 /*

57 }

58

59 if (PHP_VERSION_ID < 50400 && self::OPTIMIZE_VAR_ACCESS === (self::OPTIMIZE_VAR_ACCESS & $this->optimizers) && !$env->isStrictVariables() && !$env->hasExtension('Twig_Extension_Sandbox')) {

60 if ($this->inABody) {

61 if (!$node instanceof Twig_Node_Expression) {

62 if (get_class($node) !== 'Twig_Node') {

63 array_unshift($this->prependedNodes, array());

64 }

65 } else {

179 // disable the loop variable by default

180 $node->setAttribute('with_loop', false);

181 array_unshift($this->loops, $node);

182 array_unshift($this->loopsTargets, $node->getNode('value_target')->getAttribute('name'));

seo_utils.php (https://gitlab.com/Rad1calDreamer/honey) PHP · 151 lines

74 if($arDefSite)

75 {

76 array_unshift($arDomains, array(

77 'DOMAIN' => $defaultDomain,

78 'LID' => $arDefSite['LID'],

111 ($file["TYPE"]=="F" && !$USER->CanDoFileOperation('fm_view_file',$arPath))

112 || ($file["TYPE"]=="D" && !$USER->CanDoFileOperation('fm_view_listing',$arPath))

113 || ($file["TYPE"]=="F" && $file["NAME"]==".section.php")

114 )

115 {

124

125 if($f->isSystem()

126 || $file['TYPE'] == 'F' && in_array($p, array("urlrewrite.php"))

127 || $file['TYPE'] == 'D' && preg_match("/\/(bitrix|".\COption::getOptionString("main", "upload_dir", "upload").")\//", "/".$p."/")

128 )

ClassNode.php (https://gitlab.com/madwanz64/laravel) PHP · 169 lines

1 <?php

2

3 /*

62 }

63

64 array_unshift($this->interfaces, $interface);

65 }

66

Repository.php (https://gitlab.com/gideonmarked/PLCPortal) PHP · 466 lines

1 <?php namespace October\Rain\Config;

2

3 use Closure;

154 $array = $this->get($key);

155

156 array_unshift($array, $value);

157

158 $this->set($key, $array);

RedirectMiddleware.php (https://gitlab.com/virtualrealms/d7civicrm) PHP · 237 lines

1 <?php

2 namespace GuzzleHttp;

3

128 $historyHeader = $response->getHeader(self::HISTORY_HEADER);

129 $statusHeader = $response->getHeader(self::STATUS_HISTORY_HEADER);

130 array_unshift($historyHeader, $uri);

131 array_unshift($statusHeader, $statusCode);

Filesystem.php (https://bitbucket.org/j3z/checklist-generator.git) PHP · 223 lines

1 <?php

2

3 /*

116 $this->paths[$namespace][] = $path;

117 } else {

118 array_unshift($this->paths[$namespace], $path);

119 }

120 }

Filesystem.php (https://gitlab.com/gideonmarked/PLCPortal) PHP · 303 lines

1 <?php

2

3 /*

128 $this->paths[$namespace][] = $path;

129 } else {

130 array_unshift($this->paths[$namespace], $path);

131 }

132 }

298 && strspn($file, '/\\', 2, 1)

299 )

300 || null !== parse_url($file, PHP_URL_SCHEME)

301 ;

302 }

AphrontDatabaseConnection.php (https://github.com/groupspaces/phabricator.git) PHP · 143 lines

1 <?php

2

3 /*

38 public function queryData($pattern/*, $arg, $arg, ... */) {

39 $args = func_get_args();

40 array_unshift($args, $this);

41 return call_user_func_array('queryfx_all', $args);

42 }

44 public function query($pattern/*, $arg, $arg, ... */) {

45 $args = func_get_args();

46 array_unshift($args, $this);

47 return call_user_func_array('queryfx', $args);

48 }

Collection.php (https://gitlab.com/daniruizcamacho/pfcascensores) PHP · 705 lines

1 <?php namespace Illuminate\Support;

2

3 use Closure;

303 public function prepend($value)

304 {

305 array_unshift($this->items, $value);

306 }

307

woocommerce-product-navigation.php (https://gitlab.com/hunt9310/ras) PHP · 260 lines

1 <?php

2 /*

3 Plugin Name: WooCommerce Product Navigation

51

52 // Include Required Files

53 require_once( 'wpn-settings.php' );

54

55 // Add front-end styles

81 public function wpn_settings_links($links) {

82 $support_link = '<a href="http://www.wpbackoffice.com">Premium Support</a>';

83 array_unshift($links, $support_link);

84

85 $docs_link = '<a href="http://www.wpbackoffice.com/plugins/woocommerce-product-navigation">Docs</a>';

86 array_unshift($links, $docs_link);

87

88 $settings_link = '<a href="/wp-admin/admin.php?page=wpn-settings.php">Settings</a>';

89 array_unshift($links, $settings_link);

TableTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 230 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

9 use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;

10

11 class TableTest extends \PHPUnit_Framework_TestCase

12 {

13 /**

17

18 /**

19 * @var CollectionFactory | \PHPUnit_Framework_MockObject_MockObject

20 */

21 protected $collectionFactory;

146

147 if ($withEmpty) {

148 array_unshift($options, ['label' => '', 'value' => '']);

149 }

150

array.idl.php (https://github.com/diegoIta/hiphop-php.git) PHP · 376 lines

1 <?php

2

3 include_once 'base.php';

158 array('array' => Variant), FunctionIsFoldable);

159

160 f('array_unshift', Int32,

161 array('array' => VariantMap | Reference,

162 'var' => Variant),

sqlAdmin_fonctions.php (https://bitbucket.org/pombredanne/spip-zone-treemap.git) PHP · 237 lines

1 <?php

2 $GLOBALS['sqla_version'] = '0.3.5';

3

28 function sqla_liste_connexions(){

29 include_spip('inc/flock');

30 $files = preg_files(_DIR_CONNECT, '.*\.php');

31 $liste = array();

32 foreach ($files as $f){

33 $f = str_replace(_DIR_CONNECT,'',$f);

34 $f = str_replace('.php','',$f);

35 $liste[] = $f;

36 }

50 $histo['params'] = sqla_get_champs();

51

52 if ($histo['fonction']) array_unshift($historique, $histo);

53 if (count($historique)>5) array_pop($historique);

54

FileAttachmentBehavior.php (https://gitlab.com/nitm/yii2-filemanager) PHP · 177 lines

1 <?php

2

3 namespace nitm\filemanager\behaviors;

40 if (count($args) == 1) {

41 //Most likely just the data is coming in. If that is the case then we need to pad th arguments to the attach file function so that the data is the last argument

42 array_unshift($args, $attribute, null, $attribute);

43 }

44 if ($this->owner->isNewRecord) {

RatingsStars.php (https://github.com/ChuguluGames/mediawiki-svn.git) PHP · 238 lines

1 <?php

2

3 /**

6 * @since 0.1

7 *

8 * @file RatingsStars.php

9 * @ingroup Ratings

10 *

15

16 /**

17 * No LSB in pre-5.3 PHP *sigh*.

18 * This is to be refactored as soon as php >=5.3 becomes acceptable.

24

25 /**

26 * No LSB in pre-5.3 PHP *sigh*.

27 * This is to be refactored as soon as php >=5.3 becomes acceptable.

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

1 <?php

2 /**

3 * @package FrameworkOnFramework

103 elseif ($params)

104 {

105 array_unshift($options, JHtml::_('select.option', '', JText::_('JOPTION_ACCESS_SHOW_ALL_LEVELS')));

106 }

107

Method.php (https://github.com/MontmereLimited/ZendFramework-v1.git) PHP · 168 lines

28 * @see Zend_Reflection_Docblock

29 */

30 // // // // // // // // require_once 'Zend/Reflection/Docblock.php';

31

32 /**

33 * @see Zend_Reflection_Parameter

34 */

35 // // // // // // // // require_once 'Zend/Reflection/Parameter.php';

36

37 /**

95 throw new Zend_Reflection_Exception('Invalid reflection class provided; must extend Zend_Reflection_Class');

96 }

97 unset($phpReflection);

98 return $zendReflection;

99 }

109 $phpReflections = parent::getParameters();

110 $zendReflections = array();

111 while ($phpReflections && ($phpReflection = array_shift($phpReflections))) {

112 $instance = new $reflectionClass(array($this->getDeclaringClass()->getName(), $this->getName()), $phpReflection->getName());

com_contact.php (https://github.com/Shigaru/shigaru.git) PHP · 247 lines

1 <?php

2 /*

3 * @package AceSEF

162 }

163

164 array_unshift($categories, $name);

165 $cat_title[] = $row->title;

166 $cat_desc[] = $row->description;

212 }

213

214 array_unshift($this->meta_title, $cache[$id]['meta_title']);

215

216 return $cache[$id]['name'];

Error.php (https://gitlab.com/ShizuoLamperouge/Dashboard) PHP · 272 lines

1 <?php

2

3 /*

16 * an error occurs during the loading of a template, when a syntax error

17 * is detected in a template, or when rendering a template. Other

18 * errors must use regular PHP exception classes (like when the template

19 * cache directory is not writable for instance).

20 *

58 public function __construct($message, $lineno = -1, $filename = null, Exception $previous = null)

59 {

60 if (PHP_VERSION_ID < 50300) {

61 $this->previous = $previous;

62 parent::__construct('');

138

139 /**

140 * For PHP < 5.3.0, provides access to the getPrevious() method.

141 *

142 * @param string $method The method name

web.php (https://github.com/andreatarr/joomla-cms.git) PHP · 315 lines

1 <?php

2 /**

3 * @package Joomla.Test

79 *

80 * @param TestCase $test A test object.

81 * @param PHPUnit_Framework_MockObject_MockObject $mockObject The mock object.

82 * @param array $options A set of options to configure the mock.

83 *

84 * @return PHPUnit_Framework_MockObject_MockObject The object with the behaviours added

85 *

86 * @since 3.4

147 * @param array $options A set of options to configure the mock.

148 *

149 * @return PHPUnit_Framework_MockObject_MockObject

150 *

151 * @since 11.3

Ajax.php (https://github.com/jaws-project/jaws.git) PHP · 365 lines

1 <?php

2 /**

3 * Menu AJAX API

323 $links = $objGadget->hook->load('Menu')->Execute();

324 if (!Jaws_Error::IsError($links)) {

325 array_unshift(

326 $links,

327 array(

Grid.php (https://bitbucket.org/acidel/buykoala.git) PHP · 169 lines

1 <?php

2 /**

3 * aheadWorks Co.

146 $statuses = Mage::getSingleton('blog/status')->getOptionArray();

147

148 array_unshift($statuses, array('label' => '', 'value' => ''));

149 $this->getMassactionBlock()->addItem('status', array(

150 'label' => Mage::helper('blog')->__('Change status'),

Collection.php (https://bitbucket.org/acidel/buykoala.git) PHP · 202 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_XmlConnect

23 * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

129 $this->_elements[] = $element;

130 } elseif ($after === '^') {

131 array_unshift($this->_elements, $element);

132 } elseif (is_string($after)) {

133 $newOrderElements = array();

Helper_Arr_Test.php (https://github.com/robertleeplummerjr/bluebox.git) PHP · 349 lines

1 <?php

2 /**

3 * Arr Helper Unit Tests

10 * @group core.helpers.arr

11 */

12 class Helper_Arr_Test extends PHPUnit_Framework_TestCase

13 {

14 /**

151 $args = array_slice(func_get_args(), 2);

152

153 array_unshift($args, $input_array);

154

155 $result = call_user_func_array('arr::extract', $args);

MediaLibrary.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 102 lines

1 <?php

2

3 declare(strict_types = 1);

78 // This workaround can be removed once this issue is fixed:

79 // @see https://www.drupal.org/project/drupal/issues/3073799

80 array_unshift($media_type_ids, 'image');

81 $media_type_ids = array_unique($media_type_ids);

82 }

Error.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 184 lines

1 <?php

2

3 namespace Drupal\Core\Utility;

42 $backtrace = $exception->getTrace();

43 // Add the line throwing the exception to the backtrace.

44 array_unshift($backtrace, ['line' => $exception->getLine(), 'file' => $exception->getFile()]);

45

46 // For PDOException errors, we try to return the initial caller,

58 return [

59 '%type' => get_class($exception),

60 // The standard PHP exception handler considers that the exception message

61 // is plain-text. We mimic this behavior here.

62 '@message' => $message,

100 *

101 * @param array $backtrace

102 * A standard PHP backtrace. Passed by reference.

103 *

104 * @return array

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

1 <?php

2 /**

3 * @package Joomla.Platform

204

205 // Try to find the class file.

206 $type = strtolower($type) . '.php';

207

208 foreach ($paths as $path)

307 if (!in_array($path, $paths))

308 {

309 array_unshift($paths, trim($path));

310 }

311 }

AbstractHandler.php (https://github.com/nguyennamtien/TaskBoxx.git) PHP · 165 lines

1 <?php

2

3 /*

76 public function pushProcessor($callback)

77 {

78 array_unshift($this->processors, $callback);

79 }

80

Method.php (https://github.com/Unplagged/unplagged.git) PHP · 168 lines

28 * @see Zend_Reflection_Docblock

29 */

30 require_once 'Zend/Reflection/Docblock.php';

31

32 /**

33 * @see Zend_Reflection_Parameter

34 */

35 require_once 'Zend/Reflection/Parameter.php';

36

37 /**

95 throw new Zend_Reflection_Exception('Invalid reflection class provided; must extend Zend_Reflection_Class');

96 }

97 unset($phpReflection);

98 return $zendReflection;

99 }

109 $phpReflections = parent::getParameters();

110 $zendReflections = array();

111 while ($phpReflections && ($phpReflection = array_shift($phpReflections))) {

112 $instance = new $reflectionClass(array($this->getDeclaringClass()->getName(), $this->getName()), $phpReflection->getName());

b_list.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) PHP · 148 lines

1 <?php

2

3 /**

53 if ( $pid > 0 and isset( $plans[$pid] ) and $plans_form[$pid] == 'sequential' )

54 {

55 array_unshift( $contents['thead'], $lang_module['weight']);

56 define( 'NV_BANNER_WEIGHT', true );

57 }

127 $contents['rows'][$row['id']]['title'] = $row['title'];

128 $contents['rows'][$row['id']]['pid'] = array(

129 NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&amp;" . NV_OP_VARIABLE . "=info_plan&amp;id=" . $row['pid'], $plans[$row['pid']]

130 );

131 $contents['rows'][$row['id']]['clid'] = ! empty( $client ) ? array(

132 NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&amp;" . NV_OP_VARIABLE . "=info_client&amp;id=" . $row['clid'], $client

133 ) : array();

134 $contents['rows'][$row['id']]['publ_date'] = date( "d-m-Y", $row['publ_time'] );

Kernel.php (https://gitlab.com/judielsm/Handora) PHP · 293 lines

1 <?php

2

3 namespace Illuminate\Foundation\Http;

191 {

192 if (array_search($middleware, $this->middleware) === false) {

193 array_unshift($this->middleware, $middleware);

194 }

195

dd_configuration_PathResourceLoader.php (https://github.com/dflydev/substrate-php.git) PHP · 157 lines

1 <?php

2 /**

3 * Path Resource Loader class.

5 */

6

7 require_once('dd_configuration_IResourceLoader.php');

8

9 /**

125 */

126 public function prependPath($path) {

127 array_unshift($this->prependedPaths, $path);

128 }

129

babfilepicker.class.php (https://bitbucket.org/cantico/widgets.git) PHP · 108 lines

1 <?php

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

3 // OVIDENTIA http://www.ovidentia.org

18 //-------------------------------------------------------------------------

19 /**

20 * @license http://opensource.org/licenses/gpl-license.php GNU General Public License (GPL)

21 * @copyright Copyright (c) 2006 by CANTICO ({@link http://www.cantico.fr})

22 */

23 //include_once 'base.php';

24 require_once dirname(__FILE__) . '/inputwidget.class.php';

25 require_once dirname(__FILE__) . '/select.class.php';

26

27

validation.php (https://bitbucket.org/samhunter3/redzu.git) PHP · 167 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 */

12

105 else

106 {

107 array_unshift($args, $rule);

108 }

109

165 }

166

167 // End of file validation.php

LogManager.php (https://github.com/crmeb/CRMEB.git) PHP · 510 lines

1 <?php

2 // +----------------------------------------------------------------------

3 // | ThinkPHP [ WE CAN DO IT JUST THINK ]

4 // +----------------------------------------------------------------------

5 // | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved.

6 // +----------------------------------------------------------------------

7 // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )

111 public function runningInConsole()

112 {

113 return php_sapi_name() === 'cli' || php_sapi_name() === 'phpdbg';

114 }

115

505 public function __call($method, $args)

506 {

507 array_unshift($args, $method);

508 call_user_func_array([$this, 'log'], $args);

509 }

SqlDataProvider.php (https://gitlab.com/I-NOZex/quiz) PHP · 165 lines

1 <?php

2 /**

3 * @link http://www.yiiframework.com/

26 * SqlDataProvider may be used in the following way:

27 *

28 * ```php

29 * $count = Yii::$app->db->createCommand('

30 * SELECT COUNT(*) FROM user WHERE status=:status

119 $pattern = '/\s+order\s+by\s+([\w\s,\.]+)$/i';

120 if (preg_match($pattern, $sql, $matches)) {

121 array_unshift($orders, new Expression($matches[1]));

122 $sql = preg_replace($pattern, '', $sql);

123 }

SqlDataProvider.php (https://gitlab.com/Griffolion/Game-Embargo-Tracker) PHP · 165 lines

1 <?php

2 /**

3 * @link http://www.yiiframework.com/

119 $pattern = '/\s+order\s+by\s+([\w\s,\.]+)$/i';

120 if (preg_match($pattern, $sql, $matches)) {

121 array_unshift($orders, new Expression($matches[1]));

122 $sql = preg_replace($pattern, '', $sql);

123 }

multi_dim_array.php (https://gitlab.com/myurd/magmi-git) PHP · 247 lines

1 <?php

2 /**

3 * <p>An array class which allows to use (one-dimensional, primitive-type arrays) as keys.<p>

47

48 /**

49 * (non-PHPdoc)

50 * @see ArrayIterator::offsetGet()

51 */

73

74 /**

75 * (non-PHPdoc)

76 * @see ArrayIterator::offsetSet()

77 */

102 * but<br/>

103 * offsetExists(array(1,2,3,4)) will return false<br/></code>

104 * (non-PHPdoc)

105 * @see ArrayIterator::offsetExists()

106 */

TokenStack.php (https://github.com/ad2joe/RosettaBundle.git) PHP · 224 lines

1 <?php

2

3 namespace BeSimple\RosettaBundle\Translation\Scanner\Php\Parser;

184 while (isset($this->tokens[$index])) {

185 if (isset($this->delimiters[$this->tokens[$index]->getContent()])) {

186 array_unshift($open, $this->tokens[$index]->getContent());

187 }

188

ArraysMethods.php (https://bitbucket.org/larryg/powerhut.git) PHP · 450 lines

1 <?php

2 namespace Underscore\Methods;

3

434 public static function prepend($array, $value)

435 {

436 array_unshift($array, $value);

437

438 return $array;

ValidatorChain.php (https://github.com/pborreli/zf2.git) PHP · 233 lines

1 <?php

2 /**

3 * Zend Framework (http://framework.zend.com/)

119 public function prependValidator(ValidatorInterface $validator, $breakChainOnFailure = false)

120 {

121 array_unshift($this->validators,

122 array(

123 'instance' => $validator,

History.php (https://bitbucket.org/cidious/raise.org.git) PHP · 213 lines

1 <?php

2 /**

3 * HistoryCookiePlugin.php

48 }

49

50 array_unshift($patharray, $path);

51

52 if (count($patharray) > $maxhistory)

BaseCoverageReport.php (https://bitbucket.org/00firestar00/ejfirestar.com.git) PHP · 179 lines

1 <?php

2 /**

3 * Abstract class for common CoverageReport methods.

6 * PHP5

7 *

8 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)

9 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)

10 *

14 *

15 * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)

16 * @link http://cakephp.org CakePHP(tm) Project

17 * @package Cake.TestSuite.Coverage

18 * @since CakePHP(tm) v 2.0

19 * @license http://www.opensource.org/licenses/mit-license.php MIT License

20 */

21

ContentTranslationTestBase.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 258 lines

1 <?php

2

3 namespace Drupal\Tests\content_translation\Functional;

108 ConfigurableLanguage::createFromLangcode($langcode)->save();

109 }

110 array_unshift($this->langcodes, \Drupal::languageManager()->getDefaultLanguage()->getId());

111 }

112

Collection.php (https://bitbucket.org/kdms/sh-magento.git) PHP · 174 lines

1 <?php

2 /**

3 * Magento Enterprise Edition

164 $options = $this->_toOptionArray('region_id', 'default_name', array('title' => 'default_name'));

165 if (count($options) > 0) {

166 array_unshift($options, array(

167 'title '=> null,

168 'value' => '0',

Geometry.class.php (https://github.com/zzolo/incl.git) PHP · 358 lines

1 <?php

2 /*

3 * (c) Camptocamp <info@camptocamp.com>

67 public function envelope() {

68 if ($this->geos()) {

69 return geoPHP::geosToGeometry($this->geos()->envelope());

70 }

71

101

102 $format = array_shift($args);

103 $type_map = geoPHP::getAdapterMap();

104 $processor_type = $type_map[$format];

105 $processor = new $processor_type();

106

107 array_unshift($args, $this);

108 $result = call_user_func_array(array($processor, 'write'), $args);

109

eztemplateoptimizer.php (https://github.com/itag/ezpublish.git) PHP · 200 lines

1 <?php

2 /**

3 * File containing the eZTemplateOptimizer class.

10

11 /*!

12 \class eZTemplateOptimizer eztemplateoptimizer.php

13 \brief Analyses a compiled template tree and tries to optimize certain parts of it.

14

20 Optimizes a resource acquisition node and the variable data before it

21 */

22 static function optimizeResourceAcquisition( $useComments, &$php, $tpl, &$var, &$node, &$resourceData )

23 {

24 $data = $var[2];

69 Analyses function nodes and tries to optimize them

70 */

71 static function optimizeFunction( $useComments, &$php, $tpl, &$node, &$resourceData )

72 {

73 $ret = 0;

mka_helper.php (https://github.com/mkhairul/Presta.git) PHP · 147 lines

1 <?php if (!defined('BASEPATH')) exit('No direct script access allowed');

2 /**

3 * Code Igniter

4 *

5 * An open source application development framework for PHP 4.3.2 or newer

6 *

7 * @package

70 } else if (preg_match('/^<\s*([^\s>!]+).*?>$/s', $line_matchings[1], $tag_matchings)) {

71 // add tag to the beginning of $open_tags list

72 array_unshift($open_tags, strtolower($tag_matchings[1]));

73 }

74 // add html-tag to $truncate'd text

acf-pro.php (https://gitlab.com/Svyrydov/test-project) PHP · 407 lines

1 <?php

2

3 if( !class_exists('acf_pro') ):

26

27 // api

28 acf_include('pro/api/api-pro.php');

29 acf_include('pro/api/api-options-page.php');

31

32 // updates

33 acf_include('pro/core/updates.php');

34

35

38

39 // options page

40 acf_include('pro/admin/options-page.php');

41

42 // settings

Export.php (https://gitlab.com/besingamkb/rtwc) PHP · 231 lines

1 <?php

2

3 namespace App\Models;

114 // Concatenate the header row and data rows.

115 $concatenatedRows = $this->dataRows;

116 array_unshift($concatenatedRows, $this->headerRow);

117

118 // Add rows to the filestream.

Event.php (https://gitlab.com/makkooz/nikestreetbeat) PHP · 208 lines

1 <?php

2 /**

3 * @link http://www.yiiframework.com/

59 * `afterInsert` event:

60 *

61 * ```php

62 * Event::on(ActiveRecord::className(), ActiveRecord::EVENT_AFTER_INSERT, function ($event) {

63 * Yii::trace(get_class($event->sender) . ' is inserted.');

85 self::$_events[$name][$class][] = [$handler, $data];

86 } else {

87 array_unshift(self::$_events[$name][$class], [$handler, $data]);

88 }

89 }

Mysqli.php (https://github.com/isS/Microweber.git) PHP · 282 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: Mysqli.php 4155 2011-03-20 21:21:51Z vipsoft $

8 *

9 * @category Piwik

253 }

254 $query = str_replace('?', "'%s'", $query);

255 array_unshift($parameters, $query);

256 $query = call_user_func_array('sprintf', $parameters);

257 return $query;

categoryparent.php (https://github.com/rvsjoen/joomla-cms.git) PHP · 168 lines

1 <?php

2 /**

3 * @package Joomla.Administrator

157 $parent = new stdClass;

158 $parent->text = JText::_('JGLOBAL_ROOT_PARENT');

159 array_unshift($options, $parent);

160 }

161 }

autoloader.php (https://github.com/leonardteo/INSE6530.git) PHP · 325 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 */

12

195 if ($prefix)

196 {

197 array_unshift(static::$core_namespaces, $namespace);

198 }

199 else

229 {

230 $file_path = str_replace('_', DS, $class);

231 $file_path = APPPATH.'classes/'.strtolower($file_path).'.php';

232

233 if (file_exists($file_path))

Variables.php (https://github.com/markn86/moodle.git) PHP · 403 lines

1 <?php

2 /**

3 * Copyright 2009-2017 Horde LLC (http://www.horde.org/)

69 *

70 * @param array $vars The list of form variables (if null, defaults

71 * to PHP's $_REQUEST value). If '_formvars'

72 * exists, it must be a JSON encoded array that

73 * contains the list of allowed form variables.

215

216 if (Horde_Array::getArrayParts($varname, $base, $keys)) {

217 array_unshift($keys, $base);

218 $place = &$this->_vars;

219 $i = count($keys);

RedirectMiddleware.php (https://gitlab.com/ealexis.t/trends) PHP · 231 lines

1 <?php

2 namespace GuzzleHttp;

3

124 // in the history header.

125 $header = $response->getHeader(self::HISTORY_HEADER);

126 array_unshift($header, $uri);

127 return $response->withHeader(self::HISTORY_HEADER, $header);

128 }

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

1 <?php

2 /**

3 * Zend Framework

17 * @subpackage Autoloader

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

19 * @version $Id: Autoloader.php 15508 2009-05-11 03:29:01Z matthew $

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

21 */

22

23 /** Zend_Loader */

24 require_once 'Zend/Loader.php';

25

26 /**

135 * Set the default autoloader implementation

136 *

137 * @param string|array $callback PHP callback

138 * @return void

139 */

smarty_internal_smartytemplatecompiler.php (https://github.com/usualoma/movabletype.git) PHP · 184 lines

1 <?php

2 /**

3 * Smarty Internal Plugin Smarty Template Compiler Base

86 {

87 /* here is where the compiling takes place. Smarty

88 tags in the templates are replaces with PHP code,

89 then written to compiled files. */

90 // init the lexer/parser to compile the template

105 );

106 if ($isTemplateSource && $this->template->caching) {

107 $this->parser->insertPhpCode("<?php\n\$_smarty_tpl->compiled->nocache_hash = '{$this->nocache_hash}';\n?>\n");

108 }

109 if (function_exists('mb_internal_encoding')

163 public function registerPostCompileCallback($callback, $parameter = array(), $key = null, $replace = false)

164 {

165 array_unshift($parameter, $callback);

166 if (isset($key)) {

167 if ($replace || !isset($this->postCompileCallbacks[ $key ])) {

AbstractContainer.php (https://github.com/leerbag/zf2.git) PHP · 385 lines

1 <?php

2 /**

3 * Zend Framework

129 {

130 $values = $this->getArrayCopy();

131 array_unshift($values, $value);

132 $this->exchangeArray($values);

133 }

341 * Next Index

342 *

343 * as defined by the PHP manual

344 * @return int

345 */

task_lose_rate.php (https://github.com/karlom/gameadmin.git) PHP · 141 lines

1 <?php

2 include_once '../../../protected/config/config.php';

3 include_once SYSDIR_ADMIN_INCLUDE . '/global.php';

4 include_once SYSDIR_ADMIN_DICT . '/task.php';

48 );

49

50 array_unshift($viewData,$firstTask);

51 foreach($viewData as $key => &$value){

52 // if($value['task_id'] == 1) {

DecoderPlugin.php (https://github.com/linuxserver/Heimdall.git) PHP · 144 lines

1 <?php

2

3 namespace Http\Client\Common\Plugin;

100

101 if (false === $stream) {

102 array_unshift($newEncodings, $encoding);

103

104 continue;

Captcha.php (https://github.com/webkulture/net.webkulture.www.git) PHP · 259 lines

1 <?php

2

3 /** Zend_Form_Element_Xhtml */

4 require_once 'Zend/Form/Element/Xhtml.php';

5

6 /** Zend_Captcha_Adapter */

7 require_once 'Zend/Captcha/Adapter.php';

8

9 /**

139 $decorator = $captcha->getDecorator();

140 if (!empty($decorator)) {

141 array_unshift($decorators, $decorator);

142 }

143

Variable.php (https://github.com/bobthecow/Ruler.git) PHP · 427 lines

1 <?php

2

3 /*

349 {

350 $reflection = new \ReflectionClass('\\Ruler\\Operator\\'.$name);

351 \array_unshift($args, $this);

352

353 return $this->wrap($reflection->newInstanceArgs($args));

415 $reflection = new \ReflectionClass($this->ruleBuilder->findOperator($name));

416 $args = \array_map([$this, 'asVariable'], $args);

417 \array_unshift($args, $this);

418

419 $op = $reflection->newInstanceArgs($args);

MatrixFactory.php (https://github.com/markrogoyski/math-php.git) PHP · 588 lines

1 <?php

2

3 namespace MathPHP\LinearAlgebra;

4

5 use MathPHP\Exception;

6

7 /**

201

202 $bottom_row = array_pop($I);

203 array_unshift($I, $bottom_row);

204

205 return self::create($I);

ArrayList.php (https://github.com/markjames/sapphire.git) PHP · 247 lines

1 <?php

2 /**

3 * A list object that wraps around an array of objects or arrays.

136 */

137 public function unshift($item) {

138 array_unshift($this->items, $item);

139 }

140

189 * @param string $sortDirection

190 * @see SS_List::sort()

191 * @link http://php.net/manual/en/function.array-multisort.php

192 * @example $list->sort('Name', 'ASC');

193 * @example $list->sort(array('Name'=>'ASC,'Age'=>'DESC');

Command.php (https://bitbucket.org/vladap/symfony.git) PHP · 296 lines

1 <?php

2

3 /*

118 public function top($bit)

119 {

120 array_unshift($this->bits, $bit);

121

122 foreach ($this->labels as $label => $index) {

FormFactory.php (https://github.com/castillojorge/SemdropsMobile.git) PHP · 401 lines

1 <?php

2

3 /*

234 $options = array_replace($defaultOptions, $options);

235 $knownOptions = array_merge($knownOptions, array_keys($defaultOptions));

236 array_unshift($types, $type);

237 $type = $type->getParent($options);

238 }

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 */

15

20

21 /**

22 * CakePHP Code Format

23 * Does the actual merging and writing in the CakePHP format for the Meta classes

smarty_internal_extension_handler.php (https://gitlab.com/team_fsn/fsn-php) PHP · 157 lines

1 <?php

2

3 /**

99 $callback = array($smarty->ext->$name, $name);

100 }

101 array_unshift($args, $data);

102 if (isset($callback) && $callback[0]->objMap | $data->_objType) {

103 return call_user_func_array($callback, $args);

RouteCollection.php (https://github.com/shama/cakephp.git) PHP · 259 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.Routing

12 * @since CakePHP(tm) v 3.0.0

13 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)

14 */

15 namespace Cake\Routing;

148 }

149 if ($name) {

150 array_unshift($fallbacks, $name);

151 }

152 return $fallbacks;

utils.php (https://bitbucket.org/zumwalt/eat-with-us.git) PHP · 132 lines

1 <?php

2 /**

3 * Theme wrapper

17 static $main_template;

18

19 // Stores the base name of the template file; e.g. 'page' for 'page.php' etc.

20 static $base;

21

32

33 if (self::$base) {

34 array_unshift($templates, sprintf('base-%s.php', self::$base));

35 }

36

42

43 if (self::$base) {

44 array_unshift($templates, sprintf('templates/sidebar-%s.php', self::$base));

45 }

46

ARedisSortedSet.php (https://github.com/phpnode/YiiRedis.git) PHP · 230 lines

1 <?php

2 /**

3 * Represents a redis sorted set.

91 }

92

93 array_unshift($sets,$this->name);

94 $parameters = array(

95 $destination->name,

135 }

136

137 array_unshift($sets,$this->name);

138 $parameters = array(

139 $destination->name,

Autoloader.php (https://github.com/testruby/Tine-2.0-Open-Source-Groupware-and-CRM.git) PHP · 464 lines

1 <?php

2 /**

3 * Zend Framework

17 * @subpackage Autoloader

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

19 * @version $Id: Autoloader.php 10020 2009-08-18 14:34:09Z j.fischer@metaways.de $

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

21 */

22

23 /** Zend_Loader */

24 require_once 'Zend/Loader.php';

25

26 /**

135 * Set the default autoloader implementation

136 *

137 * @param string|array $callback PHP callback

138 * @return void

139 */

Definition.php (https://github.com/pauln/moodle.git) PHP · 241 lines

1 <?php

2

3 class Less_Tree_Mixin_Definition extends Less_Tree_Ruleset{

69 if( !isset($evaldArguments[$j]) && $arg['name'] === $params[$j]['name']) {

70 $evaldArguments[$j] = $arg['value']->compile($env);

71 array_unshift($frame->rules, new Less_Tree_Rule( $arg['name'], $arg['value']->compile($env) ) );

72 $isNamedFound = true;

73 break;

104 }

105 $expression = new Less_Tree_Expression($varargs);

106 array_unshift($frame->rules, new Less_Tree_Rule($param['name'], $expression->compile($env)));

107 }else{

108 $val = ($arg && $arg['value']) ? $arg['value'] : false;

123 }

124

125 array_unshift($frame->rules, new Less_Tree_Rule($param['name'], $val));

126 $evaldArguments[$i] = $val;

127 }

Translator.php (https://gitlab.com/fabian.morales/marlon_becerra) PHP · 325 lines

1 <?php

2

3 /*

304

305 if (strrchr($locale, '_') !== false) {

306 array_unshift($locales, substr($locale, 0, -strlen(strrchr($locale, '_'))));

307 }

308

Favorites.php (https://github.com/mahhek/e_champ.git) PHP · 294 lines

1 <?php

2 /**

3 * FavoriteCookiePlugin.php

91 }

92

93 array_unshift($patharray, $path);

94

95 if (count($patharray) > $maxfavorites)