100+ results for 'php array_diff'
Not the results you expected?
BaseNotStorageEntityModel.php (https://github.com/sergiygladkyy/OEF.git) PHP · 401 lines
1 <?php
3 require_once('lib/model/base/BaseModel.php');
311 // Validation all fields
312 $err = $this->checkAttributesPrecision(array_diff($names, $not_valid), $options);
314 if (!empty($err))
320 // Validation references
321 $references = array_intersect(array_diff($names, $not_valid), array_keys($this->conf['references']));
322 $err = $this->checkReferences($references);
CurrentView.php (https://github.com/mcguffin/acf-quick-edit-fields.git) PHP · 404 lines
1 <?php
2 /**
3 * @package ACFQuickEdit\Admin
85 ] );
86 // no post type on taxonomies!
87 $this->screen_param = array_diff_key( $this->screen_param, [ 'post_type' => 0 ] );
88 } else if ( $this->object_kind === 'user' ) {
89 }
386 if ( $url ) {
387 parse_str( parse_url( $url, PHP_URL_QUERY ), $filter );
388 }
AdminWebModule.php (https://github.com/Alex8452/Kurogo-Mobile-Web-Doc-Translation.git) PHP · 247 lines
UrlHandler_Test.php (git://github.com/ethna/ethna.git) PHP · 342 lines
1 <?php
2 /**
3 * UrlHandler_Test.php
87 // action ?????
88 $diff = array_diff($injected, $http_vars);
89 $this->assertEqual(count($diff), 1);
90 $this->assertEqual($diff['action_test_foo_bar'], true);
92 // action ??????????????????
93 $diff = array_diff($http_vars, $injected);
94 $this->assertEqual(count($diff), 0);
99 $injected = $this->url_handler->requestToAction($http_vars);
101 $diff = array_diff($injected, $http_vars);
102 $this->assertEqual(count($diff), 1);
103 $this->assertEqual($diff['action_test_foo_bar'], true);
Migrator.php (https://gitlab.com/oytunistrator/92five) PHP · 383 lines
1 <?php namespace Illuminate\Database\Migrations;
3 use Closure;
80 $ran = $this->repository->getRan();
82 $migrations = array_diff($files, $ran);
84 $this->runMigrationList($migrations, $pretend);
217 public function getMigrationFiles($path)
218 {
219 $files = $this->files->glob($path.'/*_*.php');
221 // Once we have the array of files in the directory we will just remove the
226 $files = array_map(function($file)
227 {
228 return str_replace('.php', '', basename($file));
230 }, $files);
TaintFlowGraph.php (https://github.com/vimeo/psalm.git) PHP · 322 lines
Element.php (https://github.com/Imangazaliev/DiDOM.git) PHP · 401 lines
1 <?php
3 namespace DiDom;
144 $segments['classes'] = array_key_exists('classes', $segments) ? $segments['classes'] : [];
146 $diff1 = array_diff($segments['classes'], $classes);
147 $diff2 = array_diff($classes, $segments['classes']);
157 $segments['attributes'] = array_key_exists('attributes', $segments) ? $segments['attributes'] : [];
159 $diff1 = array_diff_assoc($segments['attributes'], $attributes);
160 $diff2 = array_diff_assoc($attributes, $segments['attributes']);
Collection.php (https://gitlab.com/biggercode/Eloquent-Outside-of-Laravel) PHP · 705 lines
BaseDmPermissionForm.class.php (https://github.com/MorskoPrase/diem.git) PHP · 299 lines
local.php (https://gitlab.com/najomie/ljm) PHP · 880 lines
1 <?php
3 class acf_local {
153 if( empty($field_group['local']) ) {
155 $field_group['local'] = 'php';
157 }
224 // clear cache
225 // - delete cache was origional added to ensure changes to JSON / PHP would appear in WP when using memcache
226 // - the downside is that wp_cache_delet is taxing on the system so has been commented out
227 //wp_cache_delete( "get_field/key={$key}", 'acf' );
305 // remove
306 $this->parents[ $parent_key ] = array_diff($this->parents[ $parent_key ], array($field_key));
Group.php (https://github.com/srsree/OurBank.git) PHP · 345 lines
1 <?php
2 /*
3 ############################################################################
20 ?>
22 <?php
23 /*
24 ############################################################################
326 public function insertUpdates($previous,$current,$groupname_id) {
327 $db = $this->getAdapter();
328 $result=array_keys (array_diff($previous,$current));
329 foreach($result as $group) {
330 $table_name='ourbank_groupupdates';
translated-object.php (https://gitlab.com/hop23typhu/bryepoxy) PHP · 272 lines
1 <?php
3 /**
97 $translations = array_map( 'intval', $translations );
98 $translations = array_merge( array( $lang->slug => $id ), $translations ); // make sure this object is in translations
99 $translations = array_diff( $translations, array( 0 ) ); // don't keep non translated languages
100 $translations = array_intersect_key( $translations, array_flip( $this->model->get_languages_list( array( 'fields' => 'slug' ) ) ) ); // keep only valid languages slugs as keys
102 // unlink removed translations
103 $old_translations = $this->get_translations( $id );
104 foreach ( array_diff_assoc( $old_translations, $translations ) as $object_id ) {
105 $this->delete_translation( $object_id );
106 }
119 // take care not to overwrite extra data stored in description field, if any
120 $d = unserialize( $term->description );
121 $d = is_array( $d ) ? array_diff_key( $d, $old_translations ) : array(); // remove old translations
122 $d = array_merge( $d, $translations ); // add new one
123 wp_update_term( $group = (int) $term->term_id, $this->tax_translations, array( 'description' => serialize( $d ) ) );
DefaultOptions.php (https://github.com/Exercise/symfony.git) PHP · 320 lines
1 <?php
3 /*
18 * Helper for specifying and resolving inter-dependent options.
19 *
20 * Options are a common pattern for initializing classes in PHP. Avoiding the
21 * problems related to this approach is however a non-trivial task. Usually,
22 * both classes and subclasses should be able to set default option values.
285 {
286 $knownOptions = $this->options->getNames();
287 $diff = array_diff($optionNames, $knownOptions);
289 if (count($diff) > 0) {
Collect.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 313 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
71 $allModules = $this->fullModuleList->getNames();
72 $enabledModules = $this->moduleList->getNames();
73 $disabledModules = array_diff($allModules, $enabledModules);
75 return $disabledModules;
275 $dbModule = $dbModuleArray[array_search($moduleName, $nameValues)];
276 $changeTest = $dbModule->getData();
277 $changes = array_diff($module, $changeTest);
278 $changesCleanArray = $this->getCleanChangesArray($changes);
BaseStripeClient.php (https://github.com/strangerstudios/paid-memberships-pro.git) PHP · 266 lines
1 <?php
3 namespace Stripe;
188 /**
189 * TODO: replace this with a private constant when we drop support for PHP < 5.
190 *
191 * @return array<string, mixed>
260 // check absence of extra keys
261 $extraConfigKeys = \array_diff(\array_keys($config), \array_keys($this->getDefaultConfig()));
262 if (!empty($extraConfigKeys)) {
263 throw new \Stripe\Exception\InvalidArgumentException('Found unknown key(s) in configuration array: ' . \implode(',', $extraConfigKeys));
functions_picture.inc.php (https://gitlab.com/team_fsn/fsn-php) PHP · 133 lines
1 <?php
2 // +-----------------------------------------------------------------------+
3 // | Piwigo - a PHP based photo gallery |
4 // +-----------------------------------------------------------------------+
5 // | Copyright(C) 2008-2016 Piwigo Team http://piwigo.org |
6 // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
7 // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
8 // +-----------------------------------------------------------------------+
119 global $conf;
121 $params = array_diff_assoc(correct_slideshow_params($decode_params), get_default_slideshow_params());
122 $result = '';
HashMap.class.php (https://bitbucket.org/stk2k/charcoalphp2.1.git) PHP · 386 lines
mo.php (https://gitlab.com/Blueprint-Marketing/wordpress-unit-tests) PHP · 143 lines
widget-layered_nav_filters.php (https://github.com/markjaquith/woocommerce.git) PHP · 109 lines
1 <?php
2 /**
3 * Layered Navigation Fitlers Widget
81 $current_filter = ! empty( $_GET[ 'filter_' . $taxonomy_filter ] ) ? $_GET[ 'filter_' . $taxonomy_filter ] : '';
82 $new_filter = array_map( 'absint', explode( ',', $current_filter ) );
83 $new_filter = array_diff( $new_filter, array( $term_id ) );
85 $link = remove_query_arg( 'filter_' . $taxonomy_filter );
IndexedModel.php (https://gitlab.com/pomirleanu.florentin/Elodex) PHP · 260 lines
1 <?php
3 namespace Elodex;
217 // shouldn't be added to the document are being hidden.
218 $loadedRelations = array_keys($this->relations);
219 $hiddenRelations = array_diff($loadedRelations, $this->indexRelations);
221 if (empty($hiddenRelations)) {
226 $visible = $this->getVisible();
227 if (count($visible) > 0) {
228 $this->setVisible(array_diff($visible, $hiddenRelations));
230 return;
247 if (! empty($this->indexRelations)) {
248 // Don't load already loaded relations
249 $this->load(array_diff($this->indexRelations, array_keys($this->relations)));
250 }
251 }
Shoppingcart.php (https://bitbucket.org/spenna/alexoo_produzione.git) PHP · 203 lines
RBACService.php (https://github.com/liufee/cms.git) PHP · 509 lines
1 <?php
2 /**
3 * Author: lf
277 if( $this->authManager->update($name, $role) ){
278 $permissions = $formModel->getPermissions();
279 $needAdds = array_diff($permissions, $oldPermissions);
280 foreach ($needAdds as $permission){
281 $permission = $this->authManager->getPermission($permission);
283 }
285 $needRemoves = array_diff($oldPermissions, $formModel->getPermissions());
286 foreach ($needRemoves as $permission){
287 $permission = $this->authManager->getPermission($permission);
291 $roles = $formModel->getRoles();
292 $needAdds = array_diff($roles, $oldRoles);
293 foreach ($needAdds as $needAdd){
294 $needAdd = $this->authManager->getRole($needAdd);
content.php (https://bitbucket.org/asosso/joomla25.git) PHP · 240 lines
1 <?php
2 /**
3 * @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
31 JSubMenuHelper::addEntry(
32 JText::_('JGLOBAL_ARTICLES'),
33 'index.php?option=com_content&view=articles',
34 $vName == 'articles'
35 );
36 JSubMenuHelper::addEntry(
37 JText::_('COM_CONTENT_SUBMENU_CATEGORIES'),
38 'index.php?option=com_categories&extension=com_content',
39 $vName == 'categories');
40 JSubMenuHelper::addEntry(
41 JText::_('COM_CONTENT_SUBMENU_FEATURED'),
42 'index.php?option=com_content&view=featured',
43 $vName == 'featured'
44 );
FileSystem.php (https://github.com/shevron/zf2.git) PHP · 257 lines
Model.php (https://github.com/mbegoc/lighter.git) PHP · 166 lines
content.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) PHP · 240 lines
1 <?php
2 /**
3 * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
31 JSubMenuHelper::addEntry(
32 JText::_('JGLOBAL_ARTICLES'),
33 'index.php?option=com_content&view=articles',
34 $vName == 'articles'
35 );
36 JSubMenuHelper::addEntry(
37 JText::_('COM_CONTENT_SUBMENU_CATEGORIES'),
38 'index.php?option=com_categories&extension=com_content',
39 $vName == 'categories');
40 JSubMenuHelper::addEntry(
41 JText::_('COM_CONTENT_SUBMENU_FEATURED'),
42 'index.php?option=com_content&view=featured',
43 $vName == 'featured'
44 );
ResourceRegistrar.php (https://gitlab.com/kimting254/wbms) PHP · 392 lines
FormFactory.php (https://github.com/castillojorge/SemdropsMobile.git) PHP · 401 lines
Save.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 363 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
81 /**
82 * @return bool
83 * @SuppressWarnings(PHPMD.BooleanGetMethodName)
84 * @codeCoverageIgnore
85 */
244 * @param \Magento\Framework\DataObject $item
245 * @return bool
246 * @SuppressWarnings(PHPMD.BooleanGetMethodName)
247 */
248 public function getIsAllowedQuoteItem($item)
295 }
297 $allowedItems = array_diff($allowedItems, $deleteAllowedItems);
299 $this->setAllowQuoteItems($allowedItems);
ResourceRegistrar.php (https://gitlab.com/rocs/Streaming-Safe-for-Kids) PHP · 421 lines
class-admin-editor-specific-replace-vars.php (https://gitlab.com/suporte.spturis/carnaval2015.spturis.com.br) PHP · 227 lines
ConfigDependencies.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 275 lines
1 <?php
3 namespace Drupal\rest\Entity;
167 foreach ($removed_formats as $format) {
168 if (in_array($format, $rest_config->getFormats($request_method), TRUE)) {
169 $configuration[$request_method]['supported_formats'] = array_diff($configuration[$request_method]['supported_formats'], $removed_formats);
170 }
171 }
172 foreach ($removed_auth as $auth) {
173 if (in_array($auth, $rest_config->getAuthenticationProviders($request_method), TRUE)) {
174 $configuration[$request_method]['supported_auth'] = array_diff($configuration[$request_method]['supported_auth'], $removed_auth);
175 }
176 }
236 foreach ($removed_formats as $format) {
237 if (in_array($format, $rest_config->getFormats($first_method), TRUE)) {
238 $configuration['formats'] = array_diff($configuration['formats'], $removed_formats);
239 }
240 }
template.php (https://gitlab.com/Rad1calDreamer/honey) PHP · 110 lines
8 */
9 $link = GetPagePath(false, false)."?".http_build_query(
10 array_diff_key(
11 $_REQUEST,
12 array_flip(
87 {
88 ob_start();
89 include(__DIR__."/form.php");
90 $arResult["OUTPUT_LIST"]["HTML"] = ob_get_clean().$arResult["OUTPUT_LIST"]["HTML"];
91 }
95 $APPLICATION->RestartBuffer();
96 while(ob_get_clean());
97 echo CUtil::PhpToJSObject(array(
98 "TEXT" => $arResult["OUTPUT_LIST"]["HTML"],
99 "POST_NUM_COMMENTS" => intval($arResult["Post"]["NUM_COMMENTS"])
class-wc-predictive-search-metabox.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) PHP · 79 lines
1 <?php
2 /**
3 * Predictive Search Meta
45 #woo_predictive_upgrade_area_box legend {margin-left:4px; font-weight:bold;}
46 </style>
47 <fieldset id="woo_predictive_upgrade_area_box"><legend><?php _e('Upgrade to','woops'); ?> <a href="<?php echo WOOPS_AUTHOR_URI; ?>" target="_blank"><?php _e('Pro Version', 'woops'); ?></a> <?php _e('to activate', 'woops'); ?></legend>
48 <table class="form-table" cellspacing="0">
49 <tr valign="top">
50 <th scope="rpw" class="titledesc"><label for="_predictive_search_focuskw"><?php _e('Focus Keywords', 'woops'); ?></label></th>
51 <td class="forminp"><div class="wide_div"><input type="text" value="" id="_predictive_search_focuskw" name="_predictive_search_focuskw" style="width:98%;" /></div></td>
52 </tr>
53 </table>
54 </fieldset>
55 <?php
57 }
RollbackAction.php (https://github.com/Seizam/seizamcore.git) PHP · 122 lines
sfDoctrineCleanModelFilesTask.class.php (https://github.com/bheneka/gitta.git) PHP · 119 lines
1 <?php
3 /*
9 */
11 require_once(dirname(__FILE__).'/sfDoctrineBaseTask.class.php');
13 /**
56 // remove any models present in the filesystem but not in the yaml schema
57 if ($modelsToRemove = array_diff($this->getFileModels($config['models_path']), array_keys($yamlSchema)))
58 {
59 $deleteModelFiles->run($modelsToRemove, array('no-confirmation' => $options['no-confirmation']));
BaseAlbaConfig.php (https://github.com/proyectoalba/alba.git) PHP · 420 lines
1 <?php
100 public function hasOnlyDefaultValues()
101 {
102 if (array_diff($this->modifiedColumns, array())) {
103 return false;
104 }
278 public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
279 {
280 $pos = AlbaConfigPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
304 public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true)
305 {
306 $keys = AlbaConfigPeer::getFieldNames($keyType);
sharelib.php (https://gitlab.com/ElvisAns/tiki) PHP · 306 lines
1 <?php
3 // (c) Copyright by authors of the Tiki Wiki CMS Groupware Project
123 // Remove redundant permissions
124 $permissions = array_diff($permissions, array_keys($this->groupPerm));
125 $permissions = array_diff($permissions, array_keys($this->categPerm));
267 global $Tiki_ShareObject__groups;
269 return array_diff($Tiki_ShareObject__groups, array_keys($this->validGroups));
270 }
ks_prefreport.php (https://gitlab.com/ElvisAns/tiki) PHP · 229 lines
1 <?php
3 // (c) Copyright by authors of the Tiki Wiki CMS Groupware Project
11 // Usage: From the command line:
12 // php doc/devtools/prefreport.php
13 // resulting file can be found at dump/prefreport.txt
14 //
15 // also check out doc/devtools/securitycheck.php to see in which files are
16 // used each pref (and permission name too)
17 //
19 $ourFileName = "dump/prefreport.txt";
21 require_once 'tiki-setup.php';
22 $prefslib = TikiLib::lib('prefs');
Courses.php (https://github.com/omegaup/omegaup.git) PHP · 284 lines
Session.php (https://github.com/sebio/symfony.git) PHP · 289 lines
app.php (https://github.com/shanchengren/darky.git) PHP · 139 lines
1 <?php
3 class appmodel {
55 $col[] = substr($rt['Field'], 3);
56 }
57 if ($addcol = array_diff($apps, $col)) {
58 $sql = '';
59 foreach ($addcol as $v) {
62 $this->db->query("ALTER TABLE $table " . rtrim($sql, ','));
63 }
64 if ($delcol = array_diff($col, $apps)) {
65 $sql = '';
66 foreach ($delcol as $v) {
76 $params['mode'] = $mode;
77 $params['method'] = $method;
78 $params['format'] = 'PHP';
79 $params['charset'] = 'gbk';
80 $params['type'] = 'uc';
BaseObject.php (https://github.com/xmeltrut/SocietasPro.git) PHP · 185 lines
Base.php (https://github.com/ewandor/horde.git) PHP · 315 lines
PhpClass.php (https://github.com/agelang/zf2.git) PHP · 562 lines
30 * @uses \Zend\CodeGenerator\Php\Exception
31 * @uses \Zend\CodeGenerator\Php\PhpMember\MemberContainer
32 * @uses \Zend\CodeGenerator\Php\PhpMethod
147 * setPhpFile()
148 *
149 * @param Zend\CodeGenerator\Php\PhpFile $phpFile
150 */
151 public function setPhpFile(PhpFile $phpFile)
331 * setProperty()
332 *
333 * @param array|\Zend\CodeGenerator\Php\PhpProperty $property
334 * @return \Zend\CodeGenerator\Php\PhpClass
558 $this->_properties = new PhpMember\MemberContainer(PhpMember\MemberContainer::TYPE_PROPERTY);
559 $this->_methods = new PhpMember\MemberContainer(PhpMember\MemberContainer::TYPE_METHOD);
560 }
view.php (https://github.com/shafiqissani/Jewelery-Ecommerce-.git) PHP · 150 lines
1 <?php
2 /**
3 * @version $Id: view.php 10707 2008-08-21 09:52:47Z eddieajau $
5 * @subpackage Cache
6 * @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
7 * @license GNU/GPL, see LICENSE.php
8 * Joomla! is free software. This version may have been modified pursuant
9 * to the GNU General Public License, and as distributed it includes or
10 * is derivative of works licensed under the GNU General Public License or
11 * other free or open source software licenses.
12 * See COPYRIGHT.php for copyright notices and details.
13 */
128 // Compare the second module buffer against the first buffer.
129 $cached['module'] = array_diff_assoc($buffer2['module'], $buffer1['module']);
131 // Store the cache data
ARC2_StoreTableManager.php (https://github.com/mterenzio/FollowThis.git) PHP · 290 lines
Apriori.php (https://gitlab.com/unofficial-mirrors/moodle) PHP · 345 lines
1 <?php
3 declare(strict_types=1);
5 namespace Phpml\Association;
7 use Phpml\Helper\Predictable;
234 foreach ($samples as $p) {
235 foreach ($samples as $q) {
236 if (count(array_merge(array_diff($p, $q), array_diff($q, $p))) != 2) {
237 continue;
238 }
341 private function equals(array $set1, array $set2) : bool
342 {
343 return array_diff($set1, $set2) == array_diff($set2, $set1);
344 }
345 }
ArrayHelper.php (https://github.com/hanfer2/Talentos.git) PHP · 162 lines
1 <?php
3 if (!function_exists('array_combine')) {
29 */
30 function is_assoc($array) {
31 return (is_array($array) && (0 !== count(array_diff_key($array, array_keys(array_keys($array)))) || count($array) == 0));
32 }
115 }
117 if (!function_exists('array_diff_key')) {
119 function array_diff_key() {
Abstract.php (https://github.com/maintainable/framework.git) PHP · 197 lines
1 <?php
2 /**
3 * Copyright 2007 Maintainable Software, LLC
7 * @author Derek DeVries <derek@maintainable.com>
8 * @author Chuck Hagenbuch <chuck@horde.org>
9 * @license http://opensource.org/licenses/bsd-license.php
10 * @category Horde
11 * @package Horde_Db
17 * @author Derek DeVries <derek@maintainable.com>
18 * @author Chuck Hagenbuch <chuck@horde.org>
19 * @license http://opensource.org/licenses/bsd-license.php
20 * @category Horde
21 * @package Horde_Db
157 // check required config keys are present
158 $required = array('adapter', 'username');
159 $diff = array_diff_key(array_flip($required), $this->_config);
160 if (! empty($diff)) {
161 $msg = 'Required config missing: ' . implode(', ', array_keys($diff));
tag.php (https://github.com/zcopley/gallery3.git) PHP · 141 lines
1 <?php defined("SYSPATH") or die("No direct script access.");
2 /**
3 * Gallery - a web based photo album viewer and editor
81 if (isset($this->object_relations["items"])) {
82 $added = array_diff($this->changed_relations["items"], $this->object_relations["items"]);
83 $removed = array_diff($this->object_relations["items"], $this->changed_relations["items"]);
128 /**
129 * Return the server-relative url to this item, eg:
130 * /gallery3/index.php/tags/35
131 *
132 * @param string $query the query string (eg "page=3")
Migrator.php (https://gitlab.com/MineYourMind/BoNeMEAL) PHP · 411 lines
1 <?php namespace Illuminate\Database\Migrations;
3 use Illuminate\Filesystem\Filesystem;
76 $ran = $this->repository->getRan();
78 $migrations = array_diff($files, $ran);
80 $this->requireFiles($path, $migrations);
242 public function getMigrationFiles($path)
243 {
244 $files = $this->files->glob($path.'/*_*.php');
246 // Once we have the array of files in the directory we will just remove the
251 $files = array_map(function($file)
252 {
253 return str_replace('.php', '', basename($file));
255 }, $files);
Class.php (https://github.com/kervin/kyzstudio.git) PHP · 513 lines
34 * @see Zend_CodeGenerator_Php_Method
35 */
36 #require_once 'Zend/CodeGenerator/Php/Method.php';
38 /**
39 * @see Zend_CodeGenerator_Php_Property
40 */
41 #require_once 'Zend/CodeGenerator/Php/Property.php';
43 /**
44 * @see Zend_CodeGenerator_Php_Docblock
45 */
46 #require_once 'Zend/CodeGenerator/Php/Docblock.php';
48 /**
160 #require_once 'Zend/CodeGenerator/Php/Exception.php';
161 throw new Zend_CodeGenerator_Php_Exception('setDocblock() is expecting either a string, array or an instance of Zend_CodeGenerator_Php_Docblock');
162 }
TreeWalkerChain.php (https://github.com/jaikdean/doctrine2.git) PHP · 542 lines
1 <?php
3 declare(strict_types=1);
5 namespace Doctrine\ORM\Query;
7 use function array_diff;
8 use function array_keys;
46 $requiredKeys = ['metadata', 'parent', 'relation', 'map', 'nestingLevel', 'token'];
48 if (array_diff($requiredKeys, array_keys($queryComponent))) {
49 throw QueryException::invalidQueryComponent($dqlAlias);
50 }
class-yoast-plugin-conflict.php (https://gitlab.com/gabdark/aceit) PHP · 333 lines
1 <?php
2 /**
3 * @package WPSEO\Admin
116 public function get_conflicting_plugins_as_string( $plugin_section ) {
117 if ( ! function_exists( 'get_plugin_data' ) ) {
118 require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
119 }
159 * This happens when Sitemaps or OpenGraph implementations toggle active/disabled.
160 */
161 $inactive_sections = array_diff( $all_plugin_sections, $sections );
162 if ( ! empty( $inactive_sections ) ) {
163 foreach ( $inactive_sections as $section ) {
173 // If there are active plugins, filter them from being cleared.
174 if ( isset( $this->active_plugins[ $section ] ) ) {
175 $inactive_plugins = array_diff( $this->plugins[ $section ], $this->active_plugins[ $section ] );
176 }
TSqlMapStatement.php (https://bitbucket.org/volatileeight/prado.git) PHP · 444 lines
1 <?php
2 /**
3 * TSqlMapStatement, TSqlMapInsert, TSqlMapUpdate, TSqlMapDelete,
88 * If a {@link ParameterMap setParameterMap()} property is not specified,
89 * you may specify a ParameterClass instead and use inline parameters.
90 * The value of the parameterClass attribute can be any existing PHP class name.
91 * @param string parameter class name.
92 */
125 * If a {@link ResultMap setResultMap()} is not specified, you may specify a
126 * ResultClass instead. The value of the ResultClass property can be the
127 * name of a PHP class or primitives like integer, string, or array. The
128 * class specified will be automatically mapped to the columns in the
129 * result, based on the result metadata.
185 /**
186 * @return string name of a PHP class that implements ArrayAccess.
187 */
188 public function getListClass()
Class.php (https://github.com/tanduy/zf.git) PHP · 513 lines
29 * @see Zend_CodeGenerator_Php_Member_Container
30 */
31 require_once 'Zend/CodeGenerator/Php/Member/Container.php';
33 /**
34 * @see Zend_CodeGenerator_Php_Method
35 */
36 require_once 'Zend/CodeGenerator/Php/Method.php';
38 /**
39 * @see Zend_CodeGenerator_Php_Property
40 */
41 require_once 'Zend/CodeGenerator/Php/Property.php';
43 /**
159 } elseif (!$docblock instanceof Zend_CodeGenerator_Php_Docblock) {
160 require_once 'Zend/CodeGenerator/Php/Exception.php';
161 throw new Zend_CodeGenerator_Php_Exception('setDocblock() is expecting either a string, array or an instance of Zend_CodeGenerator_Php_Docblock');
PlantController.php (https://github.com/karthikprashanth/mayalabs.git) PHP · 236 lines
1 <?php
3 class PlantController extends Zend_Controller_Action {
109 $this->view->plantId = $plantId;
110 $content = array_merge($form->partPlant1->getValues(), $form->partPlant2->getValues(), $form->partPlant3->getValues());
111 if (count(array_diff($content, $plantDet)) > 0) {
112 $nf = new Model_DbTable_Notification();
113 $nf->add($plantId, 'plant', 0);
OptionsResolver.php (https://github.com/r1pp3rj4ck/symfony.git) PHP · 352 lines
1 <?php
3 /*
247 private function validateOptionsExistence(array $options)
248 {
249 $diff = array_diff_key($options, $this->knownOptions);
251 if (count($diff) > 0) {
271 private function validateOptionsCompleteness(array $options)
272 {
273 $diff = array_diff_key($this->requiredOptions, $options);
275 if (count($diff) > 0) {
view.php (https://bitbucket.org/stager94/skmz-joomla.git) PHP · 150 lines
1 <?php
2 /**
3 * @version $Id: view.php 14401 2010-01-26 14:10:00Z louis $
5 * @subpackage Cache
6 * @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
7 * @license GNU/GPL, see LICENSE.php
8 * Joomla! is free software. This version may have been modified pursuant
9 * to the GNU General Public License, and as distributed it includes or
10 * is derivative of works licensed under the GNU General Public License or
11 * other free or open source software licenses.
12 * See COPYRIGHT.php for copyright notices and details.
13 */
128 // Compare the second module buffer against the first buffer.
129 $cached['module'] = array_diff_assoc($buffer2['module'], $buffer1['module']);
131 // Store the cache data
sfValidatorBase.class.php (https://github.com/vvstadnyk/googlemap.git) PHP · 498 lines
1 <?php
3 /*
17 * @subpackage validator
18 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
19 * @version SVN: $Id: sfValidatorBase.class.php 32653 2011-06-15 18:32:02Z fabien $
20 */
21 abstract class sfValidatorBase
64 // check option names
65 if ($diff = array_diff($optionKeys, array_merge($currentOptionKeys, $this->requiredOptions)))
66 {
67 throw new InvalidArgumentException(sprintf('%s does not support the following options: \'%s\'.', get_class($this), implode('\', \'', $diff)));
70 // check error code names
71 if ($diff = array_diff(array_keys($messages), array_keys($this->messages)))
72 {
73 throw new InvalidArgumentException(sprintf('%s does not support the following error codes: \'%s\'.', get_class($this), implode('\', \'', $diff)));
Chain.php (https://gitlab.com/ebrjose/comcebu) PHP · 412 lines
1 <?php
3 namespace WPForms\Helpers;
13 * @method Chain array_combine()
14 * @method Chain array_count_values()
15 * @method Chain array_diff_assoc()
16 * @method Chain array_diff_key()
17 * @method Chain array_diff_uassoc()
18 * @method Chain array_diff_ukey()
19 * @method Chain array_diff(array $var)
20 * @method Chain array_fill_keys()
21 * @method Chain array_fill()
296 'array_combine',
297 'array_count_values',
298 'array_diff_assoc',
299 'array_diff_key',
YamlFileLoader.php (https://github.com/deviantintegral/symfony.git) PHP · 223 lines
1 <?php
3 /*
193 throw new \InvalidArgumentException(sprintf('The definition of "%s" in "%s" must be a YAML array.', $name, $path));
194 }
195 if ($extraKeys = array_diff(array_keys($config), self::$availableKeys)) {
196 throw new \InvalidArgumentException(sprintf(
197 'The routing file "%s" contains unsupported keys for "%s": "%s". Expected one of: "%s".',
BaseaMediaCategoryForm.class.php (https://github.com/arturolinares/asandbox.git) PHP · 160 lines
1 <?php
3 /**
9 * @subpackage form
10 * @author Your name here
11 * @version SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
12 */
13 abstract class BaseaMediaCategoryForm extends BaseFormDoctrine
107 }
109 $unlink = array_diff($existing, $values);
110 if (count($unlink))
111 {
113 }
115 $link = array_diff($values, $existing);
116 if (count($link))
117 {
database.php (https://github.com/dionyziz/blogcube.git) PHP · 258 lines
1 <?php
2 /*
3 Module: Database stabilization
4 File: /modules/stabilize/database.php
5 Developers: dionyziz, feedWARd
6 */
216 //drop tables
217 $todrop = array_diff($stable_table_names,$beta_table_names);
218 $curquery = "";
219 foreach($todrop as $ctablename) {
228 //create tables
229 $tocreate = array_diff($beta_table_names,$stable_table_names);
230 foreach($tocreate as $ctablename) {
231 $curtable = New BCDbTable($ctablename,$beta_database);
Alias.php (https://gitlab.com/ElvisAns/tiki) PHP · 221 lines
menu.php (https://gitlab.com/wildanoo/E-procurement) PHP · 105 lines
1 <?php
2 defined('BASEPATH') OR exit('No direct script access allowed');
92 if(in_array($idgroup,$existgroup)){
93 $idgroup = array($idgroup);
94 $delgroup = array_diff($existgroup,$idgroup);
95 $delgroup = implode(',',$delgroup);
96 $delgroup = array('groups'=>$delgroup);
102 }
104 /* End of file menu.php */
105 /* Location: ./application/controllers/menu.php */
PermissibleAco.php (https://github.com/kiang/olc_baker.git) PHP · 313 lines
1 <?php
3 /**
262 $app_cont = get_class_methods($app_cont);
263 foreach ($controllers[1] as $file) {
264 if (substr($file, -14) === 'Controller.php') {
265 $cont = Inflector::camelize(substr($file, 0, -4));
266 $controllerName = substr($cont, 0, -10);
270 if (App::import('Controller', $controllerName)) {
271 $cont_clas = new $cont();
272 $methods = array_diff(get_class_methods($cont_clas), $app_cont);
273 foreach ($methods as $key => $method) {
274 if (substr($method, 0, 1) === '_') {
290 $plug_cont = get_class_methods($plug_cont);
291 foreach ($controllers[1] as $file) {
292 if (substr($file, -14) === 'Controller.php') {
293 $cont = Inflector::camelize(substr($file, 0, -4));
294 if (App::import('Controller', $plugin . '.' . substr($cont, 0, -10))) {
MemcachedOptions.php (https://github.com/christeredvartsen/zf2.git) PHP · 300 lines
220 * @param array $libOptions
221 * @return MemcachedOptions
222 * @link http://php.net/manual/memcached.constants.php
223 */
224 public function setLibOptions(array $libOptions)
242 * @param mixed $value
243 * @return MemcachedOptions
244 * @link http://php.net/manual/memcached.constants.php
245 */
246 public function setLibOption($key, $value)
257 *
258 * @return array
259 * @link http://php.net/manual/memcached.constants.php
260 */
261 public function getLibOptions()
Mapper.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 407 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
12 /**
13 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
14 */
15 class Mapper
106 * @throws \InvalidArgumentException
107 * @throws StateException
108 * @SuppressWarnings(PHPMD.CyclomaticComplexity)
109 */
110 private function mapQuery($queryName)
295 {
296 $allElements = array_keys($elements);
297 $notUsedElements = implode(', ', array_diff($allElements, $mappedElements));
298 if (!empty($notUsedElements)) {
299 throw new StateException(new Phrase($errorMessage, [$notUsedElements]));
DatabaseBatchRepository.php (https://gitlab.com/jjpa2018/dashboard) PHP · 347 lines
array.idl.php (https://github.com/diegoIta/hiphop-php.git) PHP · 376 lines
1 <?php
3 include_once 'base.php';
227 ///////////////////////////////////////////////////////////////////////////////
229 f('array_diff', Variant,
230 array('array1' => Variant,
231 'array2' => Variant),
238 VariableArguments);
240 f('array_diff_assoc', Variant,
241 array('array1' => Variant,
242 'array2' => Variant),
243 VariableArguments | FunctionIsFoldable);
245 f('array_diff_uassoc', Variant,
246 array('array1' => Variant,
247 'array2' => Variant,
ezurlaliasquery.php (https://bitbucket.org/ericsagnes/ezpublish-multisite.git) PHP · 339 lines
1 <?php
2 /**
3 * File containing the eZURLAliasFilter class.
11 /*!
12 \class eZURLAliasQuery ezurlaliasquery.php
13 \brief Handles querying of URL aliases with different filters
30 /*!
31 \todo The hasAttribute, attribute and setAttribute functions can be turned into properties for PHP 5.
32 */
33 class eZURLAliasQuery
103 {
104 return in_array( $name,
105 array_diff( get_object_vars( $this ),
106 array( 'query' ) ) );
107 }
RemoteAddress.php (https://gitlab.com/jalon/doadoronline) PHP · 172 lines
indexable-repository.php (https://gitlab.com/VTTE/sitios-vtte) PHP · 432 lines
Migrator.php (https://gitlab.com/judielsm/Handora) PHP · 405 lines
1 <?php
3 namespace Illuminate\Database\Migrations;
79 $ran = $this->repository->getRan();
81 $migrations = array_diff($files, $ran);
83 $this->requireFiles($path, $migrations);
237 public function getMigrationFiles($path)
238 {
239 $files = $this->files->glob($path.'/*_*.php');
241 // Once we have the array of files in the directory we will just remove the
248 $files = array_map(function ($file) {
249 return str_replace('.php', '', basename($file));
251 }, $files);
ConfigurationSettings.php (https://github.com/wiki-data/wiki-data.git) PHP · 408 lines
1 <?php
2 if ( !defined( 'MEDIAWIKI' ) ) die();
42 wfProfileIn( __METHOD__ );
44 require( dirname( __FILE__ ) . '/Settings-core.php' );
45 $this->settings = $settings;
46 $this->arrayDefs = $arrayDefs;
240 }
241 }
242 $wgConfigureNotEditableSettings = array_diff( $coreSettings, $wgConfigureEditableSettings );
243 }
Profile.php (https://github.com/chaikk/core.git) PHP · 124 lines
1 <?php
2 // vim: set ts=4 sw=4 sts=4 et:
10 * that is bundled with this package in the file LICENSE.txt.
11 * It is also available through the world-wide-web at this URL:
12 * http://opensource.org/licenses/osl-3.0.php
13 * If you did not receive a copy of the license and are unable to
14 * obtain it through the world-wide-web, please send an email
20 * @author Creative Development LLC <info@cdev.ru>
21 * @copyright Copyright (c) 2011 Creative Development LLC <info@cdev.ru>. All rights reserved
22 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
23 * @link http://www.litecommerce.com/
24 * @see ____file_see____
112 // Get roles to add
113 $rolesToAdd = array_diff($newDrupalRoles, $processedRoles);
115 // Create new roles
Symbol.php (https://github.com/Nerutiz/trades.git) PHP · 252 lines
1 <?php
3 class Symbol {
247 $second = is_array($this->second) ? ('[' . implode(', ', $this->second) . ']') : $this->second;
248 $third = is_array($this->third) ? ('[' . implode(', ', $this->third) . ']') : $this->third;
249 $out = array_diff(array($this->id, $first, $second, $third), array(NULL));
250 return '(' . implode(' ', $out) . ')';
251 }
class-ss-wc-widget-layered-nav-filters.php (https://gitlab.com/aristath/shoestrap-3-woocommerce-child) PHP · 103 lines
1 <?php
2 /**
3 * Layered Navigation Fitlers Widget
73 $current_filter = ! empty( $_GET[ 'filter_' . $taxonomy_filter ] ) ? $_GET[ 'filter_' . $taxonomy_filter ] : '';
74 $new_filter = array_map( 'absint', explode( ',', $current_filter ) );
75 $new_filter = array_diff( $new_filter, array( $term_id ) );
77 $link = remove_query_arg( 'filter_' . $taxonomy_filter );
class-data-settings.php (https://gitlab.com/chernushov881/charity-fund) PHP · 354 lines
1 <?php
2 /**
3 * The Data Settings class.
327 if ( in_array( $current_filter, Default_Filter_Settings::ASSOCIATIVE_FILTERS, true ) ) {
328 $extra_filters = array_diff_key( $filtered_values, $this->get_default_setting_for_filter( $current_filter ) );
329 $this->add_associative_filter_setting( $current_filter, $extra_filters );
330 return static::$data_settings[ $current_filter ];
331 }
333 $extra_filters = array_diff( $filtered_values, $this->get_default_setting_for_filter( $current_filter ) );
334 $this->add_indexed_filter_setting( $current_filter, $extra_filters );
335 return static::$data_settings[ $current_filter ];
Builder.php (https://github.com/Smile-SA/elasticsuite.git) PHP · 275 lines
1 <?php
2 /**
3 * DISCLAIMER
29 /**
30 * ElasticSuite search requests builder.
31 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
32 *
33 * @category Smile
149 $facets = array_merge($facets, $containerAggs);
150 $facetFilters = array_intersect_key($filters, $facets);
151 $queryFilters = array_merge($queryFilters, $containerFilters, array_diff_key($filters, $facetFilters));
153 $spellingType = SpellcheckerInterface::SPELLING_TYPE_EXACT;
default_mods.php (https://github.com/harriswong/ATutor.git) PHP · 202 lines
1 <?php
2 /****************************************************************/
3 /* ATutor */
15 define('AT_INCLUDE_PATH', '../../../../include/');
16 require (AT_INCLUDE_PATH.'vitals.inc.php');
17 admin_authenticate(AT_ADMIN_PRIV_ADMIN);
19 if (isset($_POST['cancel'])) {
20 $msg->addFeedback('CANCELLED');
21 header('Location: courses.php');
22 exit;
23 }
154 $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
155 header('Location: '.$_SERVER['PHP_SELF']);
156 exit;
157 }
EntityAttribute.php (https://github.com/sunel/eav.git) PHP · 295 lines
class.wp-dependencies.php (https://gitlab.com/morganestes/wordpress-develop) PHP · 411 lines
1 <?php
2 /**
3 * Dependencies API: WP_Dependencies base class
166 if ( ! isset( $this->registered[ $handle ] ) ) {
167 $keep_going = false; // Item doesn't exist.
168 } elseif ( $this->registered[ $handle ]->deps && array_diff( $this->registered[ $handle ]->deps, array_keys( $this->registered ) ) ) {
169 $keep_going = false; // Item requires dependencies that don't exist.
170 } elseif ( $this->registered[ $handle ]->deps && ! $this->all_deps( $this->registered[ $handle ]->deps, true, $new_group ) ) {
image-widget.php (https://github.com/livinglab/openlab.git) PHP · 223 lines
1 <?php
2 /**
3 * Migration from Jetpack's Image Widget to WordPress' Core Image Widget.
73 // Not all widgets have conditions, so lets add it in.
74 $widget_copy = array_merge( array( 'conditions' => null ), $widget );
75 $non_allowed_keys = array_diff_key(
76 $widget_copy,
77 array(
107 // Unsetting old widget fields
108 $media_image[ $id ] = array_diff_key( $media_image[ $id ], array(
109 'align' => false,
110 'alt_text' => false,
218 function jetpack_refresh_on_widget_page( $current ) {
219 if ( 'widgets' === $current->base ) {
220 wp_safe_redirect( admin_url( 'widgets.php' ) );
221 exit;
222 }
fine.php (https://bitbucket.org/dmcnerney/hockey-registration-system.git) PHP · 194 lines
class-wcs-privacy-background-updater.php (https://gitlab.com/remyvianne/krowkaramel) PHP · 222 lines
RouteCollection.php (https://gitlab.com/Pasantias/pasantiasASLG) PHP · 314 lines
Tags.php (https://github.com/jaws-project/jaws.git) PHP · 434 lines
1 <?php
2 /**
3 * Tags Gadget Admin
41 }
43 $to_be_added_tags = array_diff($tags, $oldTags);
44 $res = $this->InsertReferenceTags(
45 $gadget, $action, $reference, $published,
50 }
52 $to_be_removed_tags = array_diff($oldTags, $tags);
53 $res = $this->DeleteReferenceTags($gadget, $action, $reference, $to_be_removed_tags, $user);
54 if (Jaws_Error::IsError($res)) {
class.wp-scripts.php (https://bitbucket.org/akeda/bmw-id-hris.git) PHP · 244 lines
1 <?php
2 /**
3 * BackPress Scripts enqueue.
93 if ( false === $group && in_array($handle, $this->in_footer, true) )
94 $this->in_footer = array_diff( $this->in_footer, (array) $handle );
96 if ( null === $this->registered[$handle]->ver )
133 $src = add_query_arg('ver', $ver, $src);
135 /** This filter is documented in wp-includes/class.wp-scripts.php */
136 $src = esc_url( apply_filters( 'script_loader_src', $src, $handle ) );
php-array.el (https://gitlab.com/_njdm/emacs.d) Emacs Lisp · 718 lines
21 ;; Arrays handling functions
22 ;; http://php.net/manual/en/ref.array.php
23 ;; file:///usr/share/doc/php-doc/html/ref.array.html
64 )
66 (define-skeleton php-array_diff_assoc
67 "Insert an array_diff_assoc statement. Computes the difference of arrays with additional index check"
74 )
76 (define-skeleton php-array_diff_key
77 "Insert an array_diff_key statement. Computes the difference of arrays using keys for comparison"
87 (define-skeleton php-array_diff_uassoc
88 "Insert an array_diff_uassoc statement."
RedisSessionHandler.php (https://gitlab.com/nmhieucoder/laravel_tintuc) PHP · 132 lines
1 <?php
3 /*
18 /**
19 * Redis based session storage handler based on the Redis class
20 * provided by the PHP redis extension.
21 *
22 * @author Dalibor Karlović <dalibor@flexolabs.io>
58 }
60 if ($diff = array_diff(array_keys($options), ['prefix', 'ttl'])) {
61 throw new \InvalidArgumentException(sprintf('The following options are not supported "%s".', implode(', ', $diff)));
62 }
Util.php (https://gitlab.com/jeann2015/secret) PHP · 291 lines
Class.php (https://github.com/massiveart/ZF-ZOOLU.git) PHP · 513 lines
34 * @see Zend_CodeGenerator_Php_Method
35 */
36 require_once 'Zend/CodeGenerator/Php/Method.php';
38 /**
39 * @see Zend_CodeGenerator_Php_Property
40 */
41 require_once 'Zend/CodeGenerator/Php/Property.php';
43 /**
44 * @see Zend_CodeGenerator_Php_Docblock
45 */
46 require_once 'Zend/CodeGenerator/Php/Docblock.php';
48 /**
160 require_once 'Zend/CodeGenerator/Php/Exception.php';
161 throw new Zend_CodeGenerator_Php_Exception('setDocblock() is expecting either a string, array or an instance of Zend_CodeGenerator_Php_Docblock');
162 }
prefreport.php (https://gitlab.com/ElvisAns/tiki) PHP · 218 lines
1 <?php
3 // (c) Copyright by authors of the Tiki Wiki CMS Groupware Project
9 // Usage: From the command line:
10 // php doc/devtools/prefreport.php > prefreport.csv
11 //
12 // also check out doc/devtools/securitycheck.php to see in which files are
14 //
16 require_once 'tiki-setup.php';
17 $prefslib = TikiLib::lib('prefs');
81 $data = [];
83 foreach (glob('lib/prefs/*.php') as $file) {
84 $name = substr(basename($file), 0, -4);
85 $function = "prefs_{$name}_list";
Part.php (https://github.com/leerbag/zf2.git) PHP · 215 lines
MediaField.php (https://github.com/fastslack/joomla-cms.git) PHP · 273 lines
1 <?php
2 /**
3 * Joomla! Content Management System
245 {
246 $this->folder = explode('/', $this->value);
247 $this->folder = array_diff_assoc($this->folder, explode('/', ComponentHelper::getParams('com_media')->get('image_path', 'images')));
248 array_pop($this->folder);
249 $this->folder = implode('/', $this->folder);
WorkspaceAssociation.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 249 lines
1 <?php
3 namespace Drupal\workspaces;
90 // Insert a new index entry for each workspace that is not tracking this
91 // entity yet.
92 $missing_workspaces = array_diff($affected_workspaces, $this->getEntityTrackingWorkspaceIds($entity));
93 if ($missing_workspaces) {
94 $insert_query = $this->database->insert(static::TABLE)
ProductRepository.php (https://gitlab.com/remyvianne/krowkaramel) PHP · 354 lines
1 <?php
2 declare( strict_types=1 );
195 // don't include variable products in query
196 $args['type'] = array_diff( ProductSyncer::get_supported_product_types(), [ 'variable' ] );
198 // only include published products
258 public function find_mc_not_synced_product_ids( int $limit = -1, int $offset = 0 ): array {
259 $types = ProductSyncer::get_supported_product_types();
260 $types = array_diff( $types, [ 'variation' ] );
261 $args = [
262 'status' => 'publish',
285 public function find_all_synced_google_ids(): array {
286 // Don't include variable parent products as they aren't actually synced to Merchant Center.
287 $args['type'] = array_diff( ProductSyncer::get_supported_product_types(), [ 'variable' ] );
288 $synced_product_ids = $this->find_synced_product_ids( $args );
289 $google_ids_meta_key = $this->prefix_meta_key( ProductMetaHandler::KEY_GOOGLE_IDS );
manager.php (https://github.com/phpbb/phpbb.git) PHP · 332 lines
4 * This file is part of the phpBB Forum Software package.
5 *
6 * @copyright (c) phpBB Limited <https://www.phpbb.com>
7 * @license GNU General Public License, version 2 (GPL-2.0)
8 *
12 */
14 namespace phpbb\composer;
16 use Composer\IO\IOInterface;
35 /**
36 * @var string Type of packages (phpbb-packages per example)
37 */
38 protected $package_type;
markitup.php (https://github.com/sams/cakephp-markitup.git) PHP · 158 lines
1 <?php
2 class MarkitupHelper extends AppHelper {
3 public $helpers = array('Core.Html', 'Core.Form', 'Core.Javascript');
31 $settings = $config['settings'];
32 $default = $config['default'];
33 $textarea = array_diff_key($settings, $default);
34 $textarea = array_merge($textarea, array('type' => 'textarea'));
35 $id = '#' . parent::domId($name);
ezurlaliasquery.php (https://github.com/zerustech/ezpublish.git) PHP · 334 lines
1 <?php
2 /**
3 * File containing the eZURLAliasFilter class.
11 /*!
12 \class eZURLAliasQuery ezurlaliasquery.php
13 \brief Handles querying of URL aliases with different filters
30 /*!
31 \todo The hasAttribute, attribute and setAttribute functions can be turned into properties for PHP 5.
32 */
33 class eZURLAliasQuery
261 }
262 }
263 $actionTypes = array_values( array_diff( $actionTypes, $this->actionTypesEx ) );
264 }
265 if ( $actionTypes !== null )
array_tools.php (https://github.com/jtrick/ACE.git) PHP · 105 lines
1 <?php // Copyright (c) 2003-2009 Jeff Trickett, all rights reserved. License agreement available at http://jefftrickett.com/license/?Id=Tools
21 if ($FirstArray && $NextArray) {
22 if (is_array($FirstArray) && is_array($NextArray)) {
23 $DiffArray = array_diff($FirstArray, $NextArray);
24 if (count($DiffArray) < 1) { return 1; }
25 }
40 // The following were taken directly from a php.net posting:
41 function is_assoc($array) { return is_array($array) && count($array) !== array_reduce(array_keys($array), 'is_assoc_callback', 0); }
42 function is_assoc_callback($a, $b) { return $a === $b ? $a + 1 : 0; }
45 // Breaks a string in csv format into an array of subarrays. $Delimiter defaults to "\t", $RefArray are the column headings to be used to separate the subarrays, if desired. $StringDelimeter will chop string quotes for array strings if (!= -1). $KeepEmptyRows will retain empty rows rather than dropping them.
46 function CsvToArray($String, $Delimiter="\t", $KeyArray=0, $StringDelimeter=0, $KeepEmptyRows=0) {
47 //echo "<p>array_tools.php CsvToArray() \$String: |{$String}|</p>\n";
48 if (!$StringDelimeter) { $StringDelimeter = '"'; } // Fix?
49 $RowArray = StringRowArray($String);