100+ results for 'php array_shift'
Not the results you expected?
ObjectManager.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 316 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
25 * Test object
26 *
27 * @var \PHPUnit_Framework_TestCase
28 */
29 protected $_testObject;
32 * Class constructor
33 *
34 * @param \PHPUnit_Framework_TestCase $testObject
35 */
36 public function __construct(\PHPUnit_Framework_TestCase $testObject)
44 * @param string $argClassName
45 * @param array $originalArguments
46 * @return null|object|\PHPUnit_Framework_MockObject_MockObject
47 */
48 protected function _createArgumentMock($argClassName, array $originalArguments)
ObjectManager.php (https://gitlab.com/daigiangaitu91/magento) PHP · 316 lines
1 <?php
2 /**
3 * Copyright © 2015 Magento. All rights reserved.
25 * Test object
26 *
27 * @var \PHPUnit_Framework_TestCase
28 */
29 protected $_testObject;
32 * Class constructor
33 *
34 * @param \PHPUnit_Framework_TestCase $testObject
35 */
36 public function __construct(\PHPUnit_Framework_TestCase $testObject)
44 * @param string $argClassName
45 * @param array $originalArguments
46 * @return null|object|\PHPUnit_Framework_MockObject_MockObject
47 */
48 protected function _createArgumentMock($argClassName, array $originalArguments)
Logger.php (git://github.com/pmjones/php-framework-benchmarks.git) PHP · 393 lines
1 <?php
3 /*
120 throw new \LogicException('You tried to pop from an empty handler stack.');
121 }
122 return array_shift($this->handlers);
123 }
146 throw new \LogicException('You tried to pop from an empty processor stack.');
147 }
148 return array_shift($this->processors);
149 }
160 {
161 if (!$this->handlers) {
162 $this->pushHandler(new StreamHandler('php://stderr', self::DEBUG));
163 }
164 $record = array(
modules.php (https://github.com/pjwiseman/joomla-cms.git) PHP · 243 lines
1 <?php
2 /**
3 * @package Joomla.Administrator
137 public static function positions($clientId, $state = 1, $selectedPosition = '')
138 {
139 require_once JPATH_ADMINISTRATOR . '/components/com_templates/helpers/templates.php';
140 $templates = array_keys(ModulesHelper::getTemplates($clientId, $state));
141 $templateGroups = array();
235 if (strlen($options[0]->text) < 1)
236 {
237 array_shift($options);
238 }
239 }
Gettext.php (https://github.com/richhl/kalturaCE.git) PHP · 178 lines
1 <?php
2 /**
3 * Zend Framework
16 * @package Zend_Translate
17 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
18 * @version $Id: Gettext.php 16971 2009-07-22 18:05:45Z mikaelkael $
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 */
22 /** Zend_Locale */
23 require_once 'Zend/Locale.php';
25 /** Zend_Translate_Adapter */
26 require_once 'Zend/Translate/Adapter.php';
28 /**
Font.php (https://bitbucket.org/jokusafet/magento2.git) PHP · 217 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: Font.php 20096 2010-01-06 02:05:09Z bkarwin $
21 */
23 /** Internally used classes */
24 #require_once 'Zend/Pdf/Font.php';
27 /** Zend_Pdf_FileParser */
28 #require_once 'Zend/Pdf/FileParser.php';
30 /**
ConfigDiscoveryTest.php (https://github.com/zendframework/zend-component-installer.git) PHP · 299 lines
1 <?php
2 /**
3 * @see https://github.com/zendframework/zend-component-installer for the canonical source repository
10 use org\bovigo\vfs\vfsStream;
11 use org\bovigo\vfs\vfsStreamDirectory;
12 use PHPUnit\Framework\ExpectationFailedException;
13 use PHPUnit\Framework\TestCase;
19 use Zend\ComponentInstaller\Injector\NoopInjector;
21 use function array_shift;
22 use function get_class;
23 use function gettype;
61 public function createApplicationConfig()
62 {
63 vfsStream::newFile('config/application.config.php')
64 ->at($this->projectRoot)
65 ->setContent('<' . "?php\nreturn [\n 'modules' => [\n ]\n];");
LanguageMixer.php (https://gitlab.com/gideonmarked/newlifetrainingcenter-v2) PHP · 201 lines
1 <?php namespace RainLab\Builder\Classes;
3 use Yaml;
54 public static function arrayMergeRecursive(&$array1, &$array2)
55 {
56 // The native PHP implementation of array_merge_recursive
57 // generates unexpected results when two scalar elements with a
58 // same key is found, so we use a custom one.
114 while ($path) {
115 $currentPath = array_shift($path);
117 if (!is_array($currentArray)) {
Font.php (https://bitbucket.org/masal/sonsuzdongu.git) PHP · 217 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: Font.php 23775 2011-03-01 17:25:24Z ralph $
21 */
23 /** Internally used classes */
24 require_once 'Zend/Pdf/Font.php';
27 /** Zend_Pdf_FileParser */
28 require_once 'Zend/Pdf/FileParser.php';
30 /**
Font.php (https://bitbucket.org/efdac/e-forest_platform.git) PHP · 217 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: Font.php 20096 2010-01-06 02:05:09Z bkarwin $
21 */
23 /** Internally used classes */
24 require_once 'Zend/Pdf/Font.php';
27 /** Zend_Pdf_FileParser */
28 require_once 'Zend/Pdf/FileParser.php';
30 /**
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) {
94 $this->inABody = false;
95 } elseif ($this->inABody) {
96 if (!$expression && get_class($node) !== 'Twig_Node' && $prependedNodes = array_shift($this->prependedNodes)) {
97 $nodes = array();
98 foreach (array_unique($prependedNodes) as $name) {
221 {
222 if ($node instanceof Twig_Node_For) {
223 array_shift($this->loops);
224 }
225 }
ActionController.php (https://github.com/kazaff/zf2.git) PHP · 316 lines
Font.php (https://bitbucket.org/hieronim1981/tunethemusic.git) PHP · 217 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: Font.php 24593 2012-01-05 20:35:02Z matthew $
21 */
23 /** Internally used classes */
24 require_once 'Zend/Pdf/Font.php';
27 /** Zend_Pdf_FileParser */
28 require_once 'Zend/Pdf/FileParser.php';
30 /**
Font.php (https://bitbucket.org/ksekar/campus.git) PHP · 217 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: Font.php 24594 2012-01-05 21:27:01Z matthew $
21 */
23 /** Internally used classes */
24 require_once 'Zend/Pdf/Font.php';
27 /** Zend_Pdf_FileParser */
28 require_once 'Zend/Pdf/FileParser.php';
30 /**
router.php (https://gitlab.com/Bartwillemsen/aurora-framework) PHP · 275 lines
1 <?php
2 namespace Aurora\Routing;
82 * Find a route by name.
83 *
84 * The returned array will be identical the array defined in the routes.php file.
85 *
86 * @param string $name
195 $segments = array_slice($segments, $key);
197 $method = (count($segments) > 0) ? array_shift($segments) : 'index';
199 return new Route($destination, $controller.'@'.$method, $segments);
compare.php (https://gitlab.com/shapcy/opencart) PHP · 195 lines
Form.class.php (https://gitlab.com/qbarbosa/klindev) PHP · 230 lines
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Form handling code.
5 *
6 * @package PhpMyAdmin
7 */
11 * values etc.
12 *
13 * @package PhpMyAdmin
14 */
15 class Form
109 if (isset($value[0]) && $value[0] === '#') {
110 // remove first element ('#')
111 array_shift($value);
112 // $value has keys and value names, return it
113 return $value;
ClassMethods.php (https://gitlab.com/koodersmiikka/operaatio-terveys) PHP · 195 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
104 if (!is_object($object)) {
105 throw new Exception\BadMethodCallException(sprintf(
106 '%s expects the provided $object to be a PHP object)', __METHOD__
107 ));
108 }
120 $transform = function ($letters) {
121 $letter = array_shift($letters);
123 return '_' . strtolower($letter);
170 if (!is_object($object)) {
171 throw new Exception\BadMethodCallException(sprintf(
172 '%s expects the provided $object to be a PHP object)', __METHOD__
173 ));
174 }
FaultTest.php (https://github.com/EvanDotPro/zf2.git) PHP · 249 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
15 * @group Zend_XmlRpc
16 */
17 class FaultTest extends \PHPUnit_Framework_TestCase
18 {
19 /**
120 $this->assertTrue(!empty($observed));
121 $f = array_shift($observed);
122 $this->assertTrue($f instanceof Server\Fault);
123 $this->assertEquals('Checking observers', $f->getMessage());
Partition.php (https://gitlab.com/link233/bootmw) PHP · 374 lines
1 <?php
2 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldmethod=marker: */
3 // +---------------------------------------------------------------------------
295 $data = $this->stream->read(4, true);
296 $data = Decoder::unpack(Decoder::BIT_B32, $data);
297 $count = array_shift($data);
298 if ($count <= 0) {
299 throw new \Kafka\Exception\OutOfRange($count . ' is not a valid partition count');
321 $partitionId = $this->stream->read(4, true);
322 $partitionId = Decoder::unpack(Decoder::BIT_B32, $partitionId);
323 $partitionId = array_shift($partitionId);
324 \Kafka\Log::log("kafka client:fetch partition:" . $partitionId, LOG_INFO);
326 $errCode = $this->stream->read(2, true);
327 $errCode = Decoder::unpack(Decoder::BIT_B16, $errCode);
328 $this->errCode = array_shift($errCode);
329 if ($this->errCode != 0) {
330 throw new \Kafka\Exception(\Kafka\Protocol\Decoder::getError($this->errCode));
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
116 }
118 array_shift($this->_assigns);
119 }
250 $parts = explode(LIQUID_VARIABLE_ATTRIBUTE_SEPARATOR, $key);
252 $object = $this->fetch(array_shift($parts));
254 if(is_object($object))
errors.php (https://github.com/akelos/v1.git) PHP · 182 lines
1 <?php
2 /**
3 * base include file for SimpleTest
4 * @package SimpleTest
5 * @subpackage UnitTester
6 * @version $Id: errors.php,v 1.14 2006/02/06 06:05:18 lastcraft Exp $
7 */
9 /** @ignore - PHP5 compatibility fix. */
10 if (! defined('E_STRICT')) {
11 define('E_STRICT', 2048);
15 * Includes SimpleTest files.
16 */
17 require_once(dirname(__FILE__) . '/invoker.php');
19 /**
Font.php (https://github.com/jiiarra/site.git) PHP · 217 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: Font.php 18993 2009-11-15 17:09:16Z alexander $
21 */
23 /** Internally used classes */
24 require_once 'Zend/Pdf/Font.php';
27 /** Zend_Pdf_FileParser */
28 require_once 'Zend/Pdf/FileParser.php';
30 /**
TableTest.php (https://github.com/pmjones/php-framework-benchmarks.git) PHP · 419 lines
1 <?php
3 namespace Doctrine\Tests\DBAL\Schema;
5 require_once __DIR__ . '/../../TestInit.php';
7 use Doctrine\DBAL\Schema\Schema;
13 use Doctrine\DBAL\Types\Type;
15 class TableTest extends \PHPUnit_Framework_TestCase
16 {
17 public function testCreateWithInvalidTableName()
202 $this->assertEquals(1, count($constraints));
203 $this->assertSame($constraint, array_shift($constraints));
204 }
XmlFileLoader.php (https://github.com/Bakkie123/symfony2playground.git) PHP · 190 lines
streams.php (https://github.com/sharpmachine/wakeupmedia.com.git) PHP · 209 lines
1 <?php
2 /**
3 * Classes, which help reading streams of data from files.
4 * Based on the classes from Danilo Segan <danilo@kvota.net>
5 *
6 * @version $Id: streams.php 597 2011-01-16 20:14:36Z nbachiyski $
7 * @package pomo
8 * @subpackage streams
41 $endian_letter = ('big' == $this->endian)? 'N' : 'V';
42 $int = unpack($endian_letter, $bytes);
43 return array_shift($int);
44 }
Query.php (https://github.com/mpous/mandango.git) PHP · 606 lines
module.php (https://github.com/raeldc/nooku-server.git) PHP · 121 lines
1 <?php
2 /**
3 * @version $Id$
51 {
52 $classpath = $identifier->path;
53 $classtype = !empty($classpath) ? array_shift($classpath) : $identifier->name;
55 //Create the fallback path and make an exception for views
109 if(count($parts))
110 {
111 $path = KInflector::pluralize(array_shift($parts)).
112 $path .= count($parts) ? '/'.implode('/', $parts) : '';
113 $path .= '/'.strtolower($identifier->name);
116 }
118 $path = $identifier->basepath.'/modules/mod_'.$name.'/'.$path.'.php';
119 return $path;
120 }
contact-form-functions.php (https://gitlab.com/VTTE/sitios-vtte) PHP · 276 lines
ManagerTest.php (https://gitlab.com/crazybutterfly815/magento2) PHP · 115 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
9 * \Magento\Framework\Message\Manager test case
10 */
11 class ManagerTest extends \PHPUnit_Framework_TestCase
12 {
13 /**
68 $this->model->addMessages($messages);
69 array_shift($messages);
70 $this->model->addMessages($messages, $customGroup);
71 $this->assertEquals(4, $this->model->getMessages()->getCount());
CRUD.php (https://gitlab.com/emad.rashad/mls-grading) PHP · 140 lines
1 <?php
2 require_once("MysqlDatabase.php");
28 $sql = "SELECT * FROM ".static::$table_name." WHERE {$filed} = '{$value}' ";
29 $result_array = static::find_by_sql($sql);
30 return !empty($result_array)? array_shift($result_array) : false;
31 }
32 //get by id
34 $sql = "SELECT * FROM ".static::$table_name." WHERE id = {$id} ";
35 $result_array = static::find_by_sql($sql);
36 return !empty($result_array)? array_shift($result_array) : false;
37 }
38 //excute sql command and loop throw rows then fetch array
text.php (https://github.com/dextercowley/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
88 }
90 $str = array_shift($strs);
91 $str = preg_replace('/\[\[%([0-9]+):[^\]]*\]\]/', '%\1$s', $str);
92 $str = vsprintf($str, $strs);
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
Request.php (https://gitlab.com/Erdrix/overviewCompanies) PHP · 218 lines
1 <?php
3 class Request
63 $this->method = ($_SERVER['REQUEST_METHOD'] == 'POST' && array_key_exists('HTTP_X_HTTP_METHOD',
64 $_SERVER)) ? $_SERVER['HTTP_X_HTTP_METHOD'] : $_SERVER['REQUEST_METHOD'];
65 $this->prefix = isset($url[0]) ? array_shift($url) : '';
66 $this->action = implode('/', $url);;
67 $this->route = '/' . $this->action;
Boolean.php (https://bitbucket.org/acidel/buykoala.git) PHP · 375 lines
23 * @see Zend_Filter_Interface
24 */
25 #require_once 'Zend/Filter/Interface.php';
27 /**
53 self::EMPTY_ARRAY => 'array',
54 self::NULL => 'null',
55 self::PHP => 'php',
56 self::FALSE_STRING => 'false',
57 self::YES => 'yes',
93 $temp = array();
94 if (!empty($options)) {
95 $temp['type'] = array_shift($options);
96 }
Rename.php (https://github.com/richhl/kalturaCE.git) PHP · 305 lines
1 <?php
2 /**
3 * Zend Framework
17 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id: Rename.php 16971 2009-07-22 18:05:45Z mikaelkael $
20 */
23 * @see Zend_Filter_Interface
24 */
25 require_once 'Zend/Filter/Interface.php';
27 /**
59 $options = array('target' => $options);
60 } elseif (!is_array($options)) {
61 require_once 'Zend/Filter/Exception.php';
62 throw new Zend_Filter_Exception('Invalid options argument provided to filter');
63 }
Rename.php (https://gitlab.com/Ltaimao/wecenter) PHP · 309 lines
1 <?php
2 /**
3 * Zend Framework
23 * @see Zend_Filter_Interface
24 */
25 //require_once 'Zend/Filter/Interface.php';
27 /**
59 $options = array('target' => $options);
60 } elseif (!is_array($options)) {
61 //require_once 'Zend/Filter/Exception.php';
62 throw new Zend_Filter_Exception('Invalid options argument provided to filter');
63 }
65 if (1 < func_num_args()) {
66 $argv = func_get_args();
67 array_shift($argv);
68 $source = array_shift($argv);
ClassTest.php (https://bitbucket.org/ksekar/campus.git) PHP · 147 lines
1 <?php
2 /**
3 * Zend Framework
23 /** requires */
24 require_once 'Zend/Reflection/Class.php';
26 /**
34 * @group Zend_Reflection_Class
35 */
36 class Zend_Reflection_ClassTest extends PHPUnit_Framework_TestCase
37 {
43 // ensure we are only required this file once per runtime
44 if (self::$_sampleClassFileRequired === false) {
45 $fileToRequire = dirname(__FILE__) . '/_files/TestSampleClass.php';
46 require_once $fileToRequire;
47 self::$_sampleClassFileRequired = true;
objektoj_pseuxdopagoj.php (https://github.com/ePaul/aligilo.git) PHP · 200 lines
1 <?php
3 // ĉĝĥĵŝŭ
15 * (de februaro 2009 sub nomo objektoj_pseuxdopagoj.php, antaŭe
16 * objektoj_diversaj.php, iam eĉ pli frue objektoj.php.)
17 * Uzebla laŭ kondiĉoj de GNU Ĝenerala Publika Permesilo (GNU GPL)
18 */
165 array("partoprenoID" => $partoprenoID));
166 $kolumnoj = array(array('ID','','–>','z',
167 "pago-detaloj.php?klaso=" . $tipo .
168 "&id=XXXXX",''),
169 array('dato','dato','XXXXX','l','','-1'),
173 );
174 if (!rajtas($rajto)) {
175 array_shift($kolumnoj);
176 }
177 sercxu($sql,
SubformState.php (https://gitlab.com/andecode/theme-spark) PHP · 154 lines
Frame.php (https://github.com/MontmereLimited/ZendFramework-v1.git) PHP · 363 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: Frame.php 23775 2011-03-01 17:25:24Z ralph $
21 */
24 * @see Zend_Queue_Stomp_FrameInterface
25 */
26 // // // // // // // // require_once 'Zend/Queue/Stomp/FrameInterface.php';
28 /**
106 {
107 if (!is_bool($auto)) {
108 // // // // // // // // require_once 'Zend/Queue/Exception.php';
109 throw new Zend_Queue_Exception('$auto is not a boolean');
110 }
question_type_test.php (https://bitbucket.org/moodle/moodle.git) PHP · 121 lines
1 <?php
2 // This file is part of Moodle - http://moodle.org/
3 //
25 global $CFG;
26 require_once($CFG->dirroot . '/question/type/calculatedsimple/questiontype.php');
27 require_once($CFG->dirroot . '/question/engine/tests/helpers.php');
28 require_once($CFG->dirroot . '/question/type/edit_question_form.php');
29 require_once($CFG->dirroot . '/question/type/calculatedsimple/edit_calculatedsimple_form.php');
102 foreach ($questiondata->options->answers as $answer) {
103 $actualanswer = array_shift($actualquestiondata->options->answers);
104 foreach ($answer as $ansproperty => $ansvalue) {
105 if (!in_array($ansproperty, array('id', 'question', 'answerformat'))) {
ImageSize.php (https://github.com/adrienne/Readability.git) PHP · 370 lines
1 <?php
2 /**
3 * Zend Framework
23 * @see Zend_Validate_Abstract
24 */
25 require_once 'Zend/Validate/Abstract.php';
27 /**
138 }
139 $argv = func_get_args();
140 array_shift($argv);
141 $options['minheight'] = array_shift($argv);
142 if (!empty($argv)) {
143 $options['maxwidth'] = array_shift($argv);
144 if (!empty($argv)) {
145 $options['maxheight'] = array_shift($argv);
urlparser.php (https://gitlab.com/thiagotalma/stalag13) PHP · 218 lines
Category.php (https://github.com/expressdecor/Expressdecor.git) PHP · 256 lines
1 <?php
3 /*
167 if (!($listingProduct instanceof Ess_M2ePro_Model_Listing_Product)) {
168 $tempListingsProducts = $listingModel->getProducts(true,array('product_id'=>$productId));
169 count($tempListingsProducts) > 0 && $listingProduct = array_shift($tempListingsProducts);
170 }
215 }
217 $listingProduct = array_shift($listingsProducts);
219 if (!($listingProduct instanceof Ess_M2ePro_Model_Listing_Product)) {
Font.php (https://gitlab.com/axeltizon/magentoV1.9-demopoweraccess) PHP · 217 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: Font.php 24593 2012-01-05 20:35:02Z matthew $
21 */
23 /** Internally used classes */
24 #require_once 'Zend/Pdf/Font.php';
27 /** Zend_Pdf_FileParser */
28 #require_once 'Zend/Pdf/FileParser.php';
30 /**
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.
79 public function filter() {
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)) {
AtomParser.php (https://github.com/joomla/joomla-cms.git) PHP · 258 lines
trans_peep.php (https://github.com/sjorz/property-exporter.git) PHP · 233 lines
1 <?php
3 //**********************************************************************
11 //**********************************************************************
13 require_once "table.php";
14 require_once "sql.php";
159 $inspectionTimes = $inspectionTable->asArray();
161 $theProperty = array_shift ($propertyRows);
163 // If there are no properties with id $pid the property is no
172 utf8_encode ( $theProperty ['description']);
173 //print_r ($theProperty);
174 $theProperty ['contact'] = array_shift ($contactRows);
176 if (count ($landlordRows) > 0)
organizations.php (https://gitlab.com/blueprintmrk/cli) PHP · 208 lines
Collection.php (https://gitlab.com/daniruizcamacho/pfcascensores) PHP · 705 lines
AutoloaderMultiVersionTest.php (https://bitbucket.org/Dal-Papa/is-340-publish-base.git) PHP · 224 lines
1 <?php
2 /**
3 * Zend Framework
21 */
23 if (!defined('PHPUnit_MAIN_METHOD')) {
24 define('PHPUnit_MAIN_METHOD', 'Zend_Loader_AutoloaderMultiVersionTest::main');
28 * @see Zend_Loader_Autoloader
29 */
30 require_once 'Zend/Loader/Autoloader.php';
32 /**
38 * @group Zend_Loader
39 */
40 class Zend_Loader_AutoloaderMultiVersionTest extends PHPUnit_Framework_TestCase
41 {
42 public static function main()
logging.lib.php (https://github.com/jijkoun/ssscrape.git) PHP · 429 lines
1 <?php
3 /*
247 static function error($message, $args=null) {
248 $args = func_get_args();
249 $message = array_shift($args);
250 AnewtLog::_log(ANEWT_LOG_LEVEL_ERROR, $message, $args);
251 }
264 static function error_with_domain($domain, $message, $args=null) {
265 $args = func_get_args();
266 $domain = array_shift($args);
267 $message = array_shift($args);
281 static function critical($message, $args=null) {
282 $args = func_get_args();
283 $message = array_shift($args);
284 AnewtLog::_log(ANEWT_LOG_LEVEL_CRITICAL, $message, $args);
285 }
BlockPlugin.inc.php (https://github.com/ojsde/pkp-lib.git) PHP · 181 lines
zreport.php (https://github.com/mblix/ODOL.git) PHP · 97 lines
1 <?
2 /* $Id: edit.php,v 1.67 2005/10/24 11:54:33 thomasek Exp $ main.php,v 1.12 2001/11/20 17:55:12 thomasek Exp $ */
4 $WeeklySaleID = $_lib['input']->getProperty('WeeklySaleID');
15 <head>
16 <title>Empatix - customer</title>
17 <meta name="cvs" content="$Id: edit.php,v 1.67 2005/10/24 11:54:33 thomasek Exp $" />
18 <? includeinc('head') ?>
19 <? includeinc('javascript') ?>
55 <tr><th colspan="2">Salg</th></tr>
56 <? foreach($weeklysale->salehead['groups'] as $name => $i) {
57 $name = array_shift($salenameH);
58 ?>
59 <tr>
73 foreach($weeklysale->revenuehead['groups'] as $name => $i) {
74 $name = array_shift($revenuenameH);
75 $sumrevenue += $line->{"Group{$i}Amount"};
76 ?>
NotEmpty.php (https://github.com/grjones/qframe.git) PHP · 279 lines
1 <?php
2 /**
3 * Zend Framework
17 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id: NotEmpty.php 22697 2010-07-26 21:14:47Z alexander $
20 */
23 * @see Zend_Validate_Abstract
24 */
25 require_once 'Zend/Validate/Abstract.php';
27 /**
58 self::EMPTY_ARRAY => 'array',
59 self::NULL => 'null',
60 self::PHP => 'php',
61 self::SPACE => 'space',
62 self::OBJECT => 'object',
EachPromise.php (https://github.com/livinglab/openlab.git) PHP · 207 lines
1 <?php
3 namespace SimpleCalendar\plugin_deps\GuzzleHttp\Promise;
73 /**
74 * @psalm-suppress NullReference
75 * @phpstan-ignore-next-line
76 */
77 $this->aggregate->reject($e);
79 /**
80 * @psalm-suppress NullReference
81 * @phpstan-ignore-next-line
82 */
83 $this->aggregate->reject($e);
85 /**
86 * @psalm-suppress NullableReturnStatement
87 * @phpstan-ignore-next-line
88 */
89 return $this->aggregate;
RefResolver.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 277 lines
ArcGISDataController.php (https://github.com/Alex8452/Kurogo-Mobile-Web-Doc-Translation.git) PHP · 175 lines
value.php (https://github.com/azhai2012/calf.git) PHP · 219 lines
1 <?php defined('SYSPATH') or die('No direct script access.');
2 /**
3 * Kohana_Http_Header_Value represents a value assigned to an HTTP header, i.e.
12 * @since 3.1.0
13 * @copyright (c) 2008-2011 Kohana Team
14 * @license http://kohanaphp.com/license
15 */
16 class Kohana_Http_Header_Value {
97 // Remove properties from the string
98 $parts = explode(';', $value);
99 $value = array_shift($parts);
101 // Parse the properties
MailTransport.php (https://gitlab.com/Sigpot/AirSpot) PHP · 257 lines
1 <?php
3 /*
14 * It is advised that users do not use this transport if at all possible
15 * since a number of plugin features cannot be used in conjunction with this
16 * transport due to the internal interface in PHP itself.
17 *
18 * The level of error reporting with this transport is incredibly weak, again
19 * due to limitations of PHP's internal mail() function. You'll get an
20 * all-or-nothing result from sending.
21 *
156 unset($messageStr);
158 if ("\r\n" != PHP_EOL) {
159 // Non-windows (not using SMTP)
160 $headers = str_replace("\r\n", PHP_EOL, $headers);
Parser.php (https://github.com/markn86/moodle.git) PHP · 317 lines
Error.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 184 lines
1 <?php
3 namespace Drupal\Core\Utility;
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,
85 unset($decode['backtrace'], $decode['exception']);
86 // Remove 'main()'.
87 array_shift($backtrace);
89 // Even though it is possible that this method is called on a public-facing
100 *
101 * @param array $backtrace
102 * A standard PHP backtrace. Passed by reference.
103 *
104 * @return array
project_hierarchy_api.php (https://github.com/fusenigk/mantisbt-1.git) PHP · 290 lines
1 <?php
2 # MantisBT - A PHP based bugtracking system
25 * @link http://www.mantisbt.org
26 *
27 * @uses constant_inc.php
28 * @uses database_api.php
29 */
31 require_api( 'constant_inc.php' );
32 require_api( 'database_api.php' );
232 while( count( $t_lookup_ids ) > 0 ) {
233 $t_project_id = array_shift( $t_lookup_ids );
235 if( !isset( $g_cache_project_inheritance[$t_project_id] ) ) {
Boolean.php (https://github.com/MontmereLimited/ZendFramework-v1.git) PHP · 375 lines
23 * @see Zend_Filter_Interface
24 */
25 // // // // // // // // // // require_once 'Zend/Filter/Interface.php';
27 /**
53 self::EMPTY_ARRAY => 'array',
54 self::NULL => 'null',
55 self::PHP => 'php',
56 self::FALSE_STRING => 'false',
57 self::YES => 'yes',
93 $temp = array();
94 if (!empty($options)) {
95 $temp['type'] = array_shift($options);
96 }
Gettext.php (https://github.com/Martin1982/IBMessagingWorkshopServer.git) PHP · 167 lines
1 <?php
2 /**
3 * Zend Framework
16 * @package Zend_Translate
17 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
18 * @version $Id: Gettext.php 20096 2010-01-06 02:05:09Z bkarwin $
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 */
22 /** Zend_Locale */
23 // require_once 'Zend/Locale.php';
25 /** Zend_Translate_Adapter */
26 // require_once 'Zend/Translate/Adapter.php';
28 /**
DbStatement.php (https://github.com/grandison/budo16.git) PHP · 381 lines
1 <?php
2 /**
3 * Zend Framework
15 * @category Zend
16 * @package Test
17 * @subpackage PHPUnit
18 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: DbStatement.php 16911 2009-07-21 11:54:03Z matthew $
21 */
23 // require_once "Zend/Db/Statement/Interface.php";
25 /**
privacy_test.php (https://gitlab.com/unofficial-mirrors/moodle) PHP · 205 lines
1 <?php
2 // This file is part of Moodle - http://moodle.org/
3 //
112 $monthlystats = (array) $writer->get_data([get_string('privacy:monthlypath', 'report_stats')]);
113 $this->assertCount(1, $monthlystats);
114 $data = array_shift($monthlystats);
115 $this->assertEquals($course1->fullname, $data['course']);
116 $writer = \core_privacy\local\request\writer::with_context($context2);
117 $monthlystats = (array) $writer->get_data([get_string('privacy:monthlypath', 'report_stats')]);
118 $this->assertCount(1, $monthlystats);
119 $data = array_shift($monthlystats);
120 $this->assertEquals($course2->fullname, $data['course']);
121 $weeklystats = (array) $writer->get_data([get_string('privacy:weeklypath', 'report_stats')]);
122 $this->assertCount(1, $weeklystats);
123 $data = array_shift($weeklystats);
124 $this->assertEquals($course2->fullname, $data['course']);
125 }
RestDeserializer.class.php (https://github.com/treuter/xp-framework.git) PHP · 175 lines
Partition.php (https://gitlab.com/github-cloud-corp/aws-sdk-php) PHP · 180 lines
Arr.php (https://gitlab.com/leon0399/damnit-engine) PHP · 475 lines
1 <?php
3 namespace Illuminate\Support;
203 while (count($parts) > 1) {
204 $part = array_shift($parts);
206 if (isset($array[$part]) && is_array($array[$part])) {
211 }
213 unset($array[array_shift($parts)]);
214 }
215 }
403 while (count($keys) > 1) {
404 $key = array_shift($keys);
406 // If the key doesn't exist at this depth, we will just create an empty array
AbstractDb.php (https://github.com/sdh100shaun/Linktuesday.com.git) PHP · 305 lines
1 <?php
2 /**
3 * Zend Framework
110 } else if (func_num_args() > 1) {
111 $options = func_get_args();
112 $temp['table'] = array_shift($options);
113 $temp['field'] = array_shift($options);
114 if (!empty($options)) {
115 $temp['exclude'] = array_shift($options);
116 }
118 if (!empty($options)) {
119 $temp['adapter'] = array_shift($options);
120 }
loop.php (https://github.com/tonyahowe/ABO.git) PHP · 149 lines
20 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
21 <header>
22 <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'brunelleschi' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
23 <?php if(brunelleschi_option('posted-on') === 'Above Post'): ?>
58 <?php if ( function_exists( 'get_post_format' ) && 'gallery' == get_post_format( $post->ID ) ) : ?>
59 <a href="<?php echo get_post_format_link( 'gallery' ); ?>" title="<?php esc_attr_e( 'View Galleries', 'brunelleschi' ); ?>"><?php _e( 'More Galleries', 'brunelleschi' ); ?></a>
60 <span class="meta-sep">|</span>
61 <?php elseif ( in_category( _x( 'gallery', 'gallery category slug', 'brunelleschi' ) ) ) : ?>
62 <a href="<?php echo get_term_link( _x( 'gallery', 'gallery category slug', 'brunelleschi' ), 'category' ); ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'brunelleschi' ); ?>"><?php _e( 'More Galleries', 'brunelleschi' ); ?></a>
63 <span class="meta-sep">|</span>
64 <?php endif; ?>
91 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
92 <header>
93 <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'brunelleschi' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
94 <?php if(brunelleschi_option('posted-on') === 'Above Post'): ?>
Abstract.php (https://github.com/nigeldaley/moodle.git) PHP · 298 lines
1 <?php
2 /**
3 * Zend Framework
23 * @see Zend_Validate_Abstract
24 */
25 require_once 'Zend/Validate/Abstract.php';
27 /**
99 } else if (func_num_args() > 1) {
100 $options = func_get_args();
101 $temp['table'] = array_shift($options);
102 $temp['field'] = array_shift($options);
103 if (!empty($options)) {
104 $temp['exclude'] = array_shift($options);
105 }
Repository.php (https://github.com/jtai/zf2.git) PHP · 273 lines
loop.php (https://github.com/chopsuei3/oscc.git) PHP · 155 lines
36 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
37 <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'coraline' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
39 <div class="entry-meta">
72 if ( in_category( $cat_slug ) ) :
73 ?>
74 <p><a href="<?php echo get_term_link( $cat_slug, 'category' ); ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'coraline' ); ?>"><?php _e( 'More Galleries', 'coraline' ); ?></a></p>
75 <?php endif; endif; ?>
106 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
107 <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'coraline' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
109 <div class="entry-meta">
110 <?php coraline_posted_on(); coraline_posted_by(); ?><span class="comments-link"><span class="meta-sep">|</span> <?php comments_popup_link( __( 'Leave a comment', 'coraline' ), __( '1 Comment', 'coraline' ), __( '% Comments', 'coraline' ) ); ?></span>
111 </div><!-- .entry-meta -->
Gettext.php (https://github.com/oveach/tuto-zf-doctrine2.git) PHP · 169 lines
1 <?php
2 /**
3 * Zend Framework
16 * @package Zend_Translate
17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
18 * @version $Id: Gettext.php 24594 2012-01-05 21:27:01Z matthew $
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 */
22 /** Zend_Locale */
23 require_once 'Zend/Locale.php';
25 /** Zend_Translate_Adapter */
26 require_once 'Zend/Translate/Adapter.php';
28 /**
Amalgamator.php (https://github.com/livinglab/openlab.git) PHP · 305 lines
1 <?php
2 /**
3 * Merge pre-3.0 duplicate venues and organizers
171 global $wpdb;
172 array_map( 'intval', $venue_ids );
173 $keep = array_shift( $venue_ids );
174 $old_ids = implode( ',', $venue_ids );
175 $sql = "UPDATE {$wpdb->postmeta} SET meta_value=%d WHERE meta_key=%s AND meta_value IN($old_ids)";
192 global $wpdb;
193 array_map( 'intval', $organizer_ids );
194 $keep = array_shift( $organizer_ids );
195 $old_ids = implode( ',', $organizer_ids );
196 $sql = "UPDATE {$wpdb->postmeta} SET meta_value=%d WHERE meta_key=%s AND meta_value IN($old_ids)";
268 'post_type' => Tribe__Events__Main::POSTTYPE,
269 'page' => $settings->adminSlug,
270 ], admin_url( 'edit.php' )
271 )
272 );
h5p_canedit_test.php (https://github.com/sbourget/moodle.git) PHP · 204 lines
Gettext.php (https://bitbucket.org/hmancvs/farmis.git) PHP · 169 lines
1 <?php
2 /**
3 * Zend Framework
16 * @package Zend_Translate
17 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
18 * @version $Id: Gettext.php,v 1.1 2011/11/03 08:29:26 smusoke Exp $
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 */
22 /** Zend_Locale */
23 require_once 'Zend/Locale.php';
25 /** Zend_Translate_Adapter */
26 require_once 'Zend/Translate/Adapter.php';
28 /**
Arr.php (https://gitlab.com/dzakiafif/cokelatklasik) PHP · 419 lines
1 <?php
3 namespace Illuminate\Support;
203 while (count($parts) > 1) {
204 $part = array_shift($parts);
206 if (isset($array[$part]) && is_array($array[$part])) {
209 }
211 unset($array[array_shift($parts)]);
213 // clean up after each pass
370 while (count($keys) > 1) {
371 $key = array_shift($keys);
373 // If the key doesn't exist at this depth, we will just create an empty array
Router.php (https://github.com/swoft-cloud/swoft-component.git) PHP · 365 lines
1 <?php declare(strict_types=1);
2 /**
3 * This file is part of Swoft.
14 use Swoft\Contract\RouterInterface;
15 use Swoft\Stdlib\Helper\Str;
16 use function array_shift;
17 use function count;
18 use function preg_match;
206 // First is full match.
207 array_shift($matches);
208 foreach ($matches as $index => $value) {
209 $params[$pathVars[$index]] = $value;
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
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) {
95 $this->inABody = false;
96 } elseif ($this->inABody) {
97 if (!$expression && get_class($node) !== 'Twig_Node' && $prependedNodes = array_shift($this->prependedNodes)) {
98 $nodes = array();
99 foreach (array_unique($prependedNodes) as $name) {
244 {
245 if ($node instanceof Twig_Node_For) {
246 array_shift($this->loops);
247 array_shift($this->loopsTargets);
Test.php (https://bitbucket.org/Ebozavrik/test-application.git) PHP · 201 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: Test.php 24593 2012-01-05 20:35:02Z matthew $
21 */
24 * @see Zend_Tool_Project_Provider_Abstract
25 */
26 require_once 'Zend/Tool/Project/Provider/Abstract.php';
28 /**
63 }
65 $included = @include 'PHPUnit/Runner/Version.php';
67 if ($included === false) {
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 }
202 public function getLog(string $channel = ''): array
203 {
204 $channel = $channel ?: array_shift($this->channel);
205 return $this->log[$channel] ?? [];
206 }
Autoloader.php (https://gitlab.com/rsilveira1987/Expresso) 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 /**
121 }
122 } elseif (is_array($autoloader)) {
123 $object = array_shift($autoloader);
124 $method = array_shift($autoloader);
Stream.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 297 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
16 /**
17 * Represents an HTTP response message as PHP stream resource
18 */
19 class Stream extends Response
165 while (count($responseArray)) {
166 $nextLine = array_shift($responseArray);
167 $headersString .= $nextLine."\n";
168 $nextLineTrimmed = trim($nextLine);
DbStatement.php (https://bitbucket.org/Ebozavrik/test-application.git) PHP · 426 lines
1 <?php
2 /**
3 * Zend Framework
15 * @category Zend
16 * @package Zend_Test
17 * @subpackage PHPUnit
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: DbStatement.php 25024 2012-07-30 15:08:15Z rob $
21 */
24 * @see Zend_Db_Statement_Interface
25 */
26 require_once "Zend/Db/Statement/Interface.php";
28 /**
Status.php (https://github.com/ChuguluGames/mediawiki-svn.git) PHP · 358 lines
ActivityRepository.php (https://github.com/phpugl/Dime.git) PHP · 265 lines
1 <?php
3 namespace Dime\TimetrackerBundle\Entity;
36 $aliases = $qb->getRootAliases();
37 $alias = array_shift($aliases);
39 $qb->andWhere($qb->expr()->like($alias . '.description', ':text'));
61 $aliases = $qb->getRootAliases();
62 $alias = array_shift($aliases);
64 if (is_array($date) && count($date) == 1) {
65 $date = array_shift($date);
66 }
ImageSize.php (https://bitbucket.org/alexandretaz/maniac_divers.git) PHP · 379 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
99 $argv = func_get_args();
100 array_shift($argv);
101 $options['minHeight'] = array_shift($argv);
102 if (!empty($argv)) {
103 $options['maxWidth'] = array_shift($argv);
104 if (!empty($argv)) {
105 $options['maxHeight'] = array_shift($argv);
SMW_Exp_Data.php (https://github.com/ChuguluGames/mediawiki-svn.git) PHP · 255 lines
1 <?php
2 /**
3 * SMWExpData is a class representing semantic data that is ready for easy
62 $result = new SMWExpData( new SMWExpResource( '' ) ); // bnode
63 $result->addPropertyObjectValue( $rdftype, new SMWExpData( SMWExporter::getSpecialNsResource( 'rdf', 'List' ) ) );
64 $result->addPropertyObjectValue( $rdffirst, array_shift( $elements ) );
65 $result->addPropertyObjectValue( $rdfrest, SMWExpData::makeCollection( $elements ) );
66 return $result;
145 $pe = SMWExporter::getSpecialNsResource( 'rdf', 'type' );
146 if ( array_key_exists( $pe->getUri(), $this->m_children ) ) {
147 $result = array_shift( $this->m_children[$pe->getUri()] );
148 if ( count( $this->m_children[$pe->getUri()] ) == 0 ) {
149 unset( $this->m_edges[$pe->getUri()] );
AuthItem.php (https://github.com/allinside/Yii-CMS.git) PHP · 208 lines
1 <?php
3 class AuthItem extends ActiveRecordModel
175 $controller_class = $controller . 'Controller';
176 $controller_file = $controller_class . '.php';
178 $modules = Yii::app()->getModules();
180 foreach ($modules as $module)
181 {
182 $module_dir = array_shift(explode('.', $module['class']));
183 $module_path = Yii::getPathOfAlias("application.modules.{$module_dir}");
DB.class.php (https://github.com/dbernar1/Project-Pier.git) PHP · 346 lines
1 <?php
3 /**
106 private function useAdapter($adapter_name) {
107 $adapter_class = self::getAdapterClass($adapter_name);
108 $path = dirname(__FILE__) . "/adapters/$adapter_class.class.php";
109 if (!is_readable($path)) {
110 throw new FileDnxError($path);
137 static function attempt($sql) {
138 $arguments = func_get_args();
139 array_shift($arguments);
140 $arguments = count($arguments) ? array_flat($arguments) : null;
141 try {
156 static function execute($sql) {
157 $arguments = func_get_args();
158 array_shift($arguments);
159 $arguments = count($arguments) ? array_flat($arguments) : null;
FormCheckbox.php (https://github.com/leerbag/zf2.git) PHP · 161 lines
Csv.php (https://github.com/eschabell/openshift-zendframework.git) PHP · 121 lines
1 <?php
2 /**
3 * Zend Framework
16 * @package Zend_Translate
17 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
18 * @version $Id: Csv.php 23775 2011-03-01 17:25:24Z ralph $
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 */
23 /** Zend_Locale */
24 require_once 'Zend/Locale.php';
26 /** Zend_Translate_Adapter */
27 require_once 'Zend/Translate/Adapter.php';
TBGWorkflow.class.php (https://github.com/pb30/thebuggenie.git) PHP · 336 lines
1 <?php
3 /**
6 * @author Daniel Andre Eikeland <zegenie@zegeniestudios.net>
7 * @version 3.0
8 * @license http://www.opensource.org/licenses/mozilla1.1.php Mozilla Public License 1.1 (MPL 1.1)
9 * @package thebuggenie
10 * @subpackage core
214 {
215 $steps = $this->getSteps();
216 return (is_array($steps)) ? array_shift($steps) : null;
217 }
eGlooCombine.php (https://github.com/GunioRobot/eglooframework.git) PHP · 367 lines
Phpgw.php (https://github.com/ewandor/horde.git) PHP · 147 lines
1 <?php
2 /**
3 * The Horde_Rpc_Phpgw class provides an XMLRPC implementation of the
4 * Horde RPC system compatible with phpgw. It is based on the
5 * xmlrpc.php implementation by Jan Schneider.
12 * @package Rpc
13 */
14 class Horde_Rpc_Phpgw extends Horde_Rpc
15 {
16 /**
30 $this->_server = xmlrpc_server_create();
32 // Register only phpgw services.
33 foreach ($GLOBALS['registry']->listMethods('phpgw') as $method) {
login_multi_ip.php (https://github.com/extraaa/Game.git) PHP · 263 lines
1 <?php
2 /*
3 * login_multi_ip.php - Finding users logging in using the same IP
14 // include PEAR::Console_Getopt
15 require_once('Console/Getopt.php');
17 // check for command line options
18 $options = Console_Getopt::getOpt(Console_Getopt::readPHPArgv(), 'dht:');
19 if (PEAR::isError($options)) {
20 multiip_usage();
109 function multiip_usage() {
110 echo
111 "Usage: php login_multi_ip.php [-d] [-h] [-t time_interval]\n".
112 " -d Debug\n".
113 " -h This help\n".
AbstractEvent.php (https://github.com/Hackwar/joomla-cms.git) PHP · 172 lines
1 <?php
2 /**
3 * Joomla! Content Management System
71 $bareName = strpos($eventName, 'on') === 0 ? substr($eventName, 2) : $eventName;
72 $parts = Normalise::fromCamelCase($bareName, true);
73 $eventClassName = __NAMESPACE__ . '\\' . ucfirst(array_shift($parts)) . '\\';
74 $eventClassName .= implode('', $parts);
75 $eventClassName .= 'Event';
FormCheckbox.php (https://github.com/bhaumik25/zend-framework.git) PHP · 135 lines
1 <?php
2 /**
3 * Zend Framework
24 * Abstract class for extension
25 */
26 require_once 'Zend/View/Helper/FormElement.php';
77 }
78 if (null === $checkedValue) {
79 $checkedValue = array_shift($checkedOptions);
80 }
81 if (null === $unCheckedValue) {
82 $unCheckedValue = array_shift($checkedOptions);
83 }
84 } elseif ($value !== null) {
StringLength.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 211 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
53 if (!is_array($options)) {
54 $options = func_get_args();
55 $temp['min'] = array_shift($options);
56 if (!empty($options)) {
57 $temp['max'] = array_shift($options);
60 if (!empty($options)) {
61 $temp['encoding'] = array_shift($options);
62 }
Exception.php (https://github.com/tstarling/hiphop-php.git) PHP · 226 lines
3 // This doc comment block generated by idl/sysdoc.php
4 /**
5 * ( excerpt from http://php.net/manual/en/class.exception.php )
6 *
7 * Exception is the base class for all Exceptions.
92 // This doc comment block generated by idl/sysdoc.php
93 /**
94 * ( excerpt from http://php.net/manual/en/exception.getcode.php )
95 *
96 * Returns the Exception code.
170 // This doc comment block generated by idl/sysdoc.php
171 /**
172 * ( excerpt from http://php.net/manual/en/exception.tostring.php )
173 *
174 * Returns the string representation of the exception.
RollbackAction.php (https://github.com/daevid/MWFork.git) PHP · 122 lines
Csv.php (https://github.com/kervin/kyzstudio.git) PHP · 121 lines
1 <?php
2 /**
3 * Zend Framework
16 * @package Zend_Translate
17 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
18 * @version $Id: Csv.php 21661 2010-03-27 20:20:27Z thomas $
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 */
23 /** Zend_Locale */
24 #require_once 'Zend/Locale.php';
26 /** Zend_Translate_Adapter */
27 #require_once 'Zend/Translate/Adapter.php';
Csv.php (https://github.com/frhumanes/PLM.git) PHP · 121 lines
1 <?php
2 /**
3 * Zend Framework
16 * @package Zend_Translate
17 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
18 * @version $Id: Csv.php 21662 2010-03-27 20:23:42Z thomas $
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 */
23 /** Zend_Locale */
24 require_once 'Zend/Locale.php';
26 /** Zend_Translate_Adapter */
27 require_once 'Zend/Translate/Adapter.php';
class-wp-http-cookie.php (https://gitlab.com/campus-academy/krowkaramel) PHP · 276 lines
1 <?php
2 /**
3 * HTTP API: WP_Http_Cookie class
131 // Removes name=value from items.
132 array_shift( $pairs );
134 // Set everything else as a property.
227 * @return string Header encoded cookie name and value.
228 */
229 public function getHeaderValue() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
230 if ( ! isset( $this->name ) || ! isset( $this->value ) ) {
231 return '';
250 * @return string
251 */
252 public function getFullHeader() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
253 return 'Cookie: ' . $this->getHeaderValue();
254 }
Csv.php (https://github.com/Doap/iCms---intelligent-Content-management-system.git) PHP · 121 lines
1 <?php
2 /**
3 * Zend Framework
16 * @package Zend_Translate
17 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
18 * @version $Id: Csv.php 21661 2010-03-27 20:20:27Z thomas $
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 */
23 /** Zend_Locale */
24 require_once 'Zend/Locale.php';
26 /** Zend_Translate_Adapter */
27 require_once 'Zend/Translate/Adapter.php';