100+ results for 'php explode'
Not the results you expected?
class.wp-dependencies.php (https://github.com/livinglab/openlab.git) PHP · 452 lines
1 <?php
2 /**
3 * Dependencies API: WP_Dependencies base class
165 foreach ( $handles as $handle ) {
166 $handle_parts = explode( '?', $handle );
167 $handle = $handle_parts[0];
168 $queued = in_array( $handle, $this->to_do, true );
313 public function enqueue( $handles ) {
314 foreach ( (array) $handles as $handle ) {
315 $handle = explode( '?', $handle );
317 if ( ! in_array( $handle[0], $this->queue, true ) && isset( $this->registered[ $handle[0] ] ) ) {
341 public function dequeue( $handles ) {
342 foreach ( (array) $handles as $handle ) {
343 $handle = explode( '?', $handle );
344 $key = array_search( $handle[0], $this->queue, true );
Arr.php (https://gitlab.com/KakoFerrare/PHP-MVC) PHP · 519 lines
1 <?php
3 namespace Illuminate\Support;
217 }
219 $parts = explode('.', $key);
221 // clean up before each pass
258 }
260 foreach (explode('.', $key) as $segment) {
261 if (static::accessible($array) && static::exists($array, $segment)) {
262 $array = $array[$segment];
299 }
301 foreach (explode('.', $key) as $segment) {
302 if (static::accessible($subKeyArray) && static::exists($subKeyArray, $segment)) {
303 $subKeyArray = $subKeyArray[$segment];
InputDefinition.php (https://gitlab.com/geeta7/drupal) PHP · 455 lines
1 <?php
3 /*
181 public function getArgumentCount()
182 {
183 return $this->hasAnArrayArgument ? PHP_INT_MAX : count($this->arguments);
184 }
248 if ($option->getShortcut()) {
249 foreach (explode('|', $option->getShortcut()) as $shortcut) {
250 if (isset($this->shortcuts[$shortcut]) && !$option->equals($this->options[$this->shortcuts[$shortcut]])) {
251 throw new \LogicException(sprintf('An option with shortcut "%s" already exists.', $shortcut));
256 $this->options[$option->getName()] = $option;
257 if ($option->getShortcut()) {
258 foreach (explode('|', $option->getShortcut()) as $shortcut) {
259 $this->shortcuts[$shortcut] = $option->getName();
260 }
Netdna.php (https://gitlab.com/juanito.abelo/nlmobile) PHP · 282 lines
1 <?php
3 /**
8 }
10 w3_require_once(W3TC_LIB_W3_DIR . '/Cdn/Mirror.php');
12 define('W3TC_CDN_NETDNA_URL', 'netdna-cdn.com');
17 class W3_Cdn_Mirror_Netdna extends W3_Cdn_Mirror {
18 /**
19 * PHP5 Constructor
20 *
21 * @param array $config
29 'zone_id' => 0
30 ), $config);
31 $split_keys = explode('+', $config['authorization_key']);
32 if (sizeof($split_keys)==3)
33 list($config['alias'], $config['consumerkey'], $config['consumersecret']) = $split_keys;
Getopt.php (https://github.com/fmake/adv.git) PHP · 208 lines
1 <?php
2 /**
3 * PHPUnit
4 *
5 * Copyright (c) 2001-2012, Sebastian Bergmann <sebastian@phpunit.de>.
6 * All rights reserved.
7 *
35 * POSSIBILITY OF SUCH DAMAGE.
36 *
37 * @package PHPUnit
38 * @subpackage Util
39 * @author Sebastian Bergmann <sebastian@phpunit.de>
40 * @copyright 2001-2012 Sebastian Bergmann <sebastian@phpunit.de>
41 * @license http://www.opensource.org/licenses/bsd-license.php BSD License
Getopt.php (https://github.com/masicek/XSLT-Benchmarking-XSLTMark-II.git) PHP · 208 lines
1 <?php
2 /**
3 * PHPUnit
4 *
5 * Copyright (c) 2002-2011, Sebastian Bergmann <sebastian@phpunit.de>.
6 * All rights reserved.
7 *
35 * POSSIBILITY OF SUCH DAMAGE.
36 *
37 * @package PHPUnit
38 * @subpackage Util
39 * @author Sebastian Bergmann <sebastian@phpunit.de>
40 * @copyright 2002-2011 Sebastian Bergmann <sebastian@phpunit.de>
41 * @license http://www.opensource.org/licenses/bsd-license.php BSD License
submit.php (https://github.com/jazbek/nycga2.git) PHP · 288 lines
FlattenException.php (https://gitlab.com/mdabutaleb/bitm-laravel-1) PHP · 256 lines
1 <?php
3 /*
16 /**
17 * FlattenException wraps a PHP Exception to be able to serialize it.
18 *
19 * Basically, this class removes all objects from the trace.
198 $namespace = '';
199 if (isset($entry['class'])) {
200 $parts = explode('\\', $entry['class']);
201 $class = array_pop($parts);
202 $namespace = implode('\\', $parts);
223 return array('array', '*SKIPPED over 10000 entries*');
224 }
225 if ($value instanceof \__PHP_Incomplete_Class) {
226 // is_object() returns false on PHP<=7.1
function.html_select_time.php (https://github.com/cabenitez/factuweb.git) PHP · 364 lines
1 <?php
2 /**
3 * Smarty plugin
10 * @ignore
11 */
12 require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');
13 /**
14 * @ignore
15 */
16 require_once(SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php');
18 /**
23 * Purpose: Prints the dropdowns for time selection
24 *
25 * @link http://www.smarty.net/manual/en/language.function.html.select.time.php {html_select_time}
26 * (Smarty online manual)
27 * @author Roberto Berto <roberto@berto.net>
ini.php (https://gitlab.com/endomorphosis/OLAAaction) PHP · 249 lines
1 <?php
2 /**
3 * Akeeba Engine
4 * The modular PHP5 site backup engine
5 * @copyright Copyright (c)2009-2011 Nicholas K. Dionysopoulos
6 * @license GNU GPL version 3 or, at your option, any later version
7 * @package akeebaengine
8 * @version $Id: ini.php 409 2011-01-24 09:30:22Z nikosdion $
9 */
14 /**
15 * A class to load INI files, without bumping into incompatibilities between
16 * different PHP versions
17 */
18 class AEUtilINI {
NumericField.php (https://gitlab.com/reasonat/test8) PHP · 181 lines
CredentialsAbstract.php (https://github.com/MontmereLimited/ZendFramework-v1.git) PHP · 244 lines
1 <?php
2 /**
3 * Zend Framework
17 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id: CredentialsAbstract.php 23775 2011-03-01 17:25:24Z ralph $
20 */
23 * @see Zend_Http_Client
24 */
25 // // // // // // // // require_once 'Zend/Http/Client.php';
27 /**
28 * @see Zend_Service_WindowsAzure_Credentials_Exception
29 */
30 // // // // // // // // require_once 'Zend/Service/WindowsAzure/Credentials/Exception.php';
32 /**
Config.php (https://github.com/justinmc/turkiball.com.git) PHP · 514 lines
1 <?php
2 /*
3 * CKFinder
21 * Include access control config class
22 */
23 require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/AccessControlConfig.php";
24 /**
25 * Include resource type config class
26 */
27 require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/ResourceTypeConfig.php";
28 /**
29 * Include thumbnails config class
30 */
31 require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/ThumbnailsConfig.php";
32 /**
33 * Include thumbnails config class
clsPessoaAuxiliarTelefone.inc.php (https://github.com/gtinfo/ieducar.git) PHP · 273 lines
1 <?php
2 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
3 * *
25 * *
26 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
27 require_once ("include/clsBanco.inc.php");
28 require_once ("include/otopic/otopicGeral.inc.php");
226 $resultado = array();
227 $countCampos = count( explode( ",", $this->campos_lista ) );
229 while ( $db->ProximoRegistro() )
filters-Tag.php (https://github.com/cpainchaud/pan-configurator.git) PHP · 424 lines
query.php (https://bitbucket.org/viswanath608/roar.git) PHP · 316 lines
1 <?php namespace System\Database;
3 /**
4 * Nano
5 *
6 * Lightweight php framework
7 *
8 * @package nano
28 // handle aliases
29 if(strpos(strtolower($column), ' as ') !== false) {
30 list($col, $alias) = explode(' as ', strtolower($column));
31 return $this->wrap($col) . ' AS ' . $this->wrap($alias);
32 }
37 }
39 foreach(explode('.', $column) as $segment) {
40 $sql[] = ($segment !== '*') ? $this->wrapper . $segment . $this->wrapper : $segment;
41 }
shortcodes-init.php (https://github.com/coolio197/woocommerce.git) PHP · 294 lines
1 <?php
2 /**
3 * Shortcodes init
10 */
12 include_once('shortcode-cart.php');
13 include_once('shortcode-checkout.php');
14 include_once('shortcode-my_account.php');
15 include_once('shortcode-order_tracking.php');
16 include_once('shortcode-pay.php');
17 include_once('shortcode-thankyou.php');
172 if(isset($atts['skus'])){
173 $skus = explode(',', $atts['skus']);
174 array_walk($skus, create_function('&$val', '$val = trim($val);'));
175 $args['meta_query'][] = array(
context.php (https://github.com/chamnan/ionize.git) PHP · 290 lines
Grid.php (https://bitbucket.org/dnejedly/eaparts.git) PHP · 179 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_Adminhtml
23 * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
88 if ($this->getFilterData()->getStoreIds()) {
89 $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
90 }
91 $currencyCode = $this->getCurrentCurrencyCode();
magmi_csvreader.php (https://gitlab.com/myurd/magmi-git) PHP · 208 lines
1 <?php
2 require_once("magmi_mixin.php");
3 require_once("magmi_utils.php");
5 class Magmi_CSVException extends Exception
38 $this->_cenc = $this->getParam($this->_prefix.":enclosure", '"');
39 $this->_buffersize = $this->getParam($this->_prefix.":buffer", 0);
40 $this->_ignored = explode(",", $this->getParam($this->_prefix.":ignore"));
41 }
ResponseHeaderBagTest.php (https://github.com/Exercise/symfony.git) PHP · 176 lines
1 <?php
3 /*
15 use Symfony\Component\HttpFoundation\Cookie;
17 class ResponseHeaderBagTest extends \PHPUnit_Framework_TestCase
18 {
19 public function testCacheControlHeader()
70 $bag->setCookie(new Cookie('foo', 'bar'));
72 $this->assertContains("Set-Cookie: foo=bar; httponly", explode("\r\n", $bag->__toString()));
74 $bag->clearCookie('foo');
76 $this->assertContains("Set-Cookie: foo=deleted; expires=".gmdate("D, d-M-Y H:i:s T", time() - 31536001)."; httponly", explode("\r\n", $bag->__toString()));
77 }
Post.php (https://github.com/eschabell/openshift-zendframework.git) PHP · 292 lines
1 <?php
3 /**
19 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
21 * @version $Id: Post.php 23775 2011-03-01 17:25:24Z ralph $
22 */
26 * @see Zend_Date
27 */
28 require_once 'Zend/Date.php';
30 /**
31 * @see Zend_Service_Delicious_SimplePost
32 */
33 require_once 'Zend/Service/Delicious/SimplePost.php';
InterchangeBuilder.php (https://github.com/markn86/moodle.git) PHP · 226 lines
1 <?php
3 class HTMLPurifier_ConfigSchema_InterchangeBuilder
115 if (isset($hash['TYPE'])) {
116 $type = explode('/', $hash->offsetGet('TYPE'));
117 if (isset($type[1])) {
118 $directive->typeAllowsNull = true;
176 /**
177 * Evaluates an array PHP code string without array() wrapper
178 * @param string $contents
179 */
authentication.php (https://github.com/nigeldaley/moodle.git) PHP · 238 lines
AdvancedValueBinder.php (https://github.com/markn86/moodle.git) PHP · 174 lines
1 <?php
3 namespace PhpOffice\PhpSpreadsheet\Cell;
5 use PhpOffice\PhpSpreadsheet\Calculation\Calculation;
6 use PhpOffice\PhpSpreadsheet\RichText\RichText;
7 use PhpOffice\PhpSpreadsheet\Shared\Date;
8 use PhpOffice\PhpSpreadsheet\Shared\StringHelper;
9 use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
117 if (preg_match('/^(\d|[0-1]\d|2[0-3]):[0-5]\d$/', $value)) {
118 // Convert value to number
119 [$h, $m] = explode(':', $value);
120 $days = $h / 24 + $m / 1440;
121 $cell->setValueExplicit($days, DataType::TYPE_NUMERIC);
transformations.lib.php (https://github.com/cabenitez/factuweb.git) PHP · 249 lines
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Set of functions used with the relation and pdf feature
5 *
6 * @version $Id: transformations.lib.php 11192 2008-04-09 00:22:06Z lem9 $
7 */
77 * @uses sort()
78 * @uses preg_match()
79 * @uses explode()
80 * @uses str_replace()
81 * @staticvar array mimetypes
109 if (preg_match('|^.*__.*\.inc\.php$|', $file)) {
110 // File contains transformation functions.
111 $base = explode('__', str_replace('.inc.php', '', $file));
112 $mimetype = str_replace('_', '/', $base[0]);
113 $stack['mimetype'][$mimetype] = $mimetype;
Post.php (https://github.com/frhumanes/PLM.git) PHP · 292 lines
1 <?php
3 /**
19 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
21 * @version $Id: Post.php 20096 2010-01-06 02:05:09Z bkarwin $
22 */
26 * @see Zend_Date
27 */
28 require_once 'Zend/Date.php';
30 /**
31 * @see Zend_Service_Delicious_SimplePost
32 */
33 require_once 'Zend/Service/Delicious/SimplePost.php';
Table.php (https://github.com/ggunlugu/ornekler.git) PHP · 220 lines
1 <?php
2 /**
3 *
27 * @package Solar_Markdown_Extra
28 *
29 * @author Michel Fortin <http://www.michelf.com/projects/php-markdown/>
30 *
31 * @author Paul M. Jones <pmjones@solarphp.com>
32 *
33 * @license http://opensource.org/licenses/bsd-license.php BSD
34 *
35 * @version $Id: Table.php 3153 2008-05-05 23:14:16Z pmjones $
197 // Split content by row.
198 $rows = explode("\n", trim($content, "\n"));
200 $text .= " <tbody>\n";
ConfigGenerator.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 270 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
252 $configData = new ConfigData(ConfigFilePool::APP_ENV);
253 if (isset($data[ConfigOptionsListConstants::INPUT_KEY_CACHE_HOSTS])) {
254 $hostData = explode(',', $data[ConfigOptionsListConstants::INPUT_KEY_CACHE_HOSTS]);
255 $hosts = [];
256 foreach ($hostData as $data) {
257 $dataArray = explode(':', trim($data));
258 $host = [];
259 $host['host'] = $dataArray[0];
PhpdocToCommentFixerTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 472 lines
Post.php (https://github.com/rgranadino/magento-mirror.git) PHP · 292 lines
1 <?php
3 /**
19 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
21 * @version $Id: Post.php 20096 2010-01-06 02:05:09Z bkarwin $
22 */
26 * @see Zend_Date
27 */
28 #require_once 'Zend/Date.php';
30 /**
31 * @see Zend_Service_Delicious_SimplePost
32 */
33 #require_once 'Zend/Service/Delicious/SimplePost.php';
bylocation.php (https://gitlab.com/alexprowars/bitrix) PHP · 295 lines
1 <?php
2 namespace Bitrix\Sale\Delivery\Restrictions;
108 if($params["LOCATION"][$class::DB_LOCATION_FLAG] <> '')
109 {
110 $LOCATION1 = explode(':', $params["LOCATION"][$class::DB_LOCATION_FLAG]);
111 }
113 if($params["LOCATION"][$class::DB_GROUP_FLAG] <> '')
114 {
115 $LOCATION2 = explode(':', $params["LOCATION"][$class::DB_GROUP_FLAG]);
116 }
117 }
DBConnection.inc.php (https://github.com/mcrider/pkpUpgradeTestSuite.git) PHP · 270 lines
class.email.php (https://github.com/mischka/Garden.git) PHP · 219 lines
28 * @var PHPMailer
29 */
30 private $_PhpMailer;
32 /**
39 */
40 function __construct() {
41 $this->_PhpMailer = new PHPMailer();
42 $this->Clear();
43 parent::__construct();
145 */
146 public function MimeType($MimeType) {
147 $this->_PhpMailer->IsHTML($MimeType === 'text/html');
148 return $this;
149 }
175 if (!$this->_PhpMailer->Send()) {
176 throw new Exception($this->_PhpMailer->ErrorInfo);
177 }
ControllerResolver.php (https://github.com/FabienD/symfony.git) PHP · 207 lines
Sreg.php (https://github.com/MontmereLimited/ZendFramework-v1.git) PHP · 300 lines
1 <?php
3 /**
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: Sreg.php 23775 2011-03-01 17:25:24Z ralph $
21 */
24 * @see Zend_OpenId_Extension
25 */
26 // // // // // // // // require_once "Zend/OpenId/Extension.php";
28 /**
176 $props = array();
177 if (!empty($params['openid_sreg_optional'])) {
178 foreach (explode(',', $params['openid_sreg_optional']) as $prop) {
179 $prop = trim($prop);
180 $props[$prop] = false;
vote.class.php (https://github.com/ButuzGOL/Open-Lamp-Engine.git) PHP · 216 lines
1 <?php
2 /*
3 //=============================================================================/
12 // Данный код защищен авторскими правами :)
13 //=============================================================================/
14 // Файл: vote.class.php
15 //-----------------------------------------------------------------------------/
16 // Назначение: Класс управления голосованиями
168 $body = $this->mysql->result($sql);
170 $body = explode("\n", $body);
171 $answer = $body[$vote-1];
172 if ($answer=="") return FALSE;
authentication.php (https://bitbucket.org/murtuza88/carolina-home-stone.git) PHP · 237 lines
1 <?php
2 /**
3 * Base include file for SimpleTest
4 * @package SimpleTest
5 * @subpackage WebTester
6 * @version $Id: authentication.php 2011 2011-04-29 08:22:48Z pp11 $
7 */
8 /**
9 * include http class
10 */
11 require_once(dirname(__FILE__) . '/http.php');
13 /**
54 */
55 protected function getCommonPath($first, $second) {
56 $first = explode('/', $first);
57 $second = explode('/', $second);
class.db.php (https://github.com/pixelephant/mak-web.git) PHP · 370 lines
TbButton.php (https://bitbucket.org/sonnylazuardi/savary.git) PHP · 272 lines
1 <?php
2 /**
3 * TbButton class file.
4 * @author Christoffer Niska <ChristofferNiska@gmail.com>
5 * @copyright Copyright © Christoffer Niska 2011-
6 * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
7 * @package bootstrap.widgets
8 * @since 0.9.10
180 {
181 if (strpos($this->icon, 'icon') === false)
182 $this->icon = 'icon-'.implode(' icon-', explode(' ', $this->icon));
184 $this->label = '<i class="'.$this->icon.'"></i> '.$this->label;
Post.php (https://bitbucket.org/Dal-Papa/is-340-publish-base.git) PHP · 292 lines
1 <?php
3 /**
19 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
21 * @version $Id: Post.php 24593 2012-01-05 20:35:02Z matthew $
22 */
26 * @see Zend_Date
27 */
28 require_once 'Zend/Date.php';
30 /**
31 * @see Zend_Service_Delicious_SimplePost
32 */
33 require_once 'Zend/Service/Delicious/SimplePost.php';
Post.php (https://github.com/su2921iw/ma3.git) PHP · 292 lines
1 <?php
3 /**
19 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
21 * @version $Id: Post.php 16211 2009-06-21 19:23:55Z thomas $
22 */
26 * @see Zend_Date
27 */
28 require_once 'Zend/Date.php';
30 /**
31 * @see Zend_Service_Delicious_SimplePost
32 */
33 require_once 'Zend/Service/Delicious/SimplePost.php';
editorlib.php (https://github.com/mnoorenberghe/moodle.git) PHP · 264 lines
1 <?php
3 // This file is part of Moodle - http://moodle.org/
118 }
119 $active = array();
120 foreach(explode(',', $CFG->texteditors) as $e) {
121 if ($editor = get_texteditor($e)) {
122 $active[$e] = $editor;
140 global $CFG;
142 $libfile = "$CFG->libdir/editor/$editorname/lib.php";
143 if (!file_exists($libfile)) {
144 return false;
175 $CFG->texteditors = 'tinymce,textarea';
176 }
177 $active = explode(',', $CFG->texteditors);
179 foreach ($active as $editorname) {
Router.php (https://github.com/seloshow/Magento-Pruebas.git) PHP · 340 lines
1 <?php
3 class Fishpig_Wordpress_Helper_Router extends Fishpig_Wordpress_Helper_Abstract
39 public function getBlogUri()
40 {
41 $pathInfo = explode('/', strtolower(trim($this->getRequest()->getPathInfo(), '/')));
43 if (count($pathInfo) == 0) {
176 public function isPageUri($uri, $registerPage = false)
177 {
178 $uris = explode('/', $uri);
179 $pages = array();
180 $count = 0;
Post.php (https://github.com/durand54/sitellite.git) PHP · 292 lines
1 <?php
3 /**
19 * @copyright Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
21 * @version $Id: Post.php,v 1.1.1.1 2007/08/12 09:26:56 lux Exp $
22 */
26 * @see Zend_Date
27 */
28 require_once 'Zend/Date.php';
30 /**
31 * @see Zend_Service_Delicious_SimplePost
32 */
33 require_once 'Zend/Service/Delicious/SimplePost.php';
ActiveRow.php (https://bitbucket.org/iiic/iszp.git) PHP · 370 lines
Table.php (https://github.com/pear2/Text_Markdown.git) PHP · 222 lines
1 <?php
2 /**
3 *
27 * @package Markdown_Extra
28 *
29 * @author Michel Fortin <http://www.michelf.com/projects/php-markdown/>
30 *
31 * @author Paul M. Jones <pmjones@solarphp.com>
32 *
33 * @license http://opensource.org/licenses/bsd-license.php BSD
34 *
35 * @version $Id: Table.php 3153 2008-05-05 23:14:16Z pmjones $
199 // Split content by row.
200 $rows = explode("\n", trim($content, "\n"));
202 $text .= " <tbody>\n";
qbehaviour.php (https://github.com/markn86/moodle.git) PHP · 139 lines
1 <?php
2 // This file is part of Moodle - http://moodle.org/
3 //
42 }
43 if ($disabled = get_config('question', 'disabledbehaviours')) {
44 $disabled = explode(',', $disabled);
45 } else {
46 $disabled = array();
63 $oldvalue = get_config('question', 'disabledbehaviours');
64 if (!empty($oldvalue)) {
65 $plugins = array_flip(explode(',', $oldvalue));
66 }
67 // Only set visibility if it's different from the current value.
106 public function uninstall_cleanup() {
107 if ($disabledbehaviours = get_config('question', 'disabledbehaviours')) {
108 $disabledbehaviours = explode(',', $disabledbehaviours);
109 $disabledbehaviours = array_unique($disabledbehaviours);
110 } else {
CliReporter.php (https://github.com/h-kanjisan/swiftmailer.git) PHP · 203 lines
84 {
85 $this->_started = true;
86 echo $this->_name . PHP_EOL;
87 }
95 {
96 echo " \033[34m\033[1m\033[4mSkip\033[0m:";
97 $messageLines = explode(PHP_EOL, wordwrap($message, 74, PHP_EOL));
98 foreach ($messageLines as $line)
99 {
150 if (preg_match('/^\{image @ (.*?)\}$/D', $output, $matches))
151 {
152 echo " \033[33mSmoke Test\033[0m" . PHP_EOL;
153 echo ' Compare email sent with image @ ' . $matches[1] . PHP_EOL;
178 'Try running the tests separately for more detail.' . PHP_EOL;
179 echo '**********************' . PHP_EOL;
180 }
Post.php (https://github.com/gryzz/crystal_magento.git) PHP · 292 lines
1 <?php
3 /**
19 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
21 * @version $Id: Post.php 16211 2009-06-21 19:23:55Z thomas $
22 */
26 * @see Zend_Date
27 */
28 #require_once 'Zend/Date.php';
30 /**
31 * @see Zend_Service_Delicious_SimplePost
32 */
33 #require_once 'Zend/Service/Delicious/SimplePost.php';
Post.php (https://gitlab.com/grayhamster/open-social-media-monitoring) PHP · 292 lines
1 <?php
3 /**
19 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
21 * @version $Id: Post.php 24594 2012-01-05 21:27:01Z matthew $
22 */
26 * @see Zend_Date
27 */
28 require_once 'Zend/Date.php';
30 /**
31 * @see Zend_Service_Delicious_SimplePost
32 */
33 require_once 'Zend/Service/Delicious/SimplePost.php';
ExtensionDiscoveryTest.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 195 lines
1 <?php
3 namespace Drupal\Tests\Core\Extension;
161 }
163 $content_by_file['core/modules/system/system.module'] = '<?php';
164 $content_by_file['core/themes/engines/twig/twig.engine'] = '<?php';
166 foreach ($content_by_file as $file => $content) {
167 $pieces = explode('/', $file);
168 $this->addFileToFilesystemStructure($filesystem_structure, $pieces, $content);
169 }
Kernel.php (https://gitlab.com/dzakiafif/cokelatklasik) PHP · 286 lines
Importer.php (https://github.com/Basti-sama/Bengine.git) PHP · 292 lines
1 <?php
2 /**
3 * This class imports language files into the database.
7 * @copyright Copyright (c) 2009, Sebastian Noll
8 * @license Proprietary
9 * @version $Id: Importer.php 8 2010-10-17 20:55:04Z secretchampion $
10 */
139 }
141 // If import file is PHP we can require it
142 if(preg_match("/^.+\.php$/i", $file))
164 {
165 // First of all extract rows
166 $row = explode("\r\n", $text);
168 // Extract phrase group from phrase
Post.php (https://github.com/coder-int21h/noses.git) PHP · 292 lines
1 <?php
3 /**
19 * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
21 * @version $Id: Post.php 8064 2008-02-16 10:58:39Z thomas $
22 */
26 * @see Zend_Date
27 */
28 require_once 'Zend/Date.php';
30 /**
31 * @see Zend_Service_Delicious_SimplePost
32 */
33 require_once 'Zend/Service/Delicious/SimplePost.php';
Column.php (https://gitlab.com/devtoannh/cafe) PHP · 243 lines
1 <?php
2 /**
3 * Zend Framework
17 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id: Column.php 23775 2011-03-01 17:25:24Z ralph $
20 */
23 * @see Zend_Text_Table
24 */
25 require_once 'Zend/Text/Table.php';
27 /**
28 * @see Zend_Text_MultiByte
29 */
30 require_once 'Zend/Text/MultiByte.php';
32 /**
ComponentList.php (https://gitlab.com/gideonmarked/atls-express) PHP · 260 lines
message.php (https://github.com/dcompute/seaforium.git) PHP · 210 lines
Asset.php (https://github.com/daK76/pyrocms.git) PHP · 329 lines
1 <?php defined('BASEPATH') OR exit('No direct script access allowed');
3 /**
4 * Code Igniter
5 *
6 * An open source application development framework for PHP 4.3.2 or newer
7 *
8 * @package CodeIgniter
113 if (empty($attributes['alt']))
114 {
115 list($attributes['alt']) = explode('.', $asset_name);
116 }
326 // END Asset Class
328 /* End of file Asset.php */
329 /* Location: ./application/libraries/Asset.php */
settings.php (https://gitlab.com/Blueprint-Marketing/interoccupy.net) PHP · 185 lines
mailtrafficlib.php (https://bitbucket.org/Nemcio/kloxo-mr.git) PHP · 183 lines
1 <?php
3 class mailtraffic extends lxclass {
121 static function qmailLogConvertString($line)
122 {
123 list($month , $date, $from, $to, $domain, $minus1, $prot, $minu2, $status, $size) = explode(" ", $line);
124 return $size;
125 }
133 $line = trimSpaces($line);
134 $year = @ date('y');
135 list($month, $day, $time) = explode(" ", $line);
136 $month = get_num_for_month($month);
137 list($hour , $min , $sec ) = explode(':' , $time);
148 ///2006-03-10 07:00:01
149 list($date, $time, ) = explode(" ", $line);
150 list($year, $month, $day) = explode("-", $date);
reader.php (https://github.com/ganzalizz/proweb_cms.git) PHP · 315 lines
110 }
112 class phpMorphy_Mrd_Section_Flexias extends phpMorphy_Mrd_Section {
113 const COMMENT_STRING = 'q//q';
193 }
195 class phpMorphy_Mrd_Section_Prefixes extends phpMorphy_Mrd_Section {
196 protected function processLine($line) {
197 $line = $this->iconv($line);
209 }
211 class phpMorphy_Mrd_Section_Lemmas extends phpMorphy_Mrd_Section {
212 protected function processLine($line) {
213 //if(6 != count($tokens = array_map('trim', explode(' ', $line)))) {
menus.php (https://gitlab.com/Alzakath/icagenda) PHP · 286 lines
1 <?php
2 /**
3 *------------------------------------------------------------------------------
44 $query->select('m.title, m.published, m.id, m.params, m.language')
45 ->from('`#__menu` AS m')
46 ->where( "(m.link = 'index.php?option=com_icagenda&view=list') AND (m.published = 1)" );
48 if (JLanguageMultilang::isEnabled())
100 $query->select('m.title, m.published, m.id, m.params, m.language')
101 ->from('`#__menu` AS m')
102 ->where( "(m.link = 'index.php?option=com_icagenda&view=list') AND (m.published = 1)" );
104 if (JLanguageMultilang::isEnabled())
147 foreach ($iC_list_menus AS $iCm)
148 {
149 $value = explode('_', $iCm);
150 $iCmenu_id = $value['0'];
151 $iCmenu_mcatid = $value['1'];
optional.php (https://github.com/hachimae/mrmenu.git) PHP · 241 lines
1 <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
3 class Optional extends APP_Controller
18 $this->setModel( $this->option );
20 $this->master_template = 'admin/list.php';
22 $this->menu_id = $this->input->get('ref_id');
23 if( !is_numeric($this->menu_id) && !empty($this->menu_id) ){
24 list( $this->menu_id, $this->option_id ) = explode('/', $this->menu_id);
25 }
26 }
65 {
66 $this->setContent('title', 'Add Menu Option');
67 $this->master_template = 'admin/form.php';
69 /* parent::add( '/app/optional/update', array(
Birthday.php (https://gitlab.com/istiyakaminsanto/Atomic_project_IstiyakAmin_142691_B35) PHP · 283 lines
update_check.php (https://github.com/robertleeplummerjr/bluebox.git) PHP · 107 lines
1 <?PHP
2 /**
3 * Endpoint Manager Update Check File
14 $line = fgets($rfh);
15 if (strstr($line,"AMPDBUSER=")) {
16 $temp=explode("=",$line);
17 $temp[1]=trim($temp[1]);
18 $ampdata['user'] = $temp[1];
19 }elseif (strstr($line,"AMPDBPASS=")) {
20 $temp=explode("=",$line);
21 $temp[1]=trim($temp[1]);
22 $ampdata['pass'] = $temp[1];
Tools.php (https://github.com/Slaver/kohana-wordpress.git) PHP · 187 lines
1 <?php defined('SYSPATH') OR die('No direct access allowed.');
3 class Wordpress_Tools {
58 // Selected image
59 $image_url = explode('/', $post['thumb']['attach']['file']);
60 $file_path = $image_root.'/'.str_replace(end($image_url), '', $post['thumb']['attach']['file']);
61 $image_by_size = Arr::path($post, 'thumb.attach.sizes.'.$size.'.file');
Birthday.php (https://gitlab.com/Charlesbasis/AtomicProject_CharlesValerioHowlader_136344_B35) PHP · 273 lines
1 <?php
58 Message::message("Failed! Data Has Not Been Inserted! :(");
60 Utility::redirect('create.php');
62 } //end of store method
100 $STH = $this->DBH->prepare($sql);
101 $STH->execute($arrData);
102 Utility::redirect('index.php');
104 } //end of update()
109 $STH->execute();
111 Utility::redirect('index.php');
112 } // end of delete(), permanent delete
wpmu.php (https://bitbucket.org/antonyravel/cape-resorts.git) PHP · 117 lines
1 <?php
2 if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
17 // get the hidden option fields, taken from WP core
18 if ( $_POST['page_options'] )
19 $options = explode(',', stripslashes($_POST['page_options']));
20 if ($options) {
21 foreach ($options as $option) {
47 <div class="wrap">
48 <h2><?php _e('Network Options','nggallery'); ?></h2>
49 <form name="generaloptions" method="post">
50 <?php wp_nonce_field('ngg_wpmu_settings') ?>
52 <table class="form-table">
53 <tr valign="top">
54 <th align="left"><?php _e('Gallery path','nggallery') ?></th>
55 <td><input type="text" size="50" name="gallerypath" value="<?php echo $ngg_options['gallerypath']; ?>" /><br />
helpers.php (https://gitlab.com/jjpa2018/dashboard) PHP · 379 lines
component.php (https://github.com/ButuzGOL/inside_wildflowercms.git) PHP · 255 lines
1 <?php
2 /* SVN FILE: $Id$ */
3 /**
5 * PHP versions 4 and 5
6 *
7 * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
8 * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
9 *
13 * @filesource
14 * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
15 * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
16 * @package cake
17 * @subpackage cake.cake.libs.controller
18 * @since CakePHP(tm) v TBD
19 * @version $Revision$
20 * @modifiedby $LastChangedBy$
NewReportForm.class.php (https://github.com/hoydaa/googlevolume.com.git) PHP · 205 lines
1 <?php
3 class NewReportForm extends ObjectForm
70 public function checkQueries($validator, $values)
71 {
72 $query_texts = explode("\n", str_replace("\r", "", $values['query_texts']));
73 $query_titles = explode("\n", str_replace("\r", "", $values['query_titles']));
152 }
154 $tag_names = explode(',', $this->getValue('tags'));
156 foreach ($tag_names as $tag_name)
167 }
169 $query_texts = explode("\n", str_replace("\r", "", $this->getValue('query_texts')));
170 $query_titles = explode("\n", str_replace("\r", "", $this->getValue('query_titles')));
SelectTest.php (https://github.com/cgmartin/zf2.git) PHP · 210 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
10 namespace ZendTest\Form\Element;
12 use PHPUnit_Framework_TestCase as TestCase;
13 use Zend\Form\Element\Select as SelectElement;
90 $expectedClasses = array(
91 'Zend\Validator\Explode'
92 );
93 foreach ($inputSpec['validators'] as $validator) {
95 $this->assertTrue(in_array($class, $expectedClasses), $class);
96 switch ($class) {
97 case 'Zend\Validator\Explode':
98 $this->assertInstanceOf('Zend\Validator\InArray', $validator->getValidator());
99 break;
Column.php (https://github.com/praveensingh85/MyEventDashboard1.git) PHP · 243 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: Column.php 20096 2010-01-06 02:05:09Z bkarwin $
20 */
23 * @see Zend_Text_Table
24 */
25 require_once 'Zend/Text/Table.php';
27 /**
28 * @see Zend_Text_MultiByte
29 */
30 require_once 'Zend/Text/MultiByte.php';
32 /**
BrokenLinksReport.php (https://github.com/markjames/silverstripe-cms.git) PHP · 125 lines
PreviewModel.php (https://github.com/joomla/joomla-cms.git) PHP · 146 lines
Quest_eval.php (https://gitlab.com/klausmig/CloudSemanticWeb) PHP · 237 lines
Innovative.php (https://github.com/dswalker/xerxes.git) PHP · 211 lines
1 <?php
3 /*
64 if ( $configPatronTypes != null )
65 {
66 $arrTypes = explode(",", $configPatronTypes);
68 // make them all integers for consitency
194 // on the equal sign into an associative array
196 $arrRawData = explode("\n", $strResponse);
198 foreach ($arrRawData as $strLine)
199 {
200 $arrLine = explode("=", $strLine);
202 // strip out the code, leaving just the attribute name
ControllerResolver.php (https://github.com/proclamo/txinbometro.git) PHP · 143 lines
1 <?php
3 /*
48 * @param Request $request A Request instance
49 *
50 * @return mixed|Boolean A PHP callable representing the Controller,
51 * or false if this resolver is not able to determine the controller
52 *
82 *
83 * @param Request $request A Request instance
84 * @param mixed $controller A PHP callable
85 *
86 * @throws \RuntimeException When value for argument given is not provided
125 * @param string $controller A Controller string
126 *
127 * @return mixed A PHP callable
128 */
129 protected function createController($controller)
Get.php (https://github.com/ksecor/civicrm.git) PHP · 226 lines
1 <?php
3 /*
189 foreach ( $fieldGrp as $tableName => $fields ) {
190 if ( $groupBys = CRM_Utils_Array::value( "gby", $_GET) ) {
191 $groupBys = explode( ' ' , $groupBys );
192 if ( !empty($groupBys) ) {
193 if ( !$flag ) {
210 if ( is_array($reportFields) ) {
211 if ( $urlfileds = CRM_Utils_Array::value( "fld", $_GET) ) {
212 $urlfileds = explode( ',' , $urlfileds );
213 }
214 if ( !empty( $urlfileds ) ){
filter.class.inc.php (https://github.com/modxcms-jp/evolution-jp.git) PHP · 140 lines
init_auth.php (https://github.com/wilminator/authenticate.git) PHP · 129 lines
VendorPublishCommand.php (https://gitlab.com/jjpa2018/dashboard) PHP · 288 lines
QueryFactory.php (https://gitlab.com/geeta7/drupal) PHP · 263 lines
1 <?php
3 /**
161 throw new InvalidLookupKeyException(strtr('%entity_type lookup key %key ends with a wildcard this can not be used as a lookup', ['%entity_type' => $entity_type->id(), '%key' => $key]));
162 }
163 $parts = explode('.*', $key);
164 // Remove leading dots.
165 array_walk($parts, function (&$value) {
stylizer_ui.class.php (https://github.com/sirkitree/pipe.git) PHP · 271 lines
1 <?php
2 // $Id$
92 if ($form_state['values']['type'] != 'all') {
93 list($module, $type) = explode('-', $form_state['values']['type']);
94 if ($module != $this->style_plugin['module'] || $type != $this->style_plugin['type']) {
95 return TRUE;
268 function edit_form_type_submit(&$form, &$form_state) {
269 list($form_state['item']->style_module, $form_state['item']->style_type) = explode('-', $form_state['values']['type']);
270 }
271 }
Post.php (https://github.com/albertobraschi/NFS.git) PHP · 292 lines
1 <?php
3 /**
19 * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
21 * @version $Id: Post.php 8064 2008-02-16 10:58:39Z thomas $
22 */
26 * @see Zend_Date
27 */
28 #require_once 'Zend/Date.php';
30 /**
31 * @see Zend_Service_Delicious_SimplePost
32 */
33 #require_once 'Zend/Service/Delicious/SimplePost.php';
upload.php (https://github.com/yama/zencart-sugu.git) PHP · 215 lines
1 <?php
2 /**
3 * upload Class.
7 * @copyright Portions Copyright 2003 osCommerce
8 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
9 * @version $Id: upload.php 3041 2006-02-15 21:56:45Z wilt $
10 */
11 if (!defined('IS_ADMIN_FLAG')) {
28 if (!zen_not_null($extensions)) {
29 if (!defined(UPLOAD_FILENAME_EXTENSIONS)) define ('UPLOAD_FILENAME_EXTENSIONS','jpg,jpeg,gif,png,eps,cdr,ai,pdf,tif,tiff,bmp,zip');
30 $extensions=explode(" ",preg_replace('/[.,;\s]+/',' ',UPLOAD_FILENAME_EXTENSIONS));
31 }
32 $this->set_extensions($extensions);
Git.php (https://github.com/ewandor/horde.git) PHP · 183 lines
1 <?php
2 /**
3 * Horde_Pear_Package_Contents_Ignore_Git:: indicates which files in a content
4 * listing should be ignored based on the contents from a .gitignore file.
5 *
6 * PHP version 5
7 *
8 * @category Horde
10 * @author Gunnar Wrobel <wrobel@pardus.de>
11 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
12 * @link http://pear.horde.org/index.php?package=Pear
13 */
26 * @author Gunnar Wrobel <wrobel@pardus.de>
27 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
28 * @link http://pear.horde.org/index.php?package=Pear
29 */
30 class Horde_Pear_Package_Contents_Ignore_Git
Invoice.php (https://bitbucket.org/acidel/buykoala.git) PHP · 141 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_Downloadable
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 */
102 if ($option['value']) {
103 $_printValue = isset($option['print_value']) ? $option['print_value'] : strip_tags($option['value']);
104 $values = explode(', ', $_printValue);
105 foreach ($values as $value) {
106 $lines[][] = array(
functions_task.php (https://github.com/canercandan/agat-engine.git) PHP · 371 lines
1 <?php
2 /**
3 * MyBB 1.4
7 * License: http://www.mybboard.net/about/license
8 *
9 * $Id: functions_task.php 4344 2009-04-12 18:58:39Z Tikitiki $
10 */
55 // The task file does not exist
56 if(!file_exists(MYBB_ROOT."inc/tasks/{$task['file']}.php"))
57 {
58 if($task['logging'] == 1)
70 $db->update_query("tasks", array("nextrun" => $nextrun), "tid='{$task['tid']}'");
72 include_once MYBB_ROOT."inc/tasks/{$task['file']}.php";
73 $function = "task_{$task['file']}";
74 if(function_exists($function))
JsonStream.php (https://github.com/edmondscommerce/XAMPP-Magento-Demo-Site.git) PHP · 234 lines
Announce.php (https://bitbucket.org/olivopablo/iphoto.git) PHP · 120 lines
PhpTest.php (https://github.com/greut/framework.git) PHP · 290 lines
19 $this->_destroySession();
21 $this->Php = new Php();
22 $this->_destroySession();
52 public function testEnabled() {
53 $php = $this->Php;
54 $this->_destroySession(session_name());
55 $this->assertFalse($php::enabled());
117 $this->_destroySession(session_name());
119 $Php = new Php(array('init' => false));
120 $result = $Php->isStarted();
121 $this->assertFalse($result);
123 $Php = new Php();
124 $Php->read();
voip_cdr.inc.php (https://github.com/axxtel/agilebill.git) PHP · 174 lines
1 <?php
3 /**
52 {
53 $type = "add";
54 $this->method["$type"] = explode(",", $this->method["$type"]);
55 $db = new CORE_database;
56 $db->add($VAR, $this, $type);
63 {
64 $type = "view";
65 $this->method["$type"] = explode(",", $this->method["$type"]);
66 $db = new CORE_database;
67 $db->view($VAR, $this, $type);
74 {
75 $type = "update";
76 $this->method["$type"] = explode(",", $this->method["$type"]);
77 $db = new CORE_database;
78 $db->update($VAR, $this, $type);
service.gimages.php (https://github.com/DatumDroid/DatumDroid-API.git) PHP · 177 lines
1 <?php
3 /**
4 * Wrapper class around the Google Image API for PHP
5 *
6 * http://code.google.com/apis/imagesearch/v1/jsondevguide.html
7 * http://w-shadow.com/blog/2008/02/28/get-google-image-search-results-with-php/
8 *
9 * @package DatumDroid_API
126 foreach ( $m[1] as $item ) {
127 // Explode on each paramter (comma delimeter)
128 $item = urldecode( str_replace( '\x', '%', $item ) );
129 preg_match_all( '/\"(.*?)\"/', $item, $params );
code.php (https://github.com/fyhuang/paperless.git) PHP · 214 lines
1 <?php
2 require_once("models/AssignmentFile.php");
3 require_once("models/AssignmentComment.php");
4 require_once("models/Model.php");
5 require_once("permissions.php");
6 require_once("utils.php");
30 $assignment_files = array();
32 $string = explode("_", $student); // if it was student_1 just take student
33 $student_suid = $string[0];
34 $submission_number = $string[1];
86 $this->smarty->assign("code_file", $student);
88 $suid = explode("_", $student); // if it was student_1 just take student
89 $suid = $suid[0];
freedoms.php (https://github.com/livinglab/openlab.git) PHP · 111 lines
37 <nav class="about__header-navigation nav-tab-wrapper wp-clearfix" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>">
38 <a href="about.php" class="nav-tab"><?php _e( 'What’s New' ); ?></a>
39 <a href="credits.php" class="nav-tab"><?php _e( 'Credits' ); ?></a>
40 <a href="freedoms.php" class="nav-tab nav-tab-active" aria-current="page"><?php _e( 'Freedoms' ); ?></a>
41 <a href="privacy.php" class="nav-tab"><?php _e( 'Privacy' ); ?></a>
42 </nav>
43 </div>
59 <img class="freedom-image" src="<?php echo esc_url( admin_url( 'images/freedom-1.svg' ) ); ?>" alt="" />
60 <h2 class="is-smaller-heading"><?php _e( 'The 1st Freedom' ); ?></h2>
61 <p><?php _e( 'To run the program for any purpose.' ); ?></p>
65 <h2 class="is-smaller-heading"><?php _e( 'The 2nd Freedom' ); ?></h2>
66 <p><?php _e( 'To study how the program works and change it to make it do what you wish.' ); ?></p>
67 </div>
68 <div class="column aligncenter">
110 </div>
111 <?php require_once ABSPATH . 'wp-admin/admin-footer.php'; ?>
Column.php (https://github.com/basdog22/Qool.git) PHP · 243 lines
1 <?php
2 /**
3 * Zend Framework
17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id: Column.php 24594 2012-01-05 21:27:01Z matthew $
20 */
23 * @see Zend_Text_Table
24 */
25 require_once 'Zend/Text/Table.php';
27 /**
28 * @see Zend_Text_MultiByte
29 */
30 require_once 'Zend/Text/MultiByte.php';
32 /**
Data.php (https://github.com/gryzz/crystal_magento.git) PHP · 152 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_Shipping
23 * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
45 public function decodeTrackingHash($hash)
46 {
47 $hash = explode(':', Mage::helper('core')->urlDecode($hash));
48 if (count($hash) === 3 && in_array($hash[0], $this->_allowedHashKeys)) {
49 return array('key' => $hash[0], 'id' => (int)$hash[1], 'hash' => $hash[2]);
vnstat.php (https://gitlab.com/billyprice1/QuickBox) PHP · 136 lines
1 <?php
3 // Valid values for other parameters you can pass to the script.
6 // the first parameter in the list.
8 if (isset($_SERVER['PHP_SELF'])) {
9 $script = $_SERVER['PHP_SELF'];
60 $buffer .= fgets($fd);
61 }
62 $vnstat_data = explode("\n", $buffer);
63 pclose($fd);
64 }
77 //
78 foreach($vnstat_data as $line) {
79 $d = explode(';', trim($line));
80 if ($d[0] == 'd') {
81 $day[$d[1]]['time'] = $d[2];
smarty_internal_compile_extends.php (https://gitlab.com/garabedian.kevin/web2TB) PHP · 134 lines
1 <?php
3 /**
67 if (strlen($file) > 8 && substr($file, 0, 8) == 'extends:') {
68 // generate code for each template
69 $files = array_reverse(explode('|', substr($file, 8)));
70 $i = 0;
71 foreach ($files as $file) {
100 {
101 $compiler->parser->template_postfix[] = new Smarty_Internal_ParseTree_Tag($compiler->parser,
102 "<?php \$_smarty_tpl->inheritance->endChild();\n?>\n");
103 }
scorm_12lib.php (https://bitbucket.org/kudutest1/moodlegit.git) PHP · 122 lines
1 <?php
2 // This file is part of Moodle - http://moodle.org/
3 //
54 $prerequisites = preg_replace('/\|/', '||', $prerequisites);
55 // now - grab all the tokens
56 $elements = explode('\t', trim($prerequisites));
58 // process each token to build an expression to be evaluated
70 if (preg_match('/^(\d+)\*\{(.+)\}$/', $element, $matches)) {
71 $repeat = $matches[1];
72 $set = explode(',', $matches[2]);
73 $count = 0;
74 foreach ($set as $setelement) {
Expression.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 158 lines
1 <?php
2 /*
3 * $Id: Expression.php 48519 2012-02-03 23:18:52Z btowles $
28 * @package Doctrine
29 * @subpackage Expression
30 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
31 * @link www.doctrine-project.org
32 * @since 1.0
111 // parse args
112 foreach ($this->_tokenizer->bracketExplode($argStr, ',') as $arg) {
113 $args[] = $this->parseClause($arg);
114 }
126 public function parseClause($clause)
127 {
128 $e = $this->_tokenizer->bracketExplode($clause, ' ');
130 foreach ($e as $k => $expr) {
Export.php (https://github.com/jonphipps/Metadata-Registry.git) PHP · 210 lines
router.php (https://github.com/gpongelli/joomla-cms.git) PHP · 198 lines
UriTemplate.php (https://gitlab.com/x33n/respond) PHP · 254 lines
1 <?php
3 namespace Guzzle\Parser\UriTemplate;
76 }
78 $values = explode(',', $expression);
79 foreach ($values as &$value) {
80 $value = trim($value);
186 $expanded = implode($joiner, $kvp);
187 if ($isAssoc) {
188 // Don't prepend the value name when using the explode modifier with an associative array
189 $actuallyUseQueryString = false;
190 }
191 } else {
192 if ($isAssoc) {
193 // When an associative array is encountered and the explode modifier is not set, then the
194 // result must be a comma separated list of keys followed by their respective values.
195 foreach ($kvp as $k => &$v) {
AntsTest.php (https://github.com/jnwhiteh/aichallenge.git) PHP · 211 lines
1 <?php
2 require_once 'PHPUnit/Framework.php';
4 require_once '../Ants.php';
6 class AntsTest extends PHPUnit_Framework_TestCase
7 {
8 private $ants;
97 public function testPassable()
98 {
99 $data = explode("\n", "rows 10\ncols 15\n");
100 $this->ants->setup($data);
116 public function testUnoccupied()
117 {
118 $data = explode("\n", "rows 10\ncols 15\n");
119 $this->ants->setup($data);
TemperatureTest.php (https://bitbucket.org/Dal-Papa/is-340-publish-base.git) PHP · 447 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: TemperatureTest.php 24593 2012-01-05 20:35:02Z matthew $
21 */
23 if (!defined('PHPUnit_MAIN_METHOD')) {
24 define('PHPUnit_MAIN_METHOD', 'Zend_Measure_TemperatureTest::main');
28 * Zend_Measure_Temperature
29 */
30 require_once 'Zend/Measure/Temperature.php';
32 /**
ProfilePicture.php (https://gitlab.com/dhimanbarua/Atomic_Project_SEIP141617_B36) PHP · 171 lines
1 <?php
2 namespace App\ProfilePicture;
3 use App\Model\Database as DB;
50 <br>Data Has Not been Inserted Successfully!!!!!!</h3></div> ");
51 }
52 Utility::redirect('create.php');
53 }
83 $STH->execute($arrData);
85 Utility::redirect('index.php');
87 }// end of update()
94 $STH->execute();
95 Utility::redirect('index.php');
96 }// end of delete
QueryController.php (https://gitlab.com/php2laravel/php-project-boost) PHP · 175 lines
1 <?php
3 namespace App\Http\Controllers;
42 ->where('colors', 'LIKE' , '%' . $query . '%')
43 ->value('colors');
44 $palette = explode(", ", $palette);
46 $colors = DB::table('projects')
82 ->where('colors', 'LIKE' , '%' . $query . '%')
83 ->value('colors');
84 $palette = explode(", ", $palette);
86 $query = "#".Request::input('search');
Expression.php (https://github.com/yuya-takeyama/symfony-hackathon-20110924.git) PHP · 158 lines
1 <?php
2 /*
3 * $Id: Expression.php 7490 2010-03-29 19:53:27Z jwage $
28 * @package Doctrine
29 * @subpackage Expression
30 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
31 * @link www.doctrine-project.org
32 * @since 1.0
111 // parse args
112 foreach ($this->_tokenizer->bracketExplode($argStr, ',') as $arg) {
113 $args[] = $this->parseClause($arg);
114 }
126 public function parseClause($clause)
127 {
128 $e = $this->_tokenizer->bracketExplode($clause, ' ');
130 foreach ($e as $k => $expr) {
examples_utils.inc.php (https://github.com/limb-php-framework/limb-example-macro.git) PHP · 189 lines
1 <?php
2 /**
3 * require framework
8 * path
9 */
10 $tmp_arr = explode('/', $_SERVER['PHP_SELF']);
11 $examples_root_file = array_pop($tmp_arr);
12 $examples_root_dir = implode('/', $tmp_arr);
179 $newData['examples'][] = array('description' => $row['description'],
180 'exec' => "./run.php?file=$root{$row['php']}",
181 'compiled' => "./compiled.php?file=$root{$row['template']}",
182 'php_file' => array('path' => "./showsource.php?file=$root{$row['php']}",
183 'file' => $row['php']),
index.mod.php (https://github.com/Xirt/XirtCMS.git) PHP · 193 lines
RedisTaggedCache.php (https://gitlab.com/madwanz64/laravel) PHP · 198 lines
1 <?php
3 namespace Illuminate\Cache;
128 $fullKey = $this->store->getPrefix().sha1($namespace).':'.$key;
130 foreach (explode('|', $namespace) as $segment) {
131 $this->store->connection()->sadd($this->referenceKey($segment, $reference), $fullKey);
132 }
161 protected function deleteKeysByReference($reference)
162 {
163 foreach (explode('|', $this->tags->getNamespace()) as $segment) {
164 $this->deleteValues($segment = $this->referenceKey($segment, $reference));
Expression.php (https://github.com/cawago/ci_campusync_auth.git) PHP · 158 lines
1 <?php
2 /*
3 * $Id: Expression.php 5798 2009-06-02 15:10:46Z piccoloprincipe $
17 * This software consists of voluntary contributions made by many individuals
18 * and is licensed under the LGPL. For more information, see
19 * <http://www.phpdoctrine.org>.
20 */
28 * @package Doctrine
29 * @subpackage Expression
30 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
31 * @link www.phpdoctrine.org
111 // parse args
112 foreach ($this->_tokenizer->bracketExplode($argStr, ',') as $arg) {
113 $args[] = $this->parseClause($arg);
114 }
model.php (https://github.com/easysoft/zentaopms.git) PHP · 257 lines
1 <?php
2 /**
3 * The model file of admin module of ZenTaoPMS.
7 * @author Chunsheng Wang <chunsheng@cnezsoft.com>
8 * @package admin
9 * @version $Id: model.php 5148 2013-07-16 01:31:08Z chencongzhi520@gmail.com $
10 * @link http://www.zentao.net
11 */
12 ?>
13 <?php
14 class adminModel extends model
15 {
242 }
244 foreach(explode(',', $this->config->safe->weak) as $weak)
245 {
246 $weak = md5(trim($weak));
TwitterAlikeExample.html
(http://redis.googlecode.com/svn/trunk/)
HTML · 253 lines
✨ Summary
This HTML code outputs a blog post about Redis, a popular in-memory data store. The content explains how to implement a Twitter-like clone using Redis, including setting up followers and posting messages. It also discusses horizontal scaling of the system, including hashing keys, distributing user data across servers, and handling special cases like incrementing IDs and retrieving timeline data.
This HTML code outputs a blog post about Redis, a popular in-memory data store. The content explains how to implement a Twitter-like clone using Redis, including setting up followers and posting messages. It also discusses horizontal scaling of the system, including hashing keys, distributing user data across servers, and handling special cases like incrementing IDs and retrieving timeline data.
17 <div class="index">
18 <!-- This is a (PRE) block. Make sure it's left aligned or your toc title will be off. -->
19 <b>TwitterAlikeExample: Contents</b><br> <a href="#A case study: Design and implementation of a simple Twitter clone using only the Redis key-value store as database and PHP">A case study: Design and implementation of a simple Twitter clone using only the Redis key-value store as database and PHP</a><br> <a href="#Key-value stores basics">Key-value stores basics</a><br> <a href="#Atomic operations">Atomic operations</a><br> <a href="#Beyond key-value stores">Beyond key-value stores</a><br> <a href="#The set data type">The set data type</a><br> <a href="#Prerequisites">Prerequisites</a><br> <a href="#Data layout">Data layout</a><br> <a href="#Following, followers and updates">Following, followers and updates</a><br> <a href="#Authentication">Authentication</a><br> <a href="#Updates">Updates</a><br> <a href="#Paginating updates">Paginating updates</a><br> <a href="#Following users">Following users</a><br> <a href="#Making it horizontally scalable">Making it horizontally scalable</a><br> <a href="#Hashing the key">Hashing the key</a><br> <a href="#Special keys">Special keys</a>
20 </div>
28 <div class="narrow">
29 <h1><a name="A case study: Design and implementation of a simple Twitter clone using only the Redis key-value store as database and PHP">A case study: Design and implementation of a simple Twitter clone using only the Redis key-value store as database and PHP</a></h1>In this article I'll explain the design and the implementation of a <a href="http://retwis.antirez.com" target="_blank">simple clone of Twitter</a> written using PHP and <a href="http://code.google.com/p/redis/" target="_blank">Redis</a> as only database. The programming community uses to look at key-value stores like special databases that can't be used as drop in replacement for a relational database for the development of web applications. This article will try to prove the contrary.<br/><br/>Our Twitter clone, <a href="http://retwis.antirez.com" target="_blank">called Retwis</a>, is structurally simple, has very good performances, and can be distributed among N web servers and M Redis servers with very little efforts. You can find the source code <a href="http://code.google.com/p/redis/downloads/list" target="_blank">here</a>.<br/><br/>We use PHP for the example since it can be read by everybody. The same (or... much better) results can be obtained using Ruby, Python, Erlang, and so on.
30 <h1><a name="Key-value stores basics">Key-value stores basics</a></h1>
31 The essence of a key-value store is the ability to store some data, called <i>value</i>, inside a key. This data can later be retrieved only if we know the exact key used to store it. There is no way to search something by value. So for example I can use the command SET to store the value <b>bar</b> at key <b>foo</b>:<br/><br/><pre class="codeblock python" name="code">
79 </pre>Ok I think we are ready to start coding!
80 <h2><a name="Prerequisites">Prerequisites</a></h2>
81 If you didn't download it already please <a href="http://code.google.com/p/redis/wiki/README" target="_blank">grab the source code of Retwis</a>. It's a simple tar.gz file with a few of .php files inside. The implementation is very simple. You will find the PHP library client inside (redis.php) that is used to talk with the Redis server from PHP. This library was written by <a href="http://qix.it" target="_blank">Ludovico Magnocavallo</a> and you are free to reuse this in your own projects, but for updated version of the library please download the Redis distribution.<br/><br/>Another thing you probably want is a working Redis server. Just get the source, compile with make, and run with ./redis-server and you are done. No configuration is required at all in order to play with it or to run Retwis in your computer.
82 <h2><a name="Data layout">Data layout</a></h2>
83 Working with a relational database this is the stage were the database layout should be produced in form of tables, indexes, and so on. We don't have tables, so what should be designed? We need to identify what keys are needed to represent our objects and what kind of values this keys need to hold.<br/><br/>Let's start from Users. We need to represent this users of course, with the username, userid, password, followers and following users, and so on. The first question is, what should identify an user inside our system? The username can be a good idea since it is unique, but it is also too big, and we want to stay low on memory. So like if our DB was a relational one we can associate an unique ID to every user. Every other reference to this user will be done by id. That's very simple to do, because we have our atomic INCR operation! When we create a new user we can do something like this, assuming the user is callled "antirez":<br/><br/><pre class="codeblock python python python python python python python python python python python python" name="code">