PageRenderTime 343ms queryTime 51ms sortTime 11ms getByIdsTime 122ms findMatchingLines 97ms

100+ results results for 'php array_search repo:calderhayes/aclcontrolprototype' (343 ms)

Not the results you expected?
Group.php https://github.com/quarkness/piwik.git | PHP | 328 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * PHP version 5
                    
6 *
                    
8 *
                    
9 * Copyright (c) 2006-2010, Alexey Borzov <avb@php.net>,
                    
10 *                          Bertrand Mansion <golgote@mamasam.com>
                    
38 * @package    HTML_QuickForm2
                    
39 * @author     Alexey Borzov <avb@php.net>
                    
40 * @author     Bertrand Mansion <golgote@mamasam.com>
                    
40 * @author     Bertrand Mansion <golgote@mamasam.com>
                    
41 * @license    http://opensource.org/licenses/bsd-license.php New BSD License
                    
42 * @version    SVN: $Id: Group.php 294057 2010-01-26 21:10:28Z avb $
                    
42 * @version    SVN: $Id: Group.php 294057 2010-01-26 21:10:28Z avb $
                    
43 * @link       http://pear.php.net/package/HTML_QuickForm2
                    
44 */
                    
                
Form_Input.php https://bitbucket.org/JakePratt/kupcakz.com.git | PHP | 555 lines
                    
1<?php defined("SYSPATH") or die("No direct script access.");
                    
2/**
                    
4 *
                    
5 * $Id: Form_Input.php 3326 2008-08-09 21:24:30Z Shadowhand $
                    
6 *
                    
9 * @copyright  (c) 2007-2008 Kohana Team
                    
10 * @license    http://kohanaphp.com/license.html
                    
11 */
                    
226			{
                    
227				if (($key = array_search($rule, $this->rules)) !== FALSE)
                    
228				{
                    
                
BaseObject.php https://github.com/homer6/Propel.git | PHP | 396 lines
                    
1<?php
                    
2
                    
209			if ($col !== null) {
                    
210				while (($offset = array_search($col, $this->modifiedColumns)) !== false) {
                    
211					array_splice($this->modifiedColumns, $offset, 1);
                    
335		}
                    
336		return $this->fromArray($parser->toArray($data), BasePeer::TYPE_PHPNAME);
                    
337	}
                    
355		}
                    
356		return $parser->fromArray($this->toArray(BasePeer::TYPE_PHPNAME, true, array(), true));
                    
357	}
                    
381			}
                    
382			// no lcfirst in php<5.3...
                    
383			$virtualColumn[0] = strtolower($virtualColumn[0]);
                    
                
Resource.php https://bitbucket.org/alessandro-aglietti/itis-leonardo-da-vinci.git | PHP | 304 lines
                    
1<?php
                    
2
                    
203        if (count($this->request->accept) == 0) return 0;
                    
204        $pos = array_search($mimetype, $this->request->accept);
                    
205        if ($pos === FALSE) {
                    
226    {
                    
227        $pos = array_search($language, $this->request->acceptLanguage);
                    
228        if ($pos === FALSE)
                    
                
Boolean.php https://bitbucket.org/maatao/estrutura-b-sica-doctrine.git | PHP | 375 lines
                    
18 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version    $Id: Boolean.php 23775 2011-03-01 17:25:24Z ralph $
                    
20 */
                    
24 */
                    
25require_once 'Zend/Filter/Interface.php';
                    
26
                    
41    const NULL         = 64;
                    
42    const PHP          = 127;
                    
43    const FALSE_STRING = 128;
                    
54        self::NULL         => 'null',
                    
55        self::PHP          => 'php',
                    
56        self::FALSE_STRING => 'false',
                    
146                } elseif (in_array($value, $this->_constants)) {
                    
147                    $detected += array_search($value, $this->_constants);
                    
148                }
                    
                
Boolean.php https://bitbucket.org/jokusafet/magento2.git | PHP | 375 lines
                    
18 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version    $Id: Boolean.php 22662 2010-07-24 17:37:36Z mabe $
                    
20 */
                    
24 */
                    
25#require_once 'Zend/Filter/Interface.php';
                    
26
                    
41    const NULL         = 64;
                    
42    const PHP          = 127;
                    
43    const FALSE_STRING = 128;
                    
54        self::NULL         => 'null',
                    
55        self::PHP          => 'php',
                    
56        self::FALSE_STRING => 'false',
                    
146                } elseif (in_array($value, $this->_constants)) {
                    
147                    $detected += array_search($value, $this->_constants);
                    
148                }
                    
                
Boolean.php https://bitbucket.org/bigstylee/zend-framework.git | PHP | 375 lines
                    
18 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version    $Id: Boolean.php 24593 2012-01-05 20:35:02Z matthew $
                    
20 */
                    
24 */
                    
25require_once 'Zend/Filter/Interface.php';
                    
26
                    
41    const NULL         = 64;
                    
42    const PHP          = 127;
                    
43    const FALSE_STRING = 128;
                    
54        self::NULL         => 'null',
                    
55        self::PHP          => 'php',
                    
56        self::FALSE_STRING => 'false',
                    
146                } elseif (in_array($value, $this->_constants)) {
                    
147                    $detected += array_search($value, $this->_constants);
                    
148                }
                    
                
sfPropelFormFilterGenerator.class.php https://github.com/zdanozdan/sfPropelORMPlugin.git | PHP | 321 lines
                    
18 * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
                    
19 * @version    SVN: $Id: sfPropelFormFilterGenerator.class.php 24392 2009-11-25 18:35:39Z FabianLange $
                    
20 */
                    
65    // create the project base class for all forms
                    
66    $file = sfConfig::get('sf_lib_dir').'/filter/BaseFormFilterPropel.class.php';
                    
67    if (!file_exists($file))
                    
73
                    
74      file_put_contents($file, $this->evalTemplate('sfPropelFormFilterBaseTemplate.php'));
                    
75    }
                    
90      array_pop($packages);
                    
91      if (false === $pos = array_search($this->params['model_dir_name'], $packages))
                    
92      {
                    
102
                    
103      file_put_contents($baseDir.'/base/Base'.$table->getClassname().'FormFilter.class.php', $this->evalTemplate('sfPropelFormFilterGeneratedTemplate.php'));
                    
104      if (!file_exists($classFile = $baseDir.'/'.$table->getClassname().'FormFilter.class.php'))
                    
                
Boolean.php https://github.com/oveach/tuto-zf-doctrine2.git | PHP | 375 lines
                    
18 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version    $Id: Boolean.php 24594 2012-01-05 21:27:01Z matthew $
                    
20 */
                    
24 */
                    
25require_once 'Zend/Filter/Interface.php';
                    
26
                    
41    const NULL         = 64;
                    
42    const PHP          = 127;
                    
43    const FALSE_STRING = 128;
                    
54        self::NULL         => 'null',
                    
55        self::PHP          => 'php',
                    
56        self::FALSE_STRING => 'false',
                    
146                } elseif (in_array($value, $this->_constants)) {
                    
147                    $detected += array_search($value, $this->_constants);
                    
148                }
                    
                
Boolean.php https://bitbucket.org/hmancvs/farmis.git | PHP | 375 lines
                    
18 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version    $Id: Boolean.php,v 1.1 2011/11/03 08:29:20 smusoke Exp $
                    
20 */
                    
24 */
                    
25require_once 'Zend/Filter/Interface.php';
                    
26
                    
41    const NULL         = 64;
                    
42    const PHP          = 127;
                    
43    const FALSE_STRING = 128;
                    
54        self::NULL         => 'null',
                    
55        self::PHP          => 'php',
                    
56        self::FALSE_STRING => 'false',
                    
146                } elseif (in_array($value, $this->_constants)) {
                    
147                    $detected += array_search($value, $this->_constants);
                    
148                }
                    
                
default.php https://github.com/iikozen/minima.git | PHP | 185 lines
                    
25?>
                    
26<form action="<?php echo JRoute::_('index.php?option=com_categories&view=categories');?>" method="post" name="adminForm">
                    
27
                    
30            <label class="filter-search-lbl" for="filter_search"><?php echo JText::_('JSEARCH_FILTER_LABEL'); ?></label>
                    
31            <input type="text" name="filter_search" id="filter_search" value="<?php echo $this->state->get('filter.search'); ?>" title="<?php echo JText::_('COM_CATEGORIES_ITEMS_SEARCH_FILTER'); ?>" />
                    
32            <button type="submit"><?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?></button>
                    
53    </fieldset>
                    
54    <?php if( $this->pagination->total > 0 ): ?><div id="pagination-top"><?php echo $this->pagination->getListFooter(); ?></div><?php endif; ?>
                    
55    <div class="clr"> </div>
                    
135                        <?php endif; ?>
                    
136                        <a class="table-title" href="<?php echo JRoute::_('index.php?option=com_categories&task=category.edit&cid[]='.$item->id.'&extension='.$extension);?>">
                    
137                            <?php echo $this->escape($item->title); ?></a>
                    
174    </table>
                    
175    <?php if( $this->pagination->total > 0 ): ?><div id="pagination-bottom"><?php echo $this->pagination->getListFooter(); ?></div><?php endif; ?>
                    
176    <div>
                    
                
Migrator.php https://bitbucket.org/salimane/ruckusing-migrations.git | PHP | 324 lines
                    
1<?php
                    
2/**
                    
75        // We only want one row but we cannot assume that we are using MySQL and use a LIMIT statement
                    
76        // as it is not part of the SQL standard. Thus we have to select all rows and use PHP to return
                    
77        // the record we need
                    
126        }
                    
127        $start = $direction == 'up' ? 0 : array_search($current, $migrations);
                    
128        $start = $start !== false ? $start : 0;
                    
128        $start = $start !== false ? $start : 0;
                    
129        $finish = array_search($target, $migrations);
                    
130        $finish = $finish !== false ? $finish : (count($migrations) - 1);
                    
230            for ($i = 0; $i < $file_cnt; $i++) {
                    
231                if (preg_match('/^(\d+)_(.*)\.php$/', $files[$i], $matches)) {
                    
232                    if (count($matches) == 3) {
                    
247            $migration = $valid_files[$i];
                    
248            if (preg_match('/^(\d+)_(.*)\.php$/', $migration, $matches)) {
                    
249                $files[] = array(
                    
                
admin_review.php https://bitbucket.org/prat_h/rakbuku.git | PHP | 501 lines
                    
1<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2
                    
2
                    
3require_once(APPPATH.'controllers/project.php');
                    
4
                    
19		$this->laststate = $this->cek_state($this->dataproj[0]["project_id"]);
                    
20		$match = array_search($this->laststate, $this->defstates);
                    
21		if( $this->laststate !== "admin_review" && $match !== false ){
                    
                
SqlBase.php https://gitlab.com/mohamed_hussein/prodt | PHP | 415 lines
                    
1<?php
                    
2
                    
250      $items_per_page = $form_state->getValue(['pager_options', 'items_per_page']);
                    
251      if (array_search($items_per_page, $options) === FALSE) {
                    
252        $form_state->setErrorByName('pager_options][expose][items_per_page_options', $this->t("The <em>Exposed items per page</em> field's options must include the value from the <em>Items per page</em> field (@items_per_page).",
                    
                
array.class.php https://github.com/geraintp/frontend.git | PHP | 289 lines
                    
21/**
                    
22 * The <CFArray> object extends PHP's built-in <php:ArrayObject> object by providing convenience methods for
                    
23 * rapidly manipulating array data. Specifically, the `CFArray` object is intended for working with
                    
28 * @copyright See the included NOTICE.md file for more information.
                    
29 * @link http://aws.amazon.com/php/ PHP Developer Center
                    
30 * @link http://php.net/ArrayObject ArrayObject
                    
38	 * @param integer $flags (Optional) Flags to control the behavior of the ArrayObject object. Defaults to <STD_PROP_LIST>.
                    
39	 * @param string $iterator_class (Optional) Specify the class that will be used for iteration of the <php:ArrayObject> object. <php:ArrayIterator> is the default class used.
                    
40	 * @return mixed Either an array of matches, or a single <CFSimpleXML> element.
                    
51	 * @param integer $flags (Optional) Flags to control the behavior of the ArrayObject object. Defaults to <STD_PROP_LIST>.
                    
52	 * @param string $iterator_class (Optional) Specify the class that will be used for iteration of the <php:ArrayObject> object. <php:ArrayIterator> is the default class used.
                    
53	 * @return mixed Either an array of matches, or a single <CFSimpleXML> element.
                    
56	{
                    
57		if (version_compare(PHP_VERSION, '5.3.0', '<'))
                    
58		{
                    
                
DB_forge.php https://bitbucket.org/code_noodle/scratchpad.git | PHP | 438 lines
                    
1<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP 5.2.4 or newer
                    
6 *
                    
108		{
                    
109			$key = array_search(strtolower($db_name), array_map('strtolower', $this->db->data_cache['db_names']), TRUE);
                    
110			if ($key !== FALSE)
                    
263		{
                    
264			$key = array_search(strtolower($this->db->dbprefix.$table_name), array_map('strtolower', $this->db->data_cache['table_names']), TRUE);
                    
265			if ($key !== FALSE)
                    
301		{
                    
302			$key = array_search(strtolower($this->db->dbprefix.$table_name), array_map('strtolower', $this->db->data_cache['table_names']), TRUE);
                    
303			if ($key !== FALSE)
                    
436
                    
437/* End of file DB_forge.php */
                    
438/* Location: ./system/database/DB_forge.php */
                    
                
broadcast_server.class.php https://gitlab.com/x33n/ampache | PHP | 442 lines
                    
1<?php
                    
2/* vim:set softtabstop=4 shiftwidth=4 expandtab: */
                    
330        foreach ($this->listeners as $broadcast_id => $brlisteners) {
                    
331            $lindex = array_search($conn, $brlisteners);
                    
332            if ($lindex) {
                    
353    {
                    
354        $broadcaster_id = array_search($broadcast, $this->broadcasters);
                    
355        if ($broadcaster_id) {
                    
                
Service.php https://gitlab.com/devtoannh/cafe | PHP | 473 lines
                    
1<?php
                    
2/**
                    
23 */
                    
24require_once 'Zend/Json/Server/Smd.php';
                    
25
                    
30 * @subpackage Server
                    
31 * @version    $Id: Service.php 23775 2011-03-01 17:25:24Z ralph $
                    
32 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
                    
132        if (null == $this->getName()) {
                    
133            require_once 'Zend/Json/Server/Exception.php';
                    
134            throw new Zend_Json_Server_Exception('SMD service description requires a name; none provided');
                    
169        if (!preg_match($this->_nameRegex, $name)) {
                    
170            require_once 'Zend/Json/Server/Exception.php';
                    
171            throw new Zend_Json_Server_Exception(sprintf('Invalid name "%s" provided for service; must follow PHP method naming conventions', $name));
                    
197        if (!in_array($transport, $this->_transportTypes)) {
                    
198            require_once 'Zend/Json/Server/Exception.php';
                    
199            throw new Zend_Json_Server_Exception(sprintf('Invalid transport "%s"; please select one of (%s)', $transport, implode(', ', $this->_transportTypes)));
                    
                
filterset.php https://github.com/mackensen/moodle.git | PHP | 304 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
77    public function set_join_type(int $jointype): self {
                    
78        if (array_search($jointype, $this->jointypes) === false) {
                    
79            throw new InvalidArgumentException('Invalid join type specified');
                    
                
AlbumController.php https://github.com/grandison/budo16.git | PHP | 454 lines
                    
1<?php
                    
2/**
                    
8 * @license    http://www.socialengine.net/license/
                    
9 * @version    $Id: AlbumController.php 8381 2011-02-02 05:03:02Z john $
                    
10 * @author     John Boehr <j@webligo.com>
                    
122
                    
123      $viewMax = array_search($values['auth_view'], $roles);
                    
124      $commentMax = array_search($values['auth_comment'], $roles);
                    
124      $commentMax = array_search($values['auth_comment'], $roles);
                    
125      $tagMax = array_search($values['auth_tag'], $roles);
                    
126      
                    
                
question.php https://github.com/mackensen/moodle.git | PHP | 374 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
27
                    
28require_once($CFG->dirroot . '/question/type/questionbase.php');
                    
29
                    
229            $stemid = $stemtostemids[$stem];
                    
230            $shuffledstemno = array_search($stemid, $this->stemorder);
                    
231            if (empty($choice)) {
                    
                
vmtablexarray.php https://gitlab.com/phamngsinh/baitaplon_sinhvien | PHP | 289 lines
                    
1<?php
                    
2/**
                    
12 * @copyright Copyright (c) 2011 VirtueMart Team. All rights reserved.
                    
13 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
                    
14 * VirtueMart is free software. This version may have been modified pursuant
                    
17 * other free or open source software licenses.
                    
18 * See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details.
                    
19 *
                    
24
                    
25if(!class_exists('VmTable'))require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'vmtable.php');
                    
26
                    
75		// TODO next 2 lines not used ????
                    
76		if ($direction >0) $idToSwap = $order[$keys[array_search($id, $keys)]+1];
                    
77		else $idToSwap =  $order[$keys[array_search($id, $keys)]-1];
                    
                
inflector.php https://github.com/jongwook/ksa14-kohana.git | PHP | 269 lines
                    
1<?php defined('SYSPATH') or die('No direct script access.');
                    
2/**
                    
38	 * If you find a word is being pluralized improperly, it has probably not
                    
39	 * been defined as uncountable in `config/inflector.php`. If this is the
                    
40	 * case, please report [an issue](http://dev.kohanaphp.com/projects/kohana3/issues).
                    
70	 *
                    
71	 * [!!] Special inflections are defined in `config/inflector.php`.
                    
72	 *
                    
104
                    
105		if ($irregular = array_search($str, Inflector::$irregular))
                    
106		{
                    
144	 *
                    
145	 * [!!] Special inflections are defined in `config/inflector.php`.
                    
146	 *
                    
                
class-wp-admin-bar.php https://gitlab.com/puppet-br/puppet-br.org-wordpress | PHP | 474 lines
                    
355
                    
356		?><div id="<?php echo esc_attr( 'wp-admin-bar-' . $node->id ); ?>" class="ab-group-container"><?php
                    
357			foreach ( $node->children as $group ) {
                    
371
                    
372		?><ul id="<?php echo esc_attr( 'wp-admin-bar-' . $node->id ); ?>" class="<?php echo esc_attr( $class ); ?>"><?php
                    
373			foreach ( $node->children as $item ) {
                    
400
                    
401		<li id="<?php echo esc_attr( 'wp-admin-bar-' . $node->id ); ?>" class="<?php echo esc_attr( $menuclass ); ?>"><?php
                    
402			if ( $has_link ):
                    
402			if ( $has_link ):
                    
403				?><a class="ab-item" <?php echo $aria_attributes; ?> href="<?php echo esc_url( $node->href ) ?>"<?php
                    
404					if ( ! empty( $node->meta['onclick'] ) ) :
                    
416				if ( ! empty( $node->meta['title'] ) ) :
                    
417					?> title="<?php echo esc_attr( $node->meta['title'] ); ?>"<?php
                    
418				endif;
                    
                
importer.php https://bitbucket.org/selfeky/xclusivescardwebsite.git | PHP | 461 lines
                    
1<?php 
                    
2
                    
207						// we find that block in the master collection block pool and alias it out
                    
208						$bID = array_search((string) $bx['mc-block-id'], self::$mcBlockIDs);
                    
209						if ($bID) {
                    
                
PluginLoader.php https://github.com/bhaumik25/zend-framework.git | PHP | 337 lines
                    
1<?php
                    
2/**
                    
22/** Zend_Loader_PluginLoader_Interface */
                    
23require_once 'Zend/Loader/PluginLoader/Interface.php';
                    
24
                    
25/** Zend_Loader */
                    
26require_once 'Zend/Loader.php';
                    
27
                    
113        if (!is_string($prefix) || !is_string($path)) {
                    
114            require_once 'Zend/Loader/PluginLoader/Exception.php';
                    
115            throw new Zend_Loader_PluginLoader_Exception('Zend_Loader_PluginLoader::addPrefixPath() method only takes strings for prefix and path.');
                    
213        if (!isset($registry[$prefix])) {
                    
214            require_once 'Zend/Loader/PluginLoader/Exception.php';
                    
215            throw new Zend_Loader_PluginLoader_Exception('Prefix ' . $prefix . ' was not found in the PluginLoader.');
                    
218        if ($path != null) {
                    
219            $pos = array_search($path, $registry[$prefix]);
                    
220            if ($pos === null) {
                    
                
Pgsql.php https://github.com/bhaumik25/zend-framework.git | PHP | 281 lines
                    
1<?php
                    
2
                    
27 */
                    
28require_once 'Zend/Db/Adapter/Pdo/Abstract.php';
                    
29
                    
163                $primary = true;
                    
164                $primaryPosition = array_search($row[$attnum], explode(',', $row[$conkey])) + 1;
                    
165                $identity = (bool) (preg_match('/^nextval/', $row[$default_value]));
                    
202             */
                    
203            require_once 'Zend/Db/Adapter/Exception.php';
                    
204            throw new Zend_Db_Adapter_Exception("LIMIT argument count=$count is not valid");
                    
211             */
                    
212            require_once 'Zend/Db/Adapter/Exception.php';
                    
213            throw new Zend_Db_Adapter_Exception("LIMIT argument offset=$offset is not valid");
                    
                
Save.inc.php https://github.com/radicalsuz/amp.git | PHP | 264 lines
                    
1<?php
                    
2require_once ('Modules/Payment/Payment.php');
                    
2require_once ('Modules/Payment/Payment.php');
                    
3require_once ('Modules/Payment/Item.inc.php');
                    
4require_once ('AMP/UserData/Plugin/Save.inc.php');
                    
4require_once ('AMP/UserData/Plugin/Save.inc.php');
                    
5require_once ('AMP/Form/ElementSwapScript.inc.php');
                    
6
                    
105        foreach ($this->fields as $fname => $fdef) {
                    
106            if ( array_search($this->fields[$fname]['type'], $types_to_avoid)!==FALSE ) continue;
                    
107
                    
                
Editor.php https://github.com/adaykin/zf2.git | PHP | 601 lines
                    
1<?php
                    
2/**
                    
127        $captureEvents = $this->getCaptureEvents();
                    
128        if (false === ($index = array_search($event, $captureEvents))) {
                    
129            return $this;
                    
225        $events = $this->getEvents();
                    
226        if (false === ($index = array_search($event, $events))) {
                    
227            return $this;
                    
323        $plugins = $this->getPlugins();
                    
324        if (false === ($index = array_search($plugin, $plugins))) {
                    
325            return $this;
                    
557        $styleSheets = explode(';', $styleSheets);
                    
558        if (false !== ($index = array_search($styleSheet, $styleSheets))) {
                    
559            unset($styleSheets[$index]);
                    
                
Container.php https://github.com/Exercise/zf2.git | PHP | 508 lines
                    
1<?php
                    
2/**
                    
212            $this->_sort();
                    
213            if (!$hash = array_search($page, $this->_index)) {
                    
214                return false;
                    
                
helper.php https://github.com/nikosdion/Akeeba-Example.git | PHP | 582 lines
                    
1<?php
                    
2/**
                    
115		// Remove the user from the group if necessary.
                    
116		$key = array_search($groupId, $user->groups);
                    
117		if ($key !== false)
                    
523		{
                    
524			$stat = array(php_uname());
                    
525		}
                    
                
ListEntry.php https://bitbucket.org/openfisma-ondemand/openfisma.git | PHP | 208 lines
                    
1<?php
                    
2
                    
26 */
                    
27// require_once 'Zend/Gdata/Entry.php';
                    
28
                    
31 */
                    
32// require_once 'Zend/Gdata/Spreadsheets/Extension/Custom.php';
                    
33
                    
174            // Be sure to delete form both arrays!
                    
175            $key = array_search($element, $this->_customByName);
                    
176            unset($this->_customByName[$key]);
                    
177        } else {
                    
178            // require_once 'Zend/Gdata/App/InvalidArgumentException.php';
                    
179            throw new Zend_Gdata_App_InvalidArgumentException(
                    
197            // Be sure to delete from both arrays!
                    
198            $key = array_search($element, $this->_custom);
                    
199            unset($this->_custom[$key]);
                    
                
Boolean.php https://github.com/cosmocommerce/magento-mirror.git | PHP | 375 lines
                    
18 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version    $Id: Boolean.php 24593 2012-01-05 20:35:02Z matthew $
                    
20 */
                    
24 */
                    
25#require_once 'Zend/Filter/Interface.php';
                    
26
                    
41    const NULL         = 64;
                    
42    const PHP          = 127;
                    
43    const FALSE_STRING = 128;
                    
54        self::NULL         => 'null',
                    
55        self::PHP          => 'php',
                    
56        self::FALSE_STRING => 'false',
                    
146                } elseif (in_array($value, $this->_constants)) {
                    
147                    $detected += array_search($value, $this->_constants);
                    
148                }
                    
                
cache.php https://github.com/weissms/owb-mirror.git | PHP | 429 lines
                    
1<?php
                    
2function wp_cache_add($key, $data, $flag = '', $expire = 0) {
                    
52
                    
53define('CACHE_SERIAL_HEADER', "<?php\n/*");
                    
54define('CACHE_SERIAL_FOOTER', "*/\n?".">");
                    
149
                    
150		$cache_file = $this->cache_dir.$this->get_group_dir($group)."/".$this->hash($id).'.php';
                    
151		if (!file_exists($cache_file)) {
                    
174	function get_group_dir($group) {
                    
175		if (false !== array_search($group, $this->global_groups))
                    
176			return $group;
                    
203
                    
204			if (!file_exists($this->cache_dir.$make_dir."index.php")) {
                    
205				$file_perms = $perms & 0000666;
                    
205				$file_perms = $perms & 0000666;
                    
206				@ touch($this->cache_dir.$make_dir."index.php");
                    
207				@ chmod($this->cache_dir.$make_dir."index.php", $file_perms);
                    
                
class-wpb-map.php https://gitlab.com/oxidigitaluser/liguelista | PHP | 563 lines
                    
1<?php
                    
2/**
                    
12 * This class maps shortcodes settings to VC editors. You can manage add new shortcodes or manage default shortcodes
                    
13 * mapped in config/map.php. For developers it is possible to use API functions to add update settings attributes.
                    
14 *
                    
14 *
                    
15 * @see config/map.php
                    
16 * @see include/helpers/helpers_api.php
                    
126	 * You need to shortcode's tag and  settings to map correctly.
                    
127	 * Default shortcodes are mapped in config/map.php file.
                    
128	 * The best way is to call this method with "init" action callback function of WP.
                    
214						foreach ( $categories as $c ) {
                    
215							if ( array_search( $c, self::$user_categories ) === false ) {
                    
216								self::$user_categories[] = $c;
                    
217							}
                    
218							$values['_category_ids'][] = md5( $c ); // array_search($category, self::$categories);
                    
219						}
                    
                
result.php https://github.com/vietvh/Finder.git | PHP | 398 lines
                    
1<?php
                    
2/**
                    
11
                    
12JLoader::register('FinderIndexer', dirname(__FILE__) . '/indexer.php');
                    
13
                    
338			// Search for the property in the group.
                    
339			$key = array_search($property, $this->instructions[$group]);
                    
340
                    
                
Serializer.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 362 lines
                    
1<?php
                    
2/**
                    
23/** Zend_Amf_Constants */
                    
24require_once 'Zend/Amf/Constants.php';
                    
25
                    
26/** @see Zend_Amf_Parse_Serializer */
                    
27require_once 'Zend/Amf/Parse/Serializer.php';
                    
28
                    
29/**
                    
30 * Serializer PHP misc types back to there corresponding AMF0 Type Marker.
                    
31 *
                    
65    {
                    
66        // Workaround for PHP5 with E_STRICT enabled complaining about "Only 
                    
67        // variables should be passed by reference" 
                    
114                    default:
                    
115                        require_once 'Zend/Amf/Exception.php';
                    
116                        throw new Zend_Amf_Exception("Unknown Type Marker: " . $markerType);
                    
                
route.php https://github.com/ymtn/core.git | PHP | 589 lines
                    
1<?php defined('SYSPATH') or die('No direct script access.');
                    
2/**
                    
134	{
                    
135		return array_search($route, Route::$_routes);
                    
136	}
                    
288	 * The $uri parameter can either be a string for basic regex matching or it
                    
289	 * can be a valid callback or anonymous function (php 5.3+). If you use a
                    
290	 * callback or anonymous function, your method should return an array
                    
                
Wizard.php https://bitbucket.org/blackriver/openx.git | PHP | 412 lines
                    
1<?php
                    
2/*
                    
25*/
                    
26require_once MAX_PATH . '/lib/OX/Admin/UI/SessionStorage.php';
                    
27
                    
186        
                    
187        $idx = array_search($stepId, $this->aStepIds);
                    
188        
                    
200        
                    
201        $idx = array_search($stepId, $this->aStepIds);
                    
202        
                    
                
uploadcsv.php https://github.com/nadavkav/Moodle-RTL--Shenkar-Translation-Team-.git | PHP | 238 lines
                    
1<?php // $Id: uploadcsv.php,v 1.12.2.2 2008/02/07 16:27:53 ethem Exp $
                    
2
                    
3/// Load libraries
                    
4    require_once('../../config.php');
                    
5    require_once($CFG->libdir.'/uploadlib.php');
                    
5    require_once($CFG->libdir.'/uploadlib.php');
                    
6    require_once($CFG->dirroot.'/enrol/authorize/const.php');
                    
7    require_once($CFG->dirroot.'/enrol/authorize/localfuncs.php');
                    
15    $navlinks = array();
                    
16    $navlinks[] = array('name' => $struploadcsv, 'link' => "uploadcsv.php", 'type' => 'misc');
                    
17    $navigation = build_navigation($navlinks);
                    
38    $maxuploadsize = get_max_upload_file_size();
                    
39    echo '<center><form method="post" enctype="multipart/form-data" action="uploadcsv.php">
                    
40          <input type="hidden" name="MAX_FILE_SIZE" value="'.$maxuploadsize.'" />
                    
48
                    
49?><?php
                    
50
                    
                
Config.php https://github.com/cwt137/zf2.git | PHP | 306 lines
                    
1<?php
                    
2/**
                    
79        $config = array(
                    
80            'php' => array(
                    
81                'includepath' => get_include_path(),
                    
154        if (is_array($value)) {
                    
155            $tree .= $prefix.$pointer.$key.PHP_EOL;
                    
156
                    
166        } else {
                    
167            $tree .= $prefix.$pointer.$key.": ".trim($value).PHP_EOL;
                    
168        }
                    
270        $providerClasses = $userConfig->basicloader->classes->toArray();
                    
271        if (($key = array_search($className, $providerClasses)) !== false) {
                    
272            unset($userConfig->basicloader->classes->$key);
                    
                
Route.php https://github.com/rakesh-sankar/PHP-Framework-Benchmark.git | PHP | 413 lines
                    
1<?php
                    
2/**
                    
18 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version    $Id: Route.php 23485 2010-12-10 04:03:18Z mjh_ca $
                    
20 */
                    
24 */
                    
25require_once 'Zend/Controller/Router/Route/Interface.php';
                    
26
                    
29 */
                    
30require_once 'Zend/Controller/Router/Route/Module.php';
                    
31
                    
34 */
                    
35require_once 'Zend/Controller/Dispatcher/Interface.php';
                    
36
                    
39 */
                    
40require_once 'Zend/Controller/Request/Abstract.php';
                    
41
                    
                
Publisher.php https://github.com/quarkness/piwik.git | PHP | 418 lines
                    
1<?php
                    
2/**
                    
18 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version    $Id: Publisher.php 23775 2011-03-01 17:25:24Z ralph $
                    
20 */
                    
24 */
                    
25// require_once 'Zend/Feed/Pubsubhubbub.php';
                    
26
                    
92        } elseif (!is_array($config)) {
                    
93            // require_once 'Zend/Feed/Pubsubhubbub/Exception.php';
                    
94            throw new Zend_Feed_Pubsubhubbub_Exception('Array or Zend_Config object'
                    
117        if (empty($url) || !is_string($url) || !Zend_Uri::check($url)) {
                    
118            // require_once 'Zend/Feed/Pubsubhubbub/Exception.php';
                    
119            throw new Zend_Feed_Pubsubhubbub_Exception('Invalid parameter "url"'
                    
151        }
                    
152        $key = array_search($url, $this->_hubUrls);
                    
153        unset($this->_hubUrls[$key]);
                    
                
Collection.php https://github.com/vohnicky/treeview.git | PHP | 384 lines
                    
1<?php
                    
2
                    
6 * @copyright  Copyright (c) 2004, 2010 David Grudl
                    
7 * @license    http://nettephp.com/license  Nette license
                    
8 * @link       http://nettephp.com
                    
24{
                    
25	/** @var string  type (class, interface, PHP type) */
                    
26	private $itemType;
                    
98	{
                    
99		return array_search($item, $this->getArrayCopy(), TRUE);
                    
100	}
                    
                
Route.php https://github.com/qmmr/iAlbums.git | PHP | 413 lines
                    
1<?php
                    
2/**
                    
18 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version    $Id: Route.php 23486 2010-12-10 04:05:30Z mjh_ca $
                    
20 */
                    
24 */
                    
25require_once 'Zend/Controller/Router/Route/Interface.php';
                    
26
                    
29 */
                    
30require_once 'Zend/Controller/Router/Route/Module.php';
                    
31
                    
34 */
                    
35require_once 'Zend/Controller/Dispatcher/Interface.php';
                    
36
                    
39 */
                    
40require_once 'Zend/Controller/Request/Abstract.php';
                    
41
                    
                
magic-export.php https://github.com/ChuguluGames/mediawiki-svn.git | PHP | 306 lines
                    
1<?php
                    
2
                    
12
                    
13require( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/maintenance/Maintenance.php' );
                    
14
                    
125		if ( $end === false ) {
                    
126			return "<?php\n";
                    
127		}
                    
139				case 'special':
                    
140					fwrite( $handle, <<<PHP
                    
141
                    
143\$specialPageAliases = array();
                    
144PHP
                    
145					);
                    
147				case 'magic':
                    
148					fwrite( $handle, <<<PHP
                    
149
                    
                
CakeNumber.php https://gitlab.com/manuperazafa/elsartenbackend | PHP | 416 lines
                    
6 *
                    
7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
8 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
14 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
15 * @link          http://cakephp.org CakePHP(tm) Project
                    
16 * @package       Cake.Utility
                    
16 * @package       Cake.Utility
                    
17 * @since         CakePHP(tm) v 0.10.0.1076
                    
18 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
                    
26 * @package       Cake.Utility
                    
27 * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/number.html
                    
28 */
                    
144		$l = -2;
                    
145		$i = array_search(substr($size, -2), array('KB', 'MB', 'GB', 'TB', 'PB'));
                    
146		if ($i === false) {
                    
                
checkout.php https://gitlab.com/sujen.2009/iols | PHP | 232 lines
                    
5    <h3>My Shopping Cart</h3>
                    
6    <?php
                    
7      if(sizeof($products)>0){
                    
21              $units=json_decode($product['product_unit']);
                    
22              $key = array_search($product['selectedUnit'], $units);
                    
23              echo '<br /><a target="_blank" href="'.base_url().'product_detail/'.$product["product_title"].'">View Detail</a>';
                    
52      <div class="col-sm-3">
                    
53          $<?php echo $totalprice; ?> only
                    
54      </div>
                    
117    <div class="col-sm-3 ">
                    
118      <input type="hidden" name="total_price" value="<?php echo $totalprice; ?>" />
                    
119      <input required class="form-control" type="text" name="shipping_address"  id="shipping_address" />
                    
155  </form>
                    
156  <?php
                    
157  }else{
                    
                
arr.php https://github.com/jimmytidey/jimmytidey.co.uk.git | PHP | 223 lines
                    
1<?php
                    
2/*
                    
36	static function remove_value(&$array, $value) {
                    
37		$index = array_search($value, $array);
                    
38		if ($index !== false)
                    
202	
                    
203	//Function based on http://php.net/manual/en/function.array-unique.php#82508
                    
204	static function in_array_i($str, $a) {
                    
211
                    
212	//Function based on http://php.net/manual/en/function.array-unique.php#82508
                    
213	static function array_unique_i($a) {
                    
                
ArrayCollection.php https://gitlab.com/mario.uriarte/doctrine2.5-tutorial | PHP | 387 lines
                    
1<?php
                    
2/*
                    
26/**
                    
27 * An ArrayCollection is a Collection implementation that wraps a regular PHP array.
                    
28 *
                    
120    {
                    
121        $key = array_search($element, $this->elements, true);
                    
122
                    
210    {
                    
211        return array_search($element, $this->elements, true);
                    
212    }
                    
                
HelperPriorityStack.php https://github.com/mfairchild365/zf2.git | PHP | 280 lines
                    
1<?php
                    
2/**
                    
184            $helper = $this->_helpersByNameRef[$helperName];
                    
185            $priority = array_search($helper, $this->_helpersByPriority, true);
                    
186        } else {
                    
                
Serializer.php https://github.com/duoduo/zf2.git | PHP | 353 lines
                    
1<?php
                    
2/**
                    
33/**
                    
34 * Serializer PHP misc types back to there corresponding AMF0 Type Marker.
                    
35 *
                    
201        ) {
                    
202            $ref = array_search($object, $this->_referenceObjects,true);
                    
203            //handle object reference
                    
215    /**
                    
216     * Write a PHP array with string or mixed keys.
                    
217     *
                    
                
utils.php https://gitlab.com/Blueprint-Marketing/hhvm | PHP | 452 lines
                    
263  if (Options::$php_path !== null) {
                    
264    if (!file_exists(Options::$php_path)) {
                    
265      error_and_exit("PHP build does not exists. Are you sure your path is ".
                    
267    }
                    
268    $executable = Options::$php_path;
                    
269    $command = $executable;
                    
275      $executable = $fbcode_root_dir;
                    
276      $executable .= $use_php ? "/_bin/hphp/hhvm/php" : "/_bin/hphp/hhvm/hhvm";
                    
277    // Maybe we are in OSS land trying this script
                    
279      // Pear won't run correctly unless a 'php' executable exists.
                    
280      // This may be a Pear thing, a PHPUnit running phpt thing, or
                    
281      // or something else. Until we know for sure, let's just create
                    
285      $executable = $oss_root_dir."/hhvm";
                    
286      $executable .= $use_php ? "/php" : "/hhvm";
                    
287    } else {
                    
                
RcptCommand.php https://github.com/peci1/nSMTPMailer.git | PHP | 285 lines
                    
1<?php
                    
2
                    
135                    //forward-address
                    
136                    $key = array_search($recipient['original_email'],
                    
137                        $undeliveredRecipients);
                    
                
tikiimporter_blog.php https://gitlab.com/ElvisAns/tiki | PHP | 475 lines
                    
1<?php
                    
2
                    
17
                    
18require_once('tikiimporter.php');
                    
19
                    
91
                    
92        echo "\n\n<b>" . tra('<a href="tiki-importer.php">Click here</a> to finish the import process') . '</b>';
                    
93        flush();
                    
158                        // discover the item key in the $this->parsedData array
                    
159                        $itemKey = array_search($item, $this->parsedData[$item['type'] . 's']);
                    
160                        $this->parsedData[$item['type'] . 's'][$itemKey]['objId'] = $objId;
                    
269            $tikilib->set_preference('home_blog', $this->blogId);
                    
270            $tikilib->set_preference('tikiIndex', 'tiki-view_blog.php?blogId=' . $this->blogId);
                    
271        }
                    
365        if ($pageName) {
                    
366            $objectlib->insert_object('wiki page', $pageName, '', $pageName, 'tiki-index.php?page=' . urlencode($pageName));
                    
367        }
                    
                
_comments.html https://gitlab.com/orvi2014/phpjs | HTML | 364 lines
                    
7I suggest you my version which has two main features compared with your version:
                    
8First, its speed; Instead of use array_search which needs to iterate over the collection for each item of the source value, I add the new values as keys (implicity converted to strings for comparision) to a temporary object, then quickly you can check if it was added using hasOwnProperty.
                    
9Second, a second paramemeter which add the feature of returning the result as array when the source value is an array.
                    
52on 2010-06-09 21:10:58 <br />
                    
53@t: Associative arrays aren't native to JavaScript, but JavaScript objects share similarities to PHP associative arrays, so to try and support associative arrays, the functions on PHP.JS convert JavaScript arrays to JavaScript objects.
                    
54<hr />
                    
60on 2010-06-08 19:50:09 <br />
                    
61Why does this function return an object where as the php version returns an array?
                    
62
                    
78on 2010-03-19 14:53:14 <br />
                    
79@harald: Sorry, fixed in git: http://github.com/kvz/phpjs/raw/master/functions/array/array_unique.js . See https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object/hasOwnProperty for an explanation of the method. It is used to make sure we are only iterating over the immediate properties of the object, and not any that may have been added on an inherited class or on the Object/Array prototype itself...
                    
80<hr />
                    
131
                    
132However, I'm not sure about the array-to-objects issue. Although we can get an array to return, due to the nature of JS, it will only contain the numerically indexed items within the array (and the length will be the total of those only). The other items would be added as properties of that array's object, and not be counted with length, though they are iteratable. Kevin has chosen to implement PHP arrays as regular (non-array) objects, so that we can support associative arrays. Granted we could theoretically return arrays with object properties, but that might be more confusing, and perhaps is the reason he chose not to do that. 
                    
133
                    
                
index.php https://github.com/rsinger/Jangle.git | PHP | 384 lines
                    
1<?php
                    
2
                    
2
                    
3require 'lib/jangle.php';
                    
4require 'lib/spyc.php5';
                    
4require 'lib/spyc.php5';
                    
5require 'lib/models.php';
                    
6
                    
154        if($config["record_types"][$format]["stylesheets"]["feed"]) {
                    
155            if(array_search($resources->entity(), $config["record_types"][$format]["stylesheets"]["feed"]["entities"]) !== False) {
                    
156                $j->addStylesheet($config["record_types"][$format]["stylesheets"]["feed"]["uri"]);
                    
219            $query_arg = $key."=";
                    
220            if(array_search(ereg_replace("\?$",'',$c["parameters"][$key]),$opensearch_params) !== False) {
                    
221                $query_arg .= "{".$c["parameters"][$key]."}";
                    
                
avaliacoes.inc.php https://gitlab.com/paulormm/papers-php | PHP | 269 lines
                    
229
                    
230     Eh uma pena, mas o PHP naum tem um array_search decente. Que
                    
231     saudades do Ruby...
                    
                
class-wp-image-editor.php https://github.com/chopsuei3/oscc.git | PHP | 423 lines
                    
1<?php
                    
2/**
                    
414	protected static function get_extension( $mime_type = null ) {
                    
415		$extensions = explode( '|', array_search( $mime_type, wp_get_mime_types() ) );
                    
416
                    
                
Http.php https://github.com/Zefiryn/graduationprojects.git | PHP | 483 lines
                    
1<?php
                    
2/**
                    
18 * @license   http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version   $Id: Http.php 23775 2011-03-01 17:25:24Z ralph $
                    
20 */
                    
24 */
                    
25require_once 'Zend/File/Transfer/Adapter/Abstract.php';
                    
26
                    
47		if (ini_get('file_uploads') == false) {
                    
48			require_once 'Zend/File/Transfer/Exception.php';
                    
49			throw new Zend_File_Transfer_Exception('File uploads are not allowed in your php config!');
                    
107	{
                    
108		require_once 'Zend/File/Transfer/Exception.php';
                    
109		throw new Zend_File_Transfer_Exception('Method not implemented');
                    
127
                    
128		// Workaround for a PHP error returning empty $_FILES when form data exceeds php settings
                    
129		if (empty($this->_files) && ($content > 0)) {
                    
                
model.php https://github.com/easysoft/zentaopms.git | PHP | 433 lines
                    
1<?php
                    
2/**
                    
73
                    
74        $tmpFile  = array_search($appRoot . 'tmp', $fileList);
                    
75        $wwwFile  = array_search($appRoot . 'www', $fileList);
                    
75        $wwwFile  = array_search($appRoot . 'www', $fileList);
                    
76        $dataFile = array_search($appRoot . 'www/data', $wwwFileList);
                    
77        unset($fileList[$tmpFile]);
                    
139        $backFileName = "{$backupDir}/{$fileName}.sql";
                    
140        if(!$nosafe) $backFileName .= '.php';
                    
141
                    
330            if(file_exists($backupPath . $name . ".{$type}")) return $backupPath . $name . ".{$type}";
                    
331            if(file_exists($backupPath . $name . ".{$type}.php")) return $backupPath . $name . ".{$type}.php";
                    
332        }
                    
336            if(file_exists($backupPath . $name . ".{$type}.zip")) return $backupPath . $name . ".{$type}.zip";
                    
337            if(file_exists($backupPath . $name . ".{$type}.zip.php")) return $backupPath . $name . ".{$type}.zip.php";
                    
338        }
                    
                
class-bwp-option-page.php https://gitlab.com/Gashler/sg | PHP | 405 lines
                    
1<?php
                    
2/**
                    
165		$array_replace 		= array();
                    
166		$array_search 		= array('size', 'name', 'value', 'cols', 'rows', 'label', 'disabled', 'pre', 'post');
                    
167		$return_html = '';
                    
227		{
                    
228			foreach ($array_search as &$keyword)
                    
229			{
                    
236			}
                    
237			$return_html = str_replace($array_search, $array_replace, $html_field) . $br;
                    
238		}
                    
                
modregister.class.php https://gitlab.com/haque.mdmanzurul/modx-improve-carolyn | PHP | 223 lines
                    
1<?php
                    
2/*
                    
73     * @param modX &$modx A reference to a modX instance.
                    
74     * @param string $key A valid PHP variable which will be set on the modRegistry instance.
                    
75     * @param array $options Optional array of registry options.
                    
150        $success = false;
                    
151        $topicIdx = array_search($topic, $this->subscriptions);
                    
152        if ($topicIdx !== false && $topicIdx !== null) {
                    
199            if ($topic[strlen($topic) - 1] != '/') $topic .= '/';
                    
200            $topicIdx = array_search($topic, $this->subscriptions);
                    
201            if ($topicIdx !== false && $topicIdx !== null) {
                    
                
Parser.php https://gitlab.com/jafari/resana | PHP | 299 lines
                    
1<?php
                    
2/**
                    
192        foreach ([$text, $this->update->baseMessage->text] as $pattern) {
                    
193            $commandIndex = array_search($pattern, $patterns, false);
                    
194            if ($commandIndex !== false) {
                    
214        $namespace = '\common\components\telegram\commands';
                    
215        $files = glob($path.'/*.php');
                    
216        $commands = [];
                    
218        foreach ($files as $file) {
                    
219            if (preg_match('/.*\/([\w]+Command).php/', $file, $matches)) {
                    
220                $className = $namespace . '\\' . $matches[1];
                    
                
Service.php https://github.com/basdog22/Qool.git | PHP | 473 lines
                    
1<?php
                    
2/**
                    
23 */
                    
24require_once 'Zend/Json/Server/Smd.php';
                    
25
                    
30 * @subpackage Server
                    
31 * @version    $Id: Service.php 24594 2012-01-05 21:27:01Z matthew $
                    
32 * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
                    
132        if (null == $this->getName()) {
                    
133            require_once 'Zend/Json/Server/Exception.php';
                    
134            throw new Zend_Json_Server_Exception('SMD service description requires a name; none provided');
                    
169        if (!preg_match($this->_nameRegex, $name)) {
                    
170            require_once 'Zend/Json/Server/Exception.php';
                    
171            throw new Zend_Json_Server_Exception(sprintf('Invalid name "%s" provided for service; must follow PHP method naming conventions', $name));
                    
197        if (!in_array($transport, $this->_transportTypes)) {
                    
198            require_once 'Zend/Json/Server/Exception.php';
                    
199            throw new Zend_Json_Server_Exception(sprintf('Invalid transport "%s"; please select one of (%s)', $transport, implode(', ', $this->_transportTypes)));
                    
                
Container.php https://bitbucket.org/Ebozavrik/test-application.git | PHP | 526 lines
                    
1<?php
                    
2/**
                    
18 * @license   http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version    $Id: Container.php 24593 2012-01-05 20:35:02Z matthew $
                    
20 */
                    
110        if ($page === $this) {
                    
111            require_once 'Zend/Navigation/Exception.php';
                    
112            throw new Zend_Navigation_Exception(
                    
116        if (is_array($page) || $page instanceof Zend_Config) {
                    
117            require_once 'Zend/Navigation/Page.php';
                    
118            $page = Zend_Navigation_Page::factory($page);
                    
119        } elseif (!$page instanceof Zend_Navigation_Page) {
                    
120            require_once 'Zend/Navigation/Exception.php';
                    
121            throw new Zend_Navigation_Exception(
                    
165        if (!is_array($pages)) {
                    
166            require_once 'Zend/Navigation/Exception.php';
                    
167            throw new Zend_Navigation_Exception(
                    
                
object-cache.php https://gitlab.com/Blueprint-Marketing/vip-quickstart | PHP | 402 lines
                    
1<?php
                    
2
                    
9
                    
10Install this file to wp-content/object-cache.php
                    
11*/
                    
12
                    
13// Users with setups where multiple installs share a common wp-config.php or $table_prefix
                    
14// can use this to guarantee uniqueness for the keys generated by this object cache
                    
270
                    
271		if ( false !== array_search($group, $this->global_groups) )
                    
272			$prefix = $this->global_prefix;
                    
                
Backend.php https://github.com/corneliusweiss/Tine-2.0-Open-Source-Groupware-and-CRM.git | PHP | 313 lines
                    
1<?php
                    
2/**
                    
49            $containerId = $container->getId();
                    
50//            $uri = array_search($containerId, $sessionUriMap);
                    
51            
                    
                
PredisCluster.php https://github.com/otto-torino/gino.git | PHP | 237 lines
                    
1<?php
                    
2
                    
101    {
                    
102        if (($id = array_search($connection, $this->pool, true)) !== false) {
                    
103            unset($this->pool[$id]);
                    
                
ClassExistenceResource.php https://github.com/FabienD/symfony.git | PHP | 231 lines
                    
1<?php
                    
2
                    
189            $i = 2;
                    
190        } elseif (false !== $i = array_search($autoloadFrame, $trace, true)) {
                    
191            $callerFrame = $trace[++$i];
                    
                
HelpSystem.php https://gitlab.com/rsilveira1987/Expresso | PHP | 373 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: HelpSystem.php 10020 2009-08-18 14:34:09Z j.fischer@metaways.de $
                    
21 */
                    
63        // break apart the message into wrapped chunks
                    
64        $errorMessages = explode(PHP_EOL, wordwrap($errorMessage, 70, PHP_EOL, false));
                    
65
                    
165         */
                    
166        require_once 'Zend/Version.php';
                    
167        $this->_response->appendContent('Zend Framework', array('color' => array('hiWhite'), 'separator' => false));
                    
224                // check to see if this action name is valid
                    
225                if (($foundActionIndex = array_search($actionName, $displayActionNames)) === false) {
                    
226                    continue;
                    
                
cache.php https://github.com/campagsi/bisad.git | PHP | 263 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * PHP versions 4 and 5
                    
6 *
                    
6 *
                    
7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
8 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
13 * @copyright     Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
14 * @link          http://cakephp.org CakePHP(tm) Project
                    
15 * @package       cake
                    
16 * @subpackage    cake.cake.libs.view.helpers
                    
17 * @since         CakePHP(tm) v 1.0.0.2277
                    
18 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
                    
28 * @subpackage    cake.cake.libs.view.helpers
                    
29 * @link http://book.cakephp.org/view/1376/Cache
                    
30 */
                    
                
widgets.php https://github.com/MikeLockz/lockwitz.git | PHP | 225 lines
                    
181		<a class="widget-action hide-if-no-js" href="#available-widgets"></a>
                    
182		<a class="widget-control-edit hide-if-js" href="<?php echo esc_url( add_query_arg( $query_arg ) ); ?>"><span class="edit"><?php _e('Edit'); ?></span><span class="add"><?php _e('Add'); ?></span></a>
                    
183	</div>
                    
183	</div>
                    
184	<div class="widget-title"><h4><?php echo $widget_title ?><span class="in-widget-title"></span></h4></div>
                    
185	</div>
                    
195	</div>
                    
196	<input type="hidden" name="widget-id" class="widget-id" value="<?php echo esc_attr($id_format); ?>" />
                    
197	<input type="hidden" name="id_base" class="id_base" value="<?php echo esc_attr($id_base); ?>" />
                    
198	<input type="hidden" name="widget-width" class="widget-width" value="<?php if (isset( $control['width'] )) echo esc_attr($control['width']); ?>" />
                    
199	<input type="hidden" name="widget-height" class="widget-height" value="<?php if (isset( $control['height'] )) echo esc_attr($control['height']); ?>" />
                    
200	<input type="hidden" name="widget_number" class="widget_number" value="<?php echo esc_attr($widget_number); ?>" />
                    
200	<input type="hidden" name="widget_number" class="widget_number" value="<?php echo esc_attr($widget_number); ?>" />
                    
201	<input type="hidden" name="multi_number" class="multi_number" value="<?php echo esc_attr($multi_number); ?>" />
                    
202	<input type="hidden" name="add_new" class="add_new" value="<?php echo esc_attr($add_new); ?>" />
                    
                
Route.php https://github.com/Spavacz/NPG.git | PHP | 410 lines
                    
1<?php
                    
2/**
                    
18 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
19 * @version    $Id: Route.php 20096 2010-01-06 02:05:09Z bkarwin $
                    
20 */
                    
24 */
                    
25require_once 'Zend/Controller/Router/Route/Interface.php';
                    
26
                    
29 */
                    
30require_once 'Zend/Controller/Router/Route/Module.php';
                    
31
                    
34 */
                    
35require_once 'Zend/Controller/Dispatcher/Interface.php';
                    
36
                    
39 */
                    
40require_once 'Zend/Controller/Request/Abstract.php';
                    
41
                    
                
routes.php https://bitbucket.org/sirestudios/fortis-wellness.git | PHP | 369 lines
                    
1<?php
                    
2
                    
102        foreach ($ignore_after as $segment) {
                    
103            $position = array_search($segment, $segments);
                    
104
                    
                
functions.php https://gitlab.com/Blueprint-Marketing/wordpress-unit-tests | PHP | 521 lines
                    
222function hemingway_menu() {
                    
223	$page = add_submenu_page('themes.php', 'Hemingway Options', 'Hemingway Options', 5, $hem_loc . 'functions.php', 'menu');
                    
224	add_action('load-' . $page, 'hemingway_scripts');
                    
236	function remove_block(block_place, block_ref){
                    
237		url = 'themes.php?page=functions.php&hem_action=remove_block&block_place=' + block_place + '&block_ref=' + block_ref;
                    
238		new Ajax.Updater(block_place, url, 
                    
325		?>
                    
326			<li><?php echo $block_name; ?> (<a href="#" onclick="remove_block('block_1', '<?php echo $block_ref; ?>');">remove</a>)</li>
                    
327		<?php endforeach; ?>
                    
463		?>
                    
464			<li><?php echo $block_name; ?> (<a href="#" onclick="remove_block('block_6', '<?php echo $block_ref; ?>');">remove</a>)</li>
                    
465		<?php endforeach; ?>
                    
472		onDrop:function(element){
                    
473			new Ajax.Updater('block_6', 'themes.php?page=functions.php&hem_action=add_block&block_place=block_6&block_ref=' + element.id, 
                    
474				{
                    
                
default.php https://gitlab.com/ricardosanchez/prueba | PHP | 249 lines
                    
1<?php
                    
2/**
                    
29{
                    
30	$saveOrderingUrl = 'index.php?option=com_menus&task=items.saveOrderAjax&tmpl=component';
                    
31	JHtml::_('sortablelist.sortable', 'itemList', 'adminForm', strtolower($listDirn), $saveOrderingUrl, false, true);
                    
37<?php // Set up the filter bar. ?>
                    
38<form action="<?php echo JRoute::_('index.php?option=com_menus&view=items');?>" method="post" name="adminForm" id="adminForm">
                    
39<?php if (!empty( $this->sidebar)) : ?>
                    
134					?>
                    
135					<tr class="row<?php echo $i % 2; ?>" sortable-group-id="<?php echo $item->parent_id;?>" item-id="<?php echo $item->id?>" parents="<?php echo $parentsStr?>" level="<?php echo $item->level?>">
                    
136						<td class="order nowrap center hidden-phone">
                    
167							<?php if ($canEdit) : ?>
                    
168								<a href="<?php echo JRoute::_('index.php?option=com_menus&task=item.edit&id=' . (int) $item->id);?>">
                    
169									<?php echo $this->escape($item->title); ?></a>
                    
194								<?php elseif ($canChange) : ?>
                    
195									<a href="<?php echo JRoute::_('index.php?option=com_menus&task=items.unsetDefault&cid[]=' . $item->id . '&' . JSession::getFormToken() . '=1'); ?>">
                    
196										<?php echo JHtml::_('image', 'mod_languages/' . $item->image . '.gif', $item->language_title, array('title' => JText::sprintf('COM_MENUS_GRID_UNSET_LANGUAGE', $item->language_title)), true); ?>
                    
                
Standard.php https://github.com/arush/desparation-deprecated.git | PHP | 460 lines
                    
1<?php
                    
2/**
                    
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
                    
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 */
                    
47                            if ($before = $customModule->getAttribute('before')) {
                    
48                                $position = array_search($before, $modules);
                    
49                                if ($position === false) {
                    
53                            } elseif ($after = $customModule->getAttribute('after')) {
                    
54                                $position = array_search($after, $modules);
                    
55                                if ($position === false) {
                    
367    {
                    
368        return array_search($frontName, $this->_routes);
                    
369    }
                    
                
MPSUM_Admin_Plugins.php https://gitlab.com/memuller.web/wp_site | PHP | 275 lines
                    
1<?php
                    
2/**
                    
130		$plugin_options = MPSUM_Updates_Manager::get_options( 'plugins' );
                    
131		if ( false !== $key = array_search( $plugin, $plugin_options ) ) {
                    
132			$enable_url = add_query_arg( array( 'action' => 'allow-update-selected', '_mpsum' => wp_create_nonce( 'mpsum_plugin_update' ), 'checked' => array( $plugin ) ) );
                    
179					$plugin_options[] = $plugin;	
                    
180					if ( ( $key = array_search( $plugin, $plugin_automatic_options ) ) !== false ) {
                    
181						unset( $plugin_automatic_options[ $key ] );
                    
187				foreach( $plugins as $plugin ) {
                    
188					if ( ( $key = array_search( $plugin, $plugin_options ) ) !== false ) {
                    
189						unset( $plugin_options[ $key ] );
                    
195					$plugin_automatic_options[] = $plugin;
                    
196					if ( ( $key = array_search( $plugin, $plugin_options ) ) !== false ) {
                    
197						unset( $plugin_options[ $key ] );
                    
202				foreach( $plugins as $plugin ) {
                    
203					if ( ( $key = array_search( $plugin, $plugin_automatic_options ) ) !== false ) {
                    
204						unset( $plugin_automatic_options[ $key ] );
                    
                
widgets.php https://github.com/exploradoreselectronicos/pressmark.git | PHP | 290 lines
                    
108
                    
109				<a class="widget-action widget-control-add" href="<?php echo $add_url; ?>"><?php _e( 'Add' ); ?></a>
                    
110
                    
233
                    
234			<a class="widget-action widget-control-edit" href="<?php echo remove_query_arg( array( 'edit', 'key' ) ); ?>"><?php _e('Cancel'); ?></a>
                    
235
                    
237
                    
238			<a class="widget-action widget-control-edit" href="<?php echo clean_url( add_query_arg( array( 'edit' => $id_format, 'key' => $key ) ) ); ?>"><?php _e('Edit'); ?></a>
                    
239
                    
259
                    
260				<a class="widget-action widget-control-save wp-no-js-hidden edit alignleft" href="#save:<?php echo $id_format; ?>"><?php _e('Change'); ?></a>
                    
261
                    
263
                    
264				<a class="widget-action widget-control-remove delete alignright" href="<?php echo clean_url( wp_nonce_url( add_query_arg( array( 'remove' => $id_format, 'key' => $key ) ), "remove-widget_$widget[id]" ) ); ?>"><?php _e('Remove'); ?></a>
                    
265				<br class="clear" />
                    
                
shortcode-overrides.php https://gitlab.com/adwait.rise/guruautolines | PHP | 285 lines
                    
1<?php
                    
2
                    
56
                    
57			/** This filter is documented in wp-includes/post-template.php */
                    
58			$text = apply_filters( 'the_content', $text );
                    
120	public static function nav_menu_css_class( $classes, $item ) {
                    
121		if ( strpos( $item->url, '#' ) !== false && ( $key = array_search( 'current-menu-item', $classes ) ) !== false ) {
                    
122			unset( $classes[$key] );
                    
                
meta-box-saves.inc.php https://gitlab.com/Gashler/dp | PHP | 148 lines
                    
1<?php
                    
2/**
                    
65															for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
                    
66																if (($i = array_search ($page_id, $pages[$n])) !== false)
                    
67																	unset($pages[$n][$i]);
                    
91															for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
                    
92																if (($i = array_search ($post_id, $posts[$n])) !== false)
                    
93																	unset($posts[$n][$i]);
                    
                
Rewrite.php https://github.com/jpratt/cal.git | PHP | 282 lines
                    
1<?php
                    
2/**
                    
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
                    
23 * @copyright  Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
                    
24 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
111
                    
112        return array_search($key, $optArr) !== false;
                    
113    }
                    
144            }
                    
145            if ($key = array_search($t, $curTags)) {
                    
146                unset($curTags[$key]);
                    
                
EventDispatcher.php https://gitlab.com/x33n/respond | PHP | 185 lines
                    
1<?php
                    
2
                    
108        foreach ($this->listeners[$eventName] as $priority => $listeners) {
                    
109            if (false !== ($key = array_search($listener, $listeners, true))) {
                    
110                unset($this->listeners[$eventName][$priority][$key], $this->sorted[$eventName]);
                    
                
store.php https://gitlab.com/Rad1calDreamer/honey | PHP | 245 lines
                    
1<?php
                    
2require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/catalog/general/store.php");
                    
87
                    
88		$keyForDelete = array_search("PRODUCT_AMOUNT", $arSelectFields);
                    
89
                    
94		{
                    
95			$keyForDelete = array_search("ELEMENT_ID", $arSelectFields);
                    
96			if($keyForDelete !== false)
                    
                
contact.php https://github.com/3den/J-MediaGalleries.git | PHP | 343 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * @version		$Id: contact.php 19024 2010-10-02 18:53:34Z 3dentech $
                    
4 * @package		Joomla.Administrator
                    
171		// Remove any values of zero.
                    
172		if (array_search(0, $pks, true)) {
                    
173			unset($pks[array_search(0, $pks, true)]);
                    
                
compare.php https://gitlab.com/shapcy/opencart | PHP | 195 lines
                    
1<?php
                    
2class ControllerProductCompare extends Controller {
                    
14		if (isset($this->request->get['remove'])) {
                    
15			$key = array_search($this->request->get['remove'], $this->session->data['compare']);
                    
16
                    
                
auth.php https://github.com/DregondRahl/auth.git | PHP | 429 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * Fuel is a fast, lightweight, community driven PHP5 framework.
                    
4 *
                    
9 * @copyright  2010 - 2011 Fuel Development Team
                    
10 * @link       http://fuelphp.com
                    
11 */
                    
279		$method_exists = ! is_string($type)
                    
280						|| array_search($check_method, static::$_drivers)
                    
281						|| method_exists(get_called_class(), $type);
                    
330		}
                    
331		if ($type = array_search($method, static::$_drivers))
                    
332		{
                    
428
                    
429/* end of file auth.php */
                    
430
                    
                
grid.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 470 lines
                    
1<?php
                    
2/**
                    
155	{
                    
156		$index = array_search($name, $this->columns);
                    
157		if ($index !== false)
                    
364		{
                    
365			unset($this->specialRows['header'][array_search($id, $this->specialRows['header'])]);
                    
366		}
                    
369		{
                    
370			unset($this->specialRows['footer'][array_search($id, $this->specialRows['footer'])]);
                    
371		}
                    
                
Serializer.php https://github.com/fernanDOTdo/symfony.git | PHP | 199 lines
                    
1<?php
                    
2
                    
155    {
                    
156        unset($this->normalizers[array_search($normalizer, $this->normalizers, true)]);
                    
157    }
                    
                
BaseVarDumper.php https://gitlab.com/makkooz/nikestreetbeat | PHP | 271 lines
                    
1<?php
                    
2/**
                    
55        if ($highlight) {
                    
56            $result = highlight_string("<?php\n" . self::$_output, true);
                    
57            self::$_output = preg_replace('/&lt;\\?php<br \\/>/', '', $result, 1);
                    
109            case 'object':
                    
110                if (($id = array_search($var, self::$_objects, true)) !== false) {
                    
111                    self::$_output .= get_class($var) . '#' . ($id + 1) . '(...)';
                    
140     *
                    
141     * The string is a valid PHP expression that can be evaluated by PHP parser
                    
142     * and the evaluation result will give back the variable value.
                    
146     *
                    
147     * It also handles objects by using the PHP functions serialize() and unserialize().
                    
148     *
                    
148     *
                    
149     * PHP 5.4 or above is required to parse the exported value.
                    
150     *
                    
                
PresentSelector.php https://github.com/IDCI-Consulting/WebsiteEval.git | PHP | 154 lines
                    
1<?php
                    
2
                    
3/*
                    
4 * $Id: PresentSelector.php 123 2006-09-14 20:19:08Z mrook $
                    
5 *
                    
98    public function setPresent($fp) {
                    
99        $idx = array_search($fp, self::$filePresence, true);
                    
100        if ( $idx === 0 ) {
                    
                
PluginLoader.php https://github.com/Exercise/zf2.git | PHP | 492 lines
                    
1<?php
                    
2/**
                    
270        if ($path != null) {
                    
271            $pos = array_search($path, $registry[$prefix]);
                    
272            if (false === $pos) {
                    
386        $found     = false;
                    
387        $classFile = str_replace('\\', DIRECTORY_SEPARATOR, $name) . '.php';
                    
388        $incFile   = self::getIncludeFileCache();
                    
482        if (!file_exists(self::$_includeFileCache)) {
                    
483            $file = '<?php';
                    
484        } else {
                    
                
Broker.php https://gitlab.com/LisovyiEvhenii/ismextensions | PHP | 365 lines
                    
1<?php
                    
2/**
                    
23/** Zend_Controller_Plugin_Abstract */
                    
24#require_once 'Zend/Controller/Plugin/Abstract.php';
                    
25
                    
52    {
                    
53        if (false !== array_search($plugin, $this->_plugins, true)) {
                    
54            #require_once 'Zend/Controller/Exception.php';
                    
61            if (isset($this->_plugins[$stackIndex])) {
                    
62                #require_once 'Zend/Controller/Exception.php';
                    
63                throw new Zend_Controller_Exception('Plugin with stackIndex "' . $stackIndex . '" already registered');
                    
97            // Given a plugin object, find it in the array
                    
98            $key = array_search($plugin, $this->_plugins, true);
                    
99            if (false === $key) {
                    
99            if (false === $key) {
                    
100                #require_once 'Zend/Controller/Exception.php';
                    
101                throw new Zend_Controller_Exception('Plugin never registered.');
                    
                
DataFeed.php https://github.com/neek-syndk8/OpenBH-Cash-Generator.git | PHP | 232 lines
                    
1<?php
                    
2/******** Syndk8's OpenBH *********
                    
20/**
                    
21 *   baselibs/DataFeed.php
                    
22 *   The DataFeed class helps us map keywords, urls etc
                    
24 *   Networks either in CSV Format or XML
                    
25 *   For the fmap array check the config/config.php file
                    
26 *
                    
48		if(!array_key_exists('keyword',$this->fmap)) {
                    
49			writeLog("Missing 'keyword' in 'feedmapping' (see config..php)");
                    
50			return false; // ... missing keyword mapping
                    
60                    while(!feof($handle)) {
                    
61                        if (strnatcmp(phpversion(),'5.3.0') >= 0) {
                    
62                            $data = fgetcsv($handle, 10000, OpenBHConf::get('csv_delimiter'), OpenBHConf::get('csv_enclosure'),OpenBHConf::get('csv_escape'));
                    
80                    while(!feof($handle)) {
                    
81                        if (strnatcmp(phpversion(),'5.3.0') >= 0) {
                    
82                            $data = fgetcsv($handle, 10000, OpenBHConf::get('csv_delimiter'), OpenBHConf::get('csv_enclosure'),OpenBHConf::get('csv_escape'));
                    
                
mdbroker.php https://github.com/pjkundert/zguide.git | PHP | 343 lines
                    
1<?php
                    
2/*
                    
6 */
                    
7include_once "zmsg.php";
                    
8include_once "mdp.php";
                    
55        if($this->verbose) {
                    
56            printf("I: MDP broker/0.1.1 is active at %s %s", $endpoint, PHP_EOL);
                    
57        }
                    
77                if($this->verbose) {
                    
78                    echo "I: received message:", PHP_EOL, $zmsg->__toString();
                    
79                }
                    
89                } else {
                    
90                    echo "E: invalid message", PHP_EOL, $zmsg->__toString();
                    
91                }
                    
116                printf("I: deleting expired worker: %s %s",
                    
117                    $worker->identity, PHP_EOL);
                    
118            }
                    
                
qbehaviours.php https://github.com/kpike/moodle.git | PHP | 302 lines
                    
1<?php
                    
2
                    
27
                    
28require_once(dirname(__FILE__) . '/../config.php');
                    
29require_once($CFG->libdir . '/questionlib.php');
                    
29require_once($CFG->libdir . '/questionlib.php');
                    
30require_once($CFG->libdir . '/adminlib.php');
                    
31require_once($CFG->libdir . '/tablelib.php');
                    
38admin_externalpage_setup('manageqbehaviours');
                    
39$thispageurl = new moodle_url('/admin/qbehaviours.php');
                    
40
                    
92
                    
93    if (array_search($disable, $disabledbehaviours) === false) {
                    
94        $disabledbehaviours[] = $disable;
                    
109
                    
110    if (($key = array_search($enable, $disabledbehaviours)) !== false) {
                    
111        unset($disabledbehaviours[$key]);
                    
                
Serializer.php https://gitlab.com/yousafsyed/easternglamor | PHP | 362 lines
                    
1<?php
                    
2/**
                    
23/** Zend_Amf_Constants */
                    
24#require_once 'Zend/Amf/Constants.php';
                    
25
                    
26/** @see Zend_Amf_Parse_Serializer */
                    
27#require_once 'Zend/Amf/Parse/Serializer.php';
                    
28
                    
29/**
                    
30 * Serializer PHP misc types back to there corresponding AMF0 Type Marker.
                    
31 *
                    
65    {
                    
66        // Workaround for PHP5 with E_STRICT enabled complaining about "Only
                    
67        // variables should be passed by reference"
                    
114                    default:
                    
115                        #require_once 'Zend/Amf/Exception.php';
                    
116                        throw new Zend_Amf_Exception("Unknown Type Marker: " . $markerType);
                    
                
cluster.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 179 lines
                    
1<?php
                    
2
                    
74        global $PAGE, $CFG;
                    
75        $addurl = new moodle_url('/mod/lesson/editpage.php', array('id'=>$PAGE->cm->id, 'pageid'=>$previd, 'sesskey'=>sesskey(), 'qtype'=>LESSON_PAGE_CLUSTER));
                    
76        return array('addurl'=>$addurl, 'type'=>LESSON_PAGE_CLUSTER, 'name'=>get_string('addcluster', 'lesson'));
                    
81            if (in_array($subpage->id, $pageviews)) {
                    
82                unset($pageviews[array_search($subpage->id, $pageviews)]);  // remove it
                    
83                // since the user did see one page in the cluster, add the cluster pageid to the viewedpageids
                    
176        $lesson->add_message(get_string('addedcluster', 'lesson'), 'notifysuccess');
                    
177        redirect($CFG->wwwroot.'/mod/lesson/edit.php?id='.$PAGE->cm->id);
                    
178    }
                    
                
select.php https://github.com/mackensen/moodle.git | PHP | 231 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
27
                    
28require_once('HTML/QuickForm/select.php');
                    
29require_once('templatable_form_element.php');
                    
65    /**
                    
66     * Old syntax of class constructor. Deprecated in PHP7.
                    
67     *
                    
121    {
                    
122        $key=array_search($value, $this->_values);
                    
123        if ($key!==FALSE and $key!==null) {
                    
128                unset($this->_options[$key]);
                    
129                // we must reindex the options because the ugly code in quickforms' select.php expects that keys are 0,1,2,3... !?!?
                    
130                $this->_options = array_merge($this->_options);
                    
                
test-loader.php https://github.com/bensochar/phploader.git | PHP | 241 lines
                    
1<?PHP
                    
2/**
                    
10
                    
11include("../loader.php");
                    
12define("YUI_VERSION_TO_TEST", "2.8.0r4");
                    
140<body>
                    
141<form name="mainform" action="<?PHP echo getenv("REQUEST_URI"); ?>">
                    
142
                    
145<ul>
                    
146<?PHP
                    
147    $i = 1;
                    
153    foreach($keys as $name) {
                    
154        $checked = (array_search($name, $modules) !== false) ? "checked" : "";
                    
155        $id = "module$i" . $i++;
                    
162
                    
163<?PHP
                    
164
                    
                
Theme.php https://gitlab.com/staging06/myproject | PHP | 387 lines
                    
1<?php
                    
2/*
                    
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
                    
22*  @copyright  2007-2015 PrestaShop SA
                    
23*  @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
24*  International Registered Trademark & Property of PrestaShop SA
                    
106            foreach ($dirlist as $theme) {
                    
107                if (false !== array_search($theme, $themes_dir)) {
                    
108                    $available_theme[] = $theme;
                    
                
Serializer.php https://github.com/EvanDotPro/zf1-mirror.git | PHP | 362 lines
                    
1<?php
                    
2/**
                    
23/** Zend_Amf_Constants */
                    
24require_once 'Zend/Amf/Constants.php';
                    
25
                    
26/** @see Zend_Amf_Parse_Serializer */
                    
27require_once 'Zend/Amf/Parse/Serializer.php';
                    
28
                    
29/**
                    
30 * Serializer PHP misc types back to there corresponding AMF0 Type Marker.
                    
31 *
                    
65    {
                    
66        // Workaround for PHP5 with E_STRICT enabled complaining about "Only
                    
67        // variables should be passed by reference"
                    
114                    default:
                    
115                        require_once 'Zend/Amf/Exception.php';
                    
116                        throw new Zend_Amf_Exception("Unknown Type Marker: " . $markerType);
                    
                
gk.portal_mode_5.php https://gitlab.com/ppapadatis/Videolearn | PHP | 189 lines
                    
1<?php
                    
2//
                    
132			// searching phrase mootools in scripts paths
                    
133			if(array_search($uri->root().'modules/mod_news_pro_gk4/interface/scripts/engine.portal_mode_5.js', $headData_keys) > 0) {
                    
134				$engine_founded = true;
                    
                
PresentSelector.php https://bitbucket.org/ferOnti/processmaker.git | PHP | 154 lines
                    
1<?php
                    
2
                    
3/*
                    
4 * $Id: PresentSelector.php 3076 2006-12-18 08:52:12Z fabien $
                    
5 *
                    
98    public function setPresent($fp) {
                    
99        $idx = array_search($fp, self::$filePresence, true);
                    
100        if ( $idx === 0 ) {
                    
                
 

Source

Language