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
3 /*
107 public function pushHandler(HandlerInterface $handler)
108 {
109 array_unshift($this->handlers, $handler);
110 }
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 }
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
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
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
ObjectMixin.php (https://bitbucket.org/iiic/iszp.git) PHP · 247 lines
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 */
46 require_once 'File/Iterator/Factory.php';
48 /**
Main.php (https://bitbucket.org/kdms/sh-magento.git) PHP · 178 lines
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 */
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';
320 if ( ! $psr)
ORMWrapper.php (https://github.com/zephrax/cotyledon.git) PHP · 137 lines
1 <?php
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
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');
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
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 }
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
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, '*');
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 }
238 $file = JFilterInput::getInstance()->clean(str_replace('_', DIRECTORY_SEPARATOR, strtolower($type)) . '.php', 'path');
240 jimport('joomla.filesystem.path');
297 // Add to the top of the search dirs.
298 array_unshift($this->_buttonPath, $dir);
299 }
Tokenizer.php (https://github.com/vadimonus/moodle.git) PHP · 322 lines
Ruleset.php (https://github.com/Mordred/less.php.git) PHP · 269 lines
Optimizer.php (https://bitbucket.org/lzimm/stash.git) PHP · 246 lines
1 <?php
3 /*
56 }
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 }
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 }
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 }
Arr.php (https://gitlab.com/leon0399/damnit-engine) PHP · 475 lines
Tasklist.php (https://github.com/finger2000/horde.git) PHP · 158 lines
Router.php (https://gitlab.com/koodersmiikka/operaatio-terveys) PHP · 214 lines
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
3 /*
57 }
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 {
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
Repository.php (https://gitlab.com/gideonmarked/PLCPortal) PHP · 466 lines
RedirectMiddleware.php (https://gitlab.com/virtualrealms/d7civicrm) PHP · 237 lines
Filesystem.php (https://bitbucket.org/j3z/checklist-generator.git) PHP · 223 lines
Filesystem.php (https://gitlab.com/gideonmarked/PLCPortal) PHP · 303 lines
AphrontDatabaseConnection.php (https://github.com/groupspaces/phabricator.git) PHP · 143 lines
1 <?php
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
woocommerce-product-navigation.php (https://gitlab.com/hunt9310/ras) PHP · 260 lines
1 <?php
2 /*
3 Plugin Name: WooCommerce Product Navigation
52 // Include Required Files
53 require_once( 'wpn-settings.php' );
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);
85 $docs_link = '<a href="http://www.wpbackoffice.com/plugins/woocommerce-product-navigation">Docs</a>';
86 array_unshift($links, $docs_link);
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;
11 class TableTest extends \PHPUnit_Framework_TestCase
12 {
13 /**
18 /**
19 * @var CollectionFactory | \PHPUnit_Framework_MockObject_MockObject
20 */
21 protected $collectionFactory;
147 if ($withEmpty) {
148 array_unshift($options, ['label' => '', 'value' => '']);
149 }
array.idl.php (https://github.com/diegoIta/hiphop-php.git) PHP · 376 lines
sqlAdmin_fonctions.php (https://bitbucket.org/pombredanne/spip-zone-treemap.git) PHP · 237 lines
1 <?php
2 $GLOBALS['sqla_version'] = '0.3.5';
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();
52 if ($histo['fonction']) array_unshift($historique, $histo);
53 if (count($historique)>5) array_pop($historique);
FileAttachmentBehavior.php (https://gitlab.com/nitm/yii2-filemanager) PHP · 177 lines
1 <?php
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
3 /**
6 * @since 0.1
7 *
8 * @file RatingsStars.php
9 * @ingroup Ratings
10 *
16 /**
17 * No LSB in pre-5.3 PHP *sigh*.
18 * This is to be refactored as soon as php >=5.3 becomes acceptable.
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
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';
32 /**
33 * @see Zend_Reflection_Parameter
34 */
35 // // // // // // // // require_once 'Zend/Reflection/Parameter.php';
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
Error.php (https://gitlab.com/ShizuoLamperouge/Dashboard) PHP · 272 lines
1 <?php
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('');
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
Grid.php (https://bitbucket.org/acidel/buykoala.git) PHP · 169 lines
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 */
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
MediaLibrary.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 102 lines
Error.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 184 lines
1 <?php
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()]);
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
AbstractHandler.php (https://github.com/nguyennamtien/TaskBoxx.git) PHP · 165 lines
Method.php (https://github.com/Unplagged/unplagged.git) PHP · 168 lines
28 * @see Zend_Reflection_Docblock
29 */
30 require_once 'Zend/Reflection/Docblock.php';
32 /**
33 * @see Zend_Reflection_Parameter
34 */
35 require_once 'Zend/Reflection/Parameter.php';
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
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 . "&" . NV_OP_VARIABLE . "=info_plan&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 . "&" . NV_OP_VARIABLE . "=info_client&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
dd_configuration_PathResourceLoader.php (https://github.com/dflydev/substrate-php.git) PHP · 157 lines
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';
validation.php (https://bitbucket.org/samhunter3/redzu.git) PHP · 167 lines
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 }
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
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>
48 /**
49 * (non-PHPdoc)
50 * @see ArrayIterator::offsetGet()
51 */
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
ArraysMethods.php (https://bitbucket.org/larryg/powerhut.git) PHP · 450 lines
ValidatorChain.php (https://github.com/pborreli/zf2.git) PHP · 233 lines
History.php (https://bitbucket.org/cidious/raise.org.git) PHP · 213 lines
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 */
ContentTranslationTestBase.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 258 lines
Collection.php (https://bitbucket.org/kdms/sh-magento.git) PHP · 174 lines
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 }
102 $format = array_shift($args);
103 $type_map = geoPHP::getAdapterMap();
104 $processor_type = $type_map[$format];
105 $processor = new $processor_type();
107 array_unshift($args, $this);
108 $result = call_user_func_array(array($processor, 'write'), $args);
eztemplateoptimizer.php (https://github.com/itag/ezpublish.git) PHP · 200 lines
1 <?php
2 /**
3 * File containing the eZTemplateOptimizer class.
11 /*!
12 \class eZTemplateOptimizer eztemplateoptimizer.php
13 \brief Analyses a compiled template tree and tries to optimize certain parts of it.
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
Export.php (https://gitlab.com/besingamkb/rtwc) PHP · 231 lines
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
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 */
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';
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.
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
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 */
23 /** Zend_Loader */
24 require_once 'Zend/Loader.php';
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
task_lose_rate.php (https://github.com/karlom/gameadmin.git) PHP · 141 lines
DecoderPlugin.php (https://github.com/linuxserver/Heimdall.git) PHP · 144 lines
Captcha.php (https://github.com/webkulture/net.webkulture.www.git) PHP · 259 lines
Variable.php (https://github.com/bobthecow/Ruler.git) PHP · 427 lines
1 <?php
3 /*
349 {
350 $reflection = new \ReflectionClass('\\Ruler\\Operator\\'.$name);
351 \array_unshift($args, $this);
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);
419 $op = $reflection->newInstanceArgs($args);
MatrixFactory.php (https://github.com/markrogoyski/math-php.git) PHP · 588 lines
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 }
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
FormFactory.php (https://github.com/castillojorge/SemdropsMobile.git) PHP · 401 lines
CakePHP.php (https://github.com/shama/cakephp.git) PHP · 278 lines
1 <?php
2 /**
3 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
4 * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
5 *
8 *
9 * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
10 * @link http://cakephp.org CakePHP(tm) Project
11 * @package Cake.Meta.CodeFormat
12 * @since CakePHP(tm) v 3.0
13 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
14 */
21 /**
22 * CakePHP Code Format
23 * Does the actual merging and writing in the CakePHP format for the Meta classes
smarty_internal_extension_handler.php (https://gitlab.com/team_fsn/fsn-php) PHP · 157 lines
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;
19 // Stores the base name of the template file; e.g. 'page' for 'page.php' etc.
20 static $base;
33 if (self::$base) {
34 array_unshift($templates, sprintf('base-%s.php', self::$base));
35 }
43 if (self::$base) {
44 array_unshift($templates, sprintf('templates/sidebar-%s.php', self::$base));
45 }
ARedisSortedSet.php (https://github.com/phpnode/YiiRedis.git) PHP · 230 lines
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 */
23 /** Zend_Loader */
24 require_once 'Zend/Loader.php';
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
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 }
125 array_unshift($frame->rules, new Less_Tree_Rule($param['name'], $val));
126 $evaldArguments[$i] = $val;
127 }