100+ results for 'php in_array'
Not the results you expected?
ezurlobjectlink.php (https://github.com/eeggenberger/ezpublish.git) PHP · 227 lines
1 <?php
2 /**
3 * File containing the eZURLObjectLink class.
11 /*!
12 \class eZURLObjectLink ezurlobjectlink.php
13 \ingroup eZDatatype
14 \brief The class eZURLObjectLink does
116 {
117 $versionObject = $object->version( $objectVersion );
118 if ( $versionObject and !in_array( $versionObject->attribute( 'id' ), $storedVersionList ) )
119 {
120 $objectVersionList[] = $versionObject;
local.php (https://gitlab.com/gabdark/aceit) PHP · 818 lines
ObjectManager.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 316 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
25 * Test object
26 *
27 * @var \PHPUnit_Framework_TestCase
28 */
29 protected $_testObject;
32 * Class constructor
33 *
34 * @param \PHPUnit_Framework_TestCase $testObject
35 */
36 public function __construct(\PHPUnit_Framework_TestCase $testObject)
44 * @param string $argClassName
45 * @param array $originalArguments
46 * @return null|object|\PHPUnit_Framework_MockObject_MockObject
47 */
48 protected function _createArgumentMock($argClassName, array $originalArguments)
amazon_settings.tpl (https://gitlab.com/dadangnh/sb1-bon) Smarty Template · 198 lines
6 <button type="submit" form="settings-form" data-toggle="tooltip" title="<?php echo $button_save; ?>" class="btn btn-primary"><i class="fa fa-save"></i></button>
7 <a href="<?php echo $cancel; ?>" data-toggle="tooltip" title="<?php echo $button_cancel; ?>" class="btn btn-default"><i class="fa fa-reply"></i></a></div>
8 <h1><?php echo $heading_title; ?></h1>
46 <label class="col-sm-2 control-label" for="entry-string1"><?php echo $entry_string1; ?></label>
47 <div class="col-sm-10">
48 <input type="text" name="openbay_amazon_enc_string1" value="<?php echo $openbay_amazon_enc_string1; ?>" placeholder="<?php echo $entry_string1; ?>" id="entry-string1" class="form-control" />
49 </div>
50 </div>
153 </div>
154 <div class="form-group">
155 <label class="col-sm-2 control-label" for="entry-customer-group"><span data-toggle="tooltip" data-container="#tab-orders" title="<?php echo $help_customer_group; ?>"><?php echo $entry_customer_group; ?></span></label>
156 <div class="col-sm-10">
157 <select name="openbay_amazon_order_customer_group" id="entry-customer-group" class="form-control">
181 </div>
182 <div class="form-group">
183 <label class="col-sm-2 control-label" for="entry-default-shipping"><span data-toggle="tooltip" data-container="#tab-orders" title="<?php echo $help_default_shipping; ?>"><?php echo $entry_default_shipping; ?></span></label>
184 <div class="col-sm-10">
185 <select name="openbay_amazon_default_carrier" id="entry-default-shipping" class="form-control">
zone.php (https://bitbucket.org/sandeepbhaskar/inspiredliving.git) PHP · 441 lines
1 <?php
2 class ControllerLocalisationZone extends Controller {
3 private $error = array();
187 'name' => $result['name'] . (($result['zone_id'] == $this->config->get('config_zone_id')) ? $this->language->get('text_default') : null),
188 'code' => $result['code'],
189 'selected' => isset($this->request->post['selected']) && in_array($result['zone_id'], $this->request->post['selected']),
190 'action' => $action
191 );
Permission.php (https://bitbucket.org/FuscaSoftware/candycane.git) PHP · 248 lines
1 <?php
2 /* vim: fenc=utf8 ff=unix
3 *
150 }
152 // from role.php
153 function setable_permissions_name($builtin = null)
154 {
156 }
158 // from role.php
159 function setable_permissions($builtin = null)
160 {
238 if (
239 ($p['project_module'] == null) ||
240 ( is_array($modules) && in_array($p['project_module'], $modules))
241 ) {
242 $tmp[$module][$name] = $this->permissions[$module][$name];
PodsTermSplitting.php (https://gitlab.com/najomie/ljm) PHP · 515 lines
graph.test.php (https://github.com/kwijibo/sparql-proxy.git) PHP · 308 lines
1 <?php
2 require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'constants.inc.php';
3 require_once MORIARTY_DIR . 'graph.class.php';
4 require_once MORIARTY_TEST_DIR . 'fakecredentials.class.php';
6 class GraphTest extends PHPUnit_Framework_TestCase {
7 var $_empty_changeset = '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cs="http://purl.org/vocab/changeset/schema#">
8 <rdf:Description rdf:nodeID="cs">
10 <cs:subjectOfChange rdf:nodeID="a" />
11 <cs:creatorName>Ian</cs:creatorName>
12 <cs:changeReason>PHP Client Test</cs:changeReason>
13 </rdf:Description>
14 </rdf:RDF>';
class-cp-user-relationships.php (https://gitlab.com/dev73/clusterpress) PHP · 543 lines
1 <?php
2 /**
3 * ClusterPress User Relationships.
475 $sql['where'] = 'WHERE ' . join( ' AND ', $sql['where'] );
477 if ( $group_by && in_array( $group_by, array( 'user_id', 'primary_id', 'secondary_id' ) ) ) {
478 $sql['select'] = sprintf( 'SELECT DISTINCT %s, count( %s ) as count FROM %s', esc_sql( $group_by ), esc_sql( $column ), $this->table );
479 $sql['groupby'] = sprintf( 'GROUP BY %s', esc_sql( $group_by ) );
Editor.php (https://github.com/lazenge/zf2.git) PHP · 601 lines
1 <?php
2 /**
3 * Zend Framework
55 $event = (string) $event;
56 $captureEvents = $this->getCaptureEvents();
57 if (in_array($event, $captureEvents)) {
58 return $this;
59 }
113 {
114 $captureEvents = $this->getCaptureEvents();
115 return in_array((string) $event, $captureEvents);
116 }
154 $event = (string) $event;
155 $events = $this->getEvents();
156 if (in_array($event, $events)) {
157 return $this;
158 }
ComposerInformation.php (https://gitlab.com/crazybutterfly815/magento2) PHP · 379 lines
105 * @throws \Exception If attributes are missing in composer.lock file.
106 */
107 public function getRequiredPhpVersion()
108 {
109 if ($this->isMagentoRoot()) {
110 $allPlatformReqs = $this->getLocker()->getPlatformRequirements(true);
111 $requiredPhpVersion = $allPlatformReqs['php']->getPrettyConstraint();
112 } else {
113 $packages = $this->getLocker()->getLockedRepository()->getPackages();
117 $packageName = $package->getPrettyName();
118 if ($packageName === 'magento/product-community-edition') {
119 $phpRequirementLink = $package->getRequires()['php'];
120 if ($phpRequirementLink instanceof Link) {
121 $requiredPhpVersion = $phpRequirementLink->getPrettyConstraint();
122 }
123 }
BaseUserService.php (https://bitbucket.org/haichau59/manga.git) PHP · 399 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: BaseUserService.php 24594 2012-01-05 21:27:01Z matthew $
21 */
24 * @see Zend_Service_DeveloperGarden_Client_ClientAbstract
25 */
26 //require_once 'Zend/Service/DeveloperGarden/Client/ClientAbstract.php';
28 /**
29 * @see Zend_Service_DeveloperGarden_Response_BaseUserService_GetQuotaInformationResponse
30 */
31 //require_once 'Zend/Service/DeveloperGarden/Response/BaseUserService/GetQuotaInformationResponse.php';
33 /**
Store.php (https://github.com/speedupmate/Magento-CE-Mirror.git) PHP · 510 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Adminhtml
23 * @copyright Copyright (c) 2006-2020 Magento, Inc. (http://www.magento.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
204 $websiteId = $website->getId();
205 if ($websiteIds && !in_array($websiteId, $websiteIds)) {
206 continue;
207 }
order_status.php (https://bitbucket.org/elena_dyavolova/omf.git) PHP · 393 lines
1 <?php
2 class ControllerLocalisationOrderStatus extends Controller {
3 private $error = array();
185 'order_status_id' => $result['order_status_id'],
186 'name' => $result['name'] . (($result['order_status_id'] == $this->config->get('config_order_status_id')) ? $this->language->get('text_default') : null),
187 'selected' => isset($this->request->post['selected']) && in_array($result['order_status_id'], $this->request->post['selected']),
188 'action' => $action
189 );
ObjectManager.php (https://gitlab.com/daigiangaitu91/magento) PHP · 316 lines
1 <?php
2 /**
3 * Copyright © 2015 Magento. All rights reserved.
25 * Test object
26 *
27 * @var \PHPUnit_Framework_TestCase
28 */
29 protected $_testObject;
32 * Class constructor
33 *
34 * @param \PHPUnit_Framework_TestCase $testObject
35 */
36 public function __construct(\PHPUnit_Framework_TestCase $testObject)
44 * @param string $argClassName
45 * @param array $originalArguments
46 * @return null|object|\PHPUnit_Framework_MockObject_MockObject
47 */
48 protected function _createArgumentMock($argClassName, array $originalArguments)
ValidClassNamePass.php (https://gitlab.com/mika_22/EscuelaAnexa) PHP · 349 lines
1 <?php
3 /*
12 namespace Psy\CodeCleaner;
14 use PhpParser\Node;
15 use PhpParser\Node\Expr;
16 use PhpParser\Node\Expr\ClassConstFetch;
17 use PhpParser\Node\Expr\New_ as NewExpr;
18 use PhpParser\Node\Expr\StaticCall;
19 use PhpParser\Node\Stmt;
20 use PhpParser\Node\Stmt\Class_ as ClassStmt;
21 use PhpParser\Node\Stmt\Interface_ as InterfaceStmt;
Review.php (https://gitlab.com/crazybutterfly815/magento2) PHP · 382 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
21 * @method int getStatusId()
22 * @method \Magento\Review\Model\Review setStatusId(int $value)
23 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
24 */
25 class Review extends \Magento\Framework\Model\AbstractModel implements IdentityInterface
129 * @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection
130 * @param array $data
131 * @SuppressWarnings(PHPMD.ExcessiveParameterList)
132 */
133 public function __construct(
351 $store = $this->_storeManager->getStore($store);
352 if ($store) {
353 return in_array($store->getId(), (array) $this->getStores());
354 }
355 return false;
ValidatorTypeGuesser.php (https://github.com/Exercise/symfony.git) PHP · 273 lines
1 <?php
3 /*
191 case 'Symfony\Component\Validator\Constraints\Type':
192 if (in_array($constraint->type, array('double', 'float', 'numeric', 'real'))) {
193 return new ValueGuess(null, Guess::MEDIUM_CONFIDENCE);
194 }
221 case 'Symfony\Component\Validator\Constraints\Type':
222 if (in_array($constraint->type, array('double', 'float', 'numeric', 'real'))) {
223 return new ValueGuess(null, Guess::MEDIUM_CONFIDENCE);
224 }
Boolean.php (https://github.com/MontmereLimited/ZendFramework-v1.git) PHP · 375 lines
23 * @see Zend_Filter_Interface
24 */
25 // // // // // // // // // // require_once 'Zend/Filter/Interface.php';
27 /**
53 self::EMPTY_ARRAY => 'array',
54 self::NULL => 'null',
55 self::PHP => 'php',
56 self::FALSE_STRING => 'false',
57 self::YES => 'yes',
144 if (is_int($value)) {
145 $detected += $value;
146 } elseif (in_array($value, $this->_constants)) {
147 $detected += array_search($value, $this->_constants);
148 }
eztags.php (https://github.com/calhoun/eztags.git) PHP · 440 lines
1 <?php
3 /**
50 function hasAttribute( $name )
51 {
52 return in_array( $name, $this->attributes() );
53 }
227 foreach ( $existingTagIDs as $tid )
228 {
229 if ( !in_array( $tid, $tempIDArray ) )
230 {
231 $tagsToDelete[] = $tid;
245 foreach ( array_keys( $this->IDArray ) as $key )
246 {
247 if ( !in_array( $this->IDArray[$key], $existingTagIDs ) )
248 {
249 if ( $this->IDArray[$key] == 0 )
MigratorTest.php (https://github.com/ewandor/horde.git) PHP · 217 lines
1 <?php
2 /**
3 * Copyright 2007 Maintainable Software, LLC
23 * @subpackage UnitTests
24 */
25 class Horde_Db_Migration_MigratorTest extends PHPUnit_Framework_TestCase
26 {
27 public function setUp()
60 {
61 $columns = $this->_columnNames('users');
62 $this->assertFalse(in_array('last_name', $columns));
64 $e = null;
75 $columns = $this->_columnNames('users');
76 $this->assertTrue(in_array('last_name', $columns));
78 $this->_conn->insert("INSERT INTO reminders (content, remind_at) VALUES ('hello world', '2005-01-01 02:22:23')");
local.php (https://gitlab.com/hschoenburg/tlworks2) PHP · 880 lines
1 <?php
3 class acf_local {
65 // is ignore
66 if( in_array($group['key'], $ignore) ) {
68 continue;
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' );
geo_zone.php (https://github.com/sansanwawa/e-commerse.git) PHP · 438 lines
1 <?php
2 class ControllerLocalisationGeoZone extends Controller {
3 private $error = array();
186 'name' => $result['name'],
187 'description' => $result['description'],
188 'selected' => isset($this->request->post['selected']) && in_array($result['geo_zone_id'], $this->request->post['selected']),
189 'action' => $action
190 );
banner.php (https://github.com/sansanwawa/e-commerse.git) PHP · 439 lines
1 <?php
2 class ControllerDesignBanner extends Controller {
3 private $error = array();
186 'name' => $result['name'],
187 'status' => ($result['status'] ? $this->language->get('text_enabled') : $this->language->get('text_disabled')),
188 'selected' => isset($this->request->post['selected']) && in_array($result['banner_id'], $this->request->post['selected']),
189 'action' => $action
190 );
DeleteComment.php (https://gitlab.com/Blueprint-Marketing/wordpress-unit-tests) PHP · 355 lines
1 <?php
3 /**
4 * Admin ajax functions to be tested
5 */
6 require_once( ABSPATH . 'wp-admin/includes/ajax-actions.php' );
8 /**
70 $_POST['_per_page'] = 100;
71 $_POST['_page'] = 1;
72 $_POST['_url'] = admin_url( 'edit-comments.php' );
74 // Make the request
90 // trash, spam, delete should make the total go down
91 if ( in_array( $action, array( 'trash', 'spam', 'delete' ) ) ) {
92 $total = $_POST['_total'] - 1;
HasManyThrough.php (https://gitlab.com/MineYourMind/BoNeMEAL) PHP · 340 lines
Application.php (https://gitlab.com/hoanghung.dev/aloads) PHP · 386 lines
QueueBaseTest.php (https://bitbucket.org/Dal-Papa/is-340-publish-base.git) PHP · 270 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: QueueBaseTest.php 24593 2012-01-05 20:35:02Z matthew $
21 */
31 /** Zend_Config */
32 require_once 'Zend/Config.php';
34 /** Zend_Queue */
35 require_once 'Zend/Queue.php';
37 /** Zend_Queue */
result.php (https://github.com/vietvh/Finder.git) PHP · 398 lines
1 <?php
2 /**
3 * @package Joomla.Administrator
10 defined('_JEXEC') or die;
12 JLoader::register('FinderIndexer', dirname(__FILE__) . '/indexer.php');
14 /**
313 {
314 // Check if the property exists in the group.
315 if (!in_array($property, $this->instructions[$group]))
316 {
317 // Add the property to the group.
controller.php (https://gitlab.com/campus-academy/krowkaramel) PHP · 346 lines
User_agent.php (https://gitlab.com/sittipongwork/impro_dashboard) PHP · 550 lines
1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2 /**
3 * CodeIgniter
4 *
5 * An open source application development framework for PHP 5.1.6 or newer
6 *
7 * @package CodeIgniter
86 private function _load_agent_file()
87 {
88 if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/user_agents.php'))
89 {
90 include(APPPATH.'config/'.ENVIRONMENT.'/user_agents.php');
91 }
92 elseif (is_file(APPPATH.'config/user_agents.php'))
93 {
94 include(APPPATH.'config/user_agents.php');
Spider.php (https://gitlab.com/lalbert/daric) PHP · 395 lines
conversions_test.rb (https://github.com/rnaveiras/rails.git) Ruby · 240 lines
Cloud.php (https://github.com/grandison/budo16.git) PHP · 410 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: Cloud.php 16209 2009-06-21 19:20:34Z thomas $
21 */
24 * @see Zend_Tag_Item
25 */
26 // require_once 'Zend/Tag/Item.php';
28 /**
116 foreach ($options as $key => $value) {
117 if (in_array(strtolower($key), $this->_skipOptions)) {
118 continue;
119 }
Cloud.php (https://gitlab.com/LisovyiEvhenii/ismextensions) PHP · 410 lines
1 <?php
2 /**
3 * Zend Framework
24 * @see Zend_Tag_Item
25 */
26 #require_once 'Zend/Tag/Item.php';
28 /**
116 foreach ($options as $key => $value) {
117 if (in_array(strtolower($key), $this->_skipOptions)) {
118 continue;
119 }
151 $itemList[] = new Zend_Tag_Item($tag);
152 } else {
153 #require_once 'Zend/Tag/Cloud/Exception.php';
154 throw new Zend_Tag_Cloud_Exception('Tag must be an instance of Zend_Tag_Taggable or an array');
155 }
YamlFileLoader.php (https://bitbucket.org/cryofrost/portal.git) PHP · 339 lines
1 <?php
3 /*
265 foreach (array_keys($content) as $namespace) {
266 if (in_array($namespace, array('imports', 'parameters', 'services'))) {
267 continue;
268 }
326 {
327 foreach ($content as $namespace => $values) {
328 if (in_array($namespace, array('imports', 'parameters', 'services'))) {
329 continue;
330 }
length_class.php (https://bitbucket.org/elena_dyavolova/omf.git) PHP · 412 lines
1 <?php
2 class ControllerLocalisationLengthClass extends Controller {
3 private $error = array();
187 'unit' => $result['unit'],
188 'value' => $result['value'],
189 'selected' => isset($this->request->post['selected']) && in_array($result['length_class_id'], $this->request->post['selected']),
190 'action' => $action
191 );
DataFacade.php (https://github.com/danielvaleradp/--ngara.git) PHP · 228 lines
1 <?php
2 class DataFacade {
3 protected static function dolar($i) { return '$' . $i; }
13 if (!isset($pqs)) $pqs = array();
14 if (!in_array($pq, $pqs)) {
15 $query = <<<'EOF'
16 SELECT pg_enum.enumlabel
59 if (!isset($pqs)) $pqs = array();
60 if (!in_array($pq, $pqs)) {
61 $query =
62 'INSERT INTO "Fantasy"."' . $en . '" (' .
119 if (!isset($pqs)) $pqs = array();
120 if (!in_array($pq, $pqs)) {
121 $query =
122 'SELECT ' . join(', ', array_map('self::quote', $ef)) .
migration_version.test.php (https://github.com/vistik/dashboard.git) PHP · 277 lines
1 <?php
2 App::import('Lib', 'Migrations.MigrationVersion');
58 $Schema->tables = array('schema_migrations' => array());
59 $db->execute($db->dropSchema($Schema));
60 $this->assertFalse(in_array($db->fullTableName('schema_migrations', false), $db->listSources()));
62 $this->Version =& new MigrationVersion(array(
63 'connection' => 'test_suite'
64 ));
65 $this->assertTrue(in_array($db->fullTableName('schema_migrations', false), $db->listSources()));
66 }
Builder.php (https://gitlab.com/jjpa2018/dashboard) PHP · 433 lines
1 <?php
3 namespace Illuminate\Database\Schema;
79 public static function defaultMorphKeyType(string $type)
80 {
81 if (! in_array($type, ['int', 'uuid'])) {
82 throw new InvalidArgumentException("Morph key type must be 'int' or 'uuid'.");
83 }
146 public function hasColumn($table, $column)
147 {
148 return in_array(
149 strtolower($column), array_map('strtolower', $this->getColumnListing($table))
150 );
164 foreach ($columns as $column) {
165 if (! in_array(strtolower($column), $tableColumns)) {
166 return false;
167 }
weight_class.php (https://github.com/elleeott/WPOC-boilerplate.git) PHP · 412 lines
1 <?php
2 class ControllerLocalisationWeightClass extends Controller {
3 private $error = array();
187 'unit' => $result['unit'],
188 'value' => $result['value'],
189 'selected' => isset($this->request->post['selected']) && in_array($result['weight_class_id'], $this->request->post['selected']),
190 'action' => $action
191 );
Cloud.php (https://bitbucket.org/Ebozavrik/test-application.git) PHP · 427 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: Cloud.php 24593 2012-01-05 20:35:02Z matthew $
21 */
24 * @see Zend_Tag_Item
25 */
26 require_once 'Zend/Tag/Item.php';
28 /**
118 foreach ($options as $key => $value) {
119 if (in_array(strtolower($key), $this->_skipOptions)) {
120 continue;
121 }
Cloud.php (https://bitbucket.org/DragonBe/zfform.git) PHP · 410 lines
1 <?php
2 /**
3 * Zend Framework
24 * @see Zend_Tag_Item
25 */
26 require_once 'Zend/Tag/Item.php';
28 /**
116 foreach ($options as $key => $value) {
117 if (in_array(strtolower($key), $this->_skipOptions)) {
118 continue;
119 }
151 $itemList[] = new Zend_Tag_Item($tag);
152 } else {
153 require_once 'Zend/Tag/Cloud/Exception.php';
154 throw new Zend_Tag_Cloud_Exception('Tag must be an instance of Zend_Tag_Taggable or an array');
155 }
QueueBaseTest.php (https://github.com/nbcutech/o3drupal.git) PHP · 270 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: QueueBaseTest.php 23775 2011-03-01 17:25:24Z ralph $
21 */
31 /** Zend_Config */
32 require_once 'Zend/Config.php';
34 /** Zend_Queue */
35 require_once 'Zend/Queue.php';
37 /** Zend_Queue */
Custom.php (https://github.com/jamesming/stage_cms.git) PHP · 506 lines
1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
5 * Custom Library Related to SceneCredit
6 * @autoloaded YES
7 * @path \system\application\libraries\Custom.php
8 * @package BackEnd
9 * @author James Ming <jamesming@gmail.com>
476 $join_array = array(
477 'polls_responders' => 'polls_answers.polls_responder_id = polls_responders.id',
478 'polls_questions' => 'polls_answers.polls_question_id = polls_questions.id'
489 $limit = -1,
490 $use_join = TRUE,
491 $join_array
492 );
SessionConfiguration.php (https://github.com/Exercise/zf2.git) PHP · 281 lines
43 * @var int
44 */
45 protected $_phpErrorCode = false;
47 /**
48 * Used with {@link _handleError()}; stores PHP error message
49 * @var string
50 */
161 protected function _handleError($code, $message)
162 {
163 $this->_phpErrorCode = $code;
164 $this->_phpErrorMessage = $message;
230 if (empty($this->_validHashFunctions)) {
231 /**
232 * @see http://php.net/manual/en/session.configuration.php#ini.session.hash-function
233 * "0" and "1" refer to MD5-128 and SHA1-160, respectively, and are
234 * valid in addition to whatever is reported by hash_algos()
DDC2602Test.php (https://github.com/adrienbrault/doctrine2.git) PHP · 333 lines
page.class.php (https://github.com/cclark61/phpOpenFW.git) PHP · 334 lines
1 <?php
2 //*************************************************************************
3 /**
4 * A simple core class to construct the basic page framework
5 *
6 * @package phpOpenFW
7 * @subpackage Application-Logic-2-Structure
8 * @author Christian J. Clark
16 /**
17 * Page Class
18 * @package phpOpenFW
19 * @subpackage Application-Logic-2-Structure
20 */
114 if (!$format) { return false; }
115 $format = strtolower($format);
116 if (!in_array($format, $this->data_formats)) {
117 $data_formats = implode(', ', $this->data_formats);
118 $msg = "Invalid data format '{$format}'. Data format must be one of the following: {$data_formats}";
OntClass.php (https://github.com/lievenjanssen/The-DataTank.git) PHP · 263 lines
1 <?php
3 // ----------------------------------------------------------------------------------
8 * Class that represents an ontology node characterising a class description.
9 *
10 * @version $Id: OntClass.php 320 2006-11-21 09:38:51Z tgauss $
11 * @author Daniel Westphal <mail at d-westphal dot de>
12 *
127 {
128 $subjectLabel=$statement->getLabelSubject();
129 if (!in_array($subjectLabel,$returnIndex))
130 {
131 $returnIndex[]=$subjectLabel;
160 foreach ($statements as $statement) {
161 $subjectLabel = $statement->getLabelSubject();
162 if (!in_array($subjectLabel, $returnIndex)) {
163 $returnIndex[] = $subjectLabel;
164 $return[] = $this->model->createOntClass($subjectLabel);
Trigger.php (https://github.com/speedupmate/Magento-CE-Mirror.git) PHP · 353 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Magento_Db
23 * @copyright Copyright (c) 2006-2020 Magento, Inc. (http://www.magento.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
206 public function setTime($time)
207 {
208 if (in_array($time, $this->getTimeTypes())) {
209 $this->_setPart(self::TIME, $time);
210 } else {
DbQuery.php (https://gitlab.com/jslee1/PrestaShop) PHP · 333 lines
1 <?php
2 /**
3 * 2007-2015 PrestaShop
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
21 * @author PrestaShop SA <contact@prestashop.com>
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
25 */
60 $types = array('SELECT', 'DELETE');
62 if (!empty($type) && in_array($type, $types)) {
63 $this->query['type'] = $type;
64 }
Concrete.php (https://github.com/pimcore/pimcore.git) PHP · 366 lines
stock_status.php (https://bitbucket.org/mjalajel/opencart.git) PHP · 381 lines
1 <?php
2 class ControllerLocalisationStockStatus extends Controller {
3 private $error = array();
183 'stock_status_id' => $result['stock_status_id'],
184 'name' => $result['name'] . (($result['stock_status_id'] == $this->config->get('config_stock_status_id')) ? $this->language->get('text_default') : null),
185 'selected' => isset($this->request->post['selected']) && in_array($result['stock_status_id'], $this->request->post['selected']),
186 'action' => $action
187 );
accesgroupes_boucles.php (https://bitbucket.org/pombredanne/spip-zone-treemap.git) PHP · 237 lines
1 <?php
2 // redéfinition des BOUCLES
3 // permet de ne pas sélectionner les éléments à accès restreints lors des requetes SQL effectuées par les boucles
22 if (!isset($boucle->modificateur['tout_voir'])){
23 $t = $boucle->id_table . '.' . $boucle->primary;
24 if (!in_array($t, $boucles[$id_boucle]->select))
25 $boucle->select[]= $t; # pour postgres, neuneu ici
44 if (!isset($boucle->modificateur['tout_voir'])){
45 $t = $boucle->id_table . '.' . $boucle->primary;
46 if (!in_array($t, $boucles[$id_boucle]->select))
47 $boucle->select[]= $t; # pour postgres, neuneu ici
66 if (!isset($boucle->modificateur['tout_voir'])){
67 $t = $boucle->id_table . '.' . $boucle->primary;
68 if (!in_array($t, $boucles[$id_boucle]->select))
69 $boucle->select[]= $t; # pour postgres, neuneu ici
BaseNotStorageEntityModel.php (https://github.com/sergiygladkyy/OEF.git) PHP · 401 lines
top_bar.php (https://gitlab.com/billyprice1/bdApi) PHP · 278 lines
1 <?php
3 // Exit if accessed directly
26 $meta = xfac_option_getMeta($config);
28 if (in_array(0, $optionTopBarForums)) {
29 $wpAdminBar->add_menu(array(
30 'id' => 'xfac-forums',
181 if (!empty($meta['linkLoginLogin'])) {
182 $loginFormAction = $meta['linkLoginLogin'];
183 $redirect = site_url('wp-login.php?xfac=1');
185 ob_start();
186 require(xfac_template_locateTemplate('top_bar_login_form.php'));
187 $loginForm = ob_get_clean();
fedex.tpl (https://bitbucket.org/sandeepbhaskar/inspiredliving.git) Smarty Template · 259 lines
4 <?php foreach ($breadcrumbs as $breadcrumb) { ?>
5 <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
6 <?php } ?>
13 <h1><img src="view/image/shipping.png" alt="" /> <?php echo $heading_title; ?></h1>
14 <div class="buttons"><a onclick="$('#form').submit();" class="button"><?php echo $button_save; ?></a><a onclick="location = '<?php echo $cancel; ?>';" class="button"><?php echo $button_cancel; ?></a></div>
15 </div>
16 <div class="content">
74 <div class="<?php echo $class; ?>">
75 <?php if (in_array($service['value'], $fedex_service)) { ?>
76 <input type="checkbox" name="fedex_service[]" value="<?php echo $service['value']; ?>" checked="checked" />
83 <?php } ?>
84 </div>
85 <a onclick="$(this).parent().find(':checkbox').attr('checked', true);"><?php echo $text_select_all; ?></a> / <a onclick="$(this).parent().find(':checkbox').attr('checked', false);"><?php echo $text_unselect_all; ?></a></td>
86 </tr>
87 <tr>
Driver.php (https://gitlab.com/wuhang2003/rainloop-webmail) PHP · 403 lines
94 $this->iWriteOnTimeoutOnly = 0;
95 $this->bWriteOnErrorOnly = false;
96 $this->bWriteOnPhpErrorOnly = false;
97 $this->bFlushCache = false;
98 $this->aCache = array();
109 \MailSo\Log\Enumerations\Type::ERROR => '[ERROR]',
111 \MailSo\Log\Enumerations\Type::NOTICE_PHP => '[NOTICE]',
112 \MailSo\Log\Enumerations\Type::WARNING_PHP => '[WARNING]',
297 $bErrorPhp = false;
299 $bError = $this->bWriteOnErrorOnly && \in_array($iType, array(
300 \MailSo\Log\Enumerations\Type::NOTICE,
301 \MailSo\Log\Enumerations\Type::NOTICE_PHP,
308 if (!$bError)
309 {
310 $bErrorPhp = $this->bWriteOnPhpErrorOnly && \in_array($iType, array(
311 \MailSo\Log\Enumerations\Type::NOTICE_PHP,
class-wp-smush-resize.php (https://gitlab.com/meixnertobias/thaimaidaiproductionwp) PHP · 404 lines
Bin.php (https://github.com/jaws-project/jaws.git) PHP · 419 lines
1 <?php
2 /**
3 * Bin.php - Bin Class for all bin widgets
10 */
12 require_once PIWI_PATH . '/Widget/Widget.php';
13 require_once PIWI_PATH . '/JS/JSEnums.php';
285 $id = $event->getID();
286 if (in_array($id, array_keys($events))) {
287 $code = str_replace('javascript:', '', $code);
288 $events[$id].= ' '.$code;
341 $action = func_get_arg(1);
342 if (is_array($this->_availableEvents) && count($this->_availableEvents) > 0) {
343 if (in_array($event, $this->_availableEvents)) {
344 $this->_events[] = new JSEvent($event, $action);
345 } else {
project.php (https://github.com/germc/CrowdFund.git) PHP · 293 lines
1 <?php
3 class Project extends AppModel {
119 foreach($found as $project) {
120 if (!in_array($project['Project']['id'], $projectIds)) {
121 $projectIds[] = $project['Project']['id'];
122 $projects[] = $project;
130 foreach($found as $project) {
131 if (!in_array($project['Project']['id'], $projectIds)) {
132 $projectIds[] = $project['Project']['id'];
133 $projects[] = $project;
141 foreach($found as $project) {
142 if (!in_array($project['Project']['id'], $projectIds)) {
143 $projectIds[] = $project['Project']['id'];
144 $projects[] = $project;
admin.php (https://github.com/jkreska/test1.git) PHP · 160 lines
1 <?php
3 include_once(create_path("club/lg_club_".LANG.".php"));
4 include_once(create_path("competition/lg_competition_".LANG.".php"));
5 include_once(create_path("team/lg_team_".LANG.".php"));
6 include_once(create_path("field/lg_field_".LANG.".php"));
7 include_once(create_path("match/lg_match_".LANG.".php"));
8 include_once(create_path("member/lg_member_".LANG.".php"));
9 include_once(create_path("news/lg_news_".LANG.".php"));
10 include_once(create_path("information/lg_information_".LANG.".php"));
11 include_once(create_path("forum/lg_forum_".LANG.".php"));
array.idl.php (https://github.com/diegoIta/hiphop-php.git) PHP · 376 lines
PU_test_dcp_role.php (https://github.com/CircleCode/dynacase-core.git) PHP · 432 lines
1 <?php
2 /*
3 * @author Anakeen
13 */
15 require_once 'PU_testcase_dcp_commonfamily.php';
17 class TestRole extends TestCaseDcpCommonFamily
59 foreach ($expectedRoles as $roleLogin) {
60 $this->assertTrue(in_array($roleLogin, $uRoleLogins) , sprintf("role %s must be present", $roleLogin));
61 }
62 foreach ($uRoleLogins as $roleLogin) {
63 $this->assertTrue(in_array($roleLogin, $expectedRoles) , sprintf("role %s must not be present", $roleLogin));
64 }
65 }
YamlFileLoader.php (https://github.com/sebio/symfony.git) PHP · 281 lines
1 <?php
3 /*
218 foreach (array_keys($content) as $key) {
219 if (in_array($key, array('imports', 'parameters', 'services', 'interfaces'))) {
220 continue;
221 }
266 {
267 foreach ($content as $key => $values) {
268 if (in_array($key, array('imports', 'parameters', 'services', 'interfaces'))) {
269 continue;
270 }
ConnectionManagerTest.php (https://github.com/kunit/cakephp.git) PHP · 347 lines
1 <?php
2 /**
3 * Connection Manager tests
4 *
5 * PHP 5
6 *
7 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
12 *
13 * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
15 * @package Cake.Test.Case.Model
16 * @since CakePHP(tm) v 1.2.0.5550
17 * @license http://www.opensource.org/licenses/mit-license.php MIT License
18 */
Collection.php (https://gitlab.com/asun89/socianovation-web) PHP · 549 lines
1 <?php
2 namespace Grav\Common\Page;
259 * an arbitrary datetime page field where end date is optional
260 * Dates can be passed in as text that strtotime() can process
261 * http://php.net/manual/en/function.strtotime.php
262 *
263 * @param $startDate
488 foreach ($this->items as $path => $slug) {
489 $page = $this->pages->get($path);
490 if ($page !== null && in_array($page->template(), $types)) {
491 $items[$path] = $slug;
492 }
520 if (is_array($accessLevel)) {
521 foreach ($accessLevel as $innerIndex => $innerAccessLevel) {
522 if (in_array($innerAccessLevel, $accessLevels)) {
523 $valid = true;
524 }
validation.php (https://gitlab.com/Ankit77/motiv8) PHP · 162 lines
1 <?php
3 return [
42 'image' => 'O campo :attribute deverá conter uma imagem.',
43 'in' => 'O campo :attribute não contém um valor válido.',
44 'in_array' => 'The :attribute field does not exist in :other.',
45 'integer' => 'O campo :attribute deverá conter um número inteiro.',
46 'ip' => 'O campo :attribute deverá conter um IP válido.',
ConnectionManagerTest.php (https://bitbucket.org/LeThanhDat/firstdummyapp.git) PHP · 346 lines
1 <?php
2 /**
3 * Connection Manager tests
4 *
5 * PHP 5
6 *
7 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
12 *
13 * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
15 * @package Cake.Test.Case.Model
16 * @since CakePHP(tm) v 1.2.0.5550
17 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
18 */
19 App::uses('ConnectionManager', 'Model');
Tax.php (https://github.com/seosamba/ecommerce.git) PHP · 263 lines
1 <?php
2 /**
3 * Handy tools for work with taxes
154 $currentZip = substr_replace($address['zip'], '', $wildcardPosition);
155 $matchZip = substr_replace($wildcardZone, '', $wildcardPosition);
156 if ($currentZip === $matchZip && in_array($address['country'], $countries)) {
157 $matchRate += 5;
158 $zipMatched = true;
161 }
163 if (in_array($address['zip'], $zone->getZip()) && in_array($address['country'], $countries)
164 && !$zipMatched) {
165 $matchRate += 5;
171 if ($zone->getStates()) {
172 $states = array_map(function($state){ return $state['id'];}, $zone->getStates());
173 if (in_array($address['state'], $states)) {
174 $matchRate += 3;
175 }
treemap.php (https://github.com/tharkun/atoum.git) PHP · 453 lines
1 <?php
3 namespace mageekguy\atoum\scripts;
11 class treemap extends atoum\script\configurable
12 {
13 const defaultConfigFile = '.treemap.php';
14 const dataFile = 'data.json';
69 public function addDirectory($directory)
70 {
71 if (in_array($directory, $this->directories) === false)
72 {
73 $this->directories[] = $directory;
154 if (sizeof($projectName) != 1)
155 {
156 throw new exceptions\logic\invalidArgument(sprintf($script->getLocale()->_('Bad usage of %s, do php %s --help for more informations'), $argument, $script->getName()));
157 }
action.class.php (https://bitbucket.org/rmoger/gdp-testsite1.git) PHP · 259 lines
1 <?php
3 /**
27 $mask = 0;
28 if (in_array('views_property', $this->operationInfo['behavior'])) {
29 $mask |= VBO_ACCESS_OP_VIEW;
30 }
31 if (in_array('changes_property', $this->operationInfo['behavior'])) {
32 $mask |= VBO_ACCESS_OP_UPDATE;
33 }
34 if (in_array('creates_property', $this->operationInfo['behavior'])) {
35 $mask |= VBO_ACCESS_OP_CREATE;
36 }
classMenuTest.php (https://bitbucket.org/ferOnti/processmaker.git) PHP · 270 lines
1 <?php
2 require_once PATH_TRUNK . 'gulliver/thirdparty/smarty/libs/Smarty.class.php';
3 require_once PATH_TRUNK . 'gulliver/system/class.xmlform.php';
4 require_once PATH_TRUNK . 'gulliver/system/class.xmlDocument.php';
5 require_once PATH_TRUNK . 'gulliver/system/class.form.php';
6 require_once PATH_TRUNK . 'gulliver/system/class.dbconnection.php';
7 require_once PATH_TRUNK . 'gulliver/thirdparty/propel/Propel.php';
8 require_once PATH_TRUNK . 'gulliver/thirdparty/creole/Creole.php';
9 require_once PATH_TRUNK . 'gulliver/thirdparty/pear/PEAR.php';
10 require_once PATH_TRUNK . 'gulliver/system/class.menu.php';
14 */
16 class classMenuTest extends PHPUnit_Framework_TestCase
17 {
18 /**
PAPE.php (https://github.com/AskMP/A3M-for-CodeIgniter-2.0.git) PHP · 301 lines
1 <?php
3 /**
9 */
11 require_once "Auth/OpenID/Extension.php";
13 define('Auth_OpenID_PAPE_NS_URI',
60 function addPolicyURI($policy_uri)
61 {
62 if (!in_array($policy_uri, $this->preferred_auth_policies)) {
63 $this->preferred_auth_policies[] = $policy_uri;
64 }
111 if ($policies_str) {
112 foreach (explode(' ', $policies_str) as $uri) {
113 if (!in_array($uri, $this->preferred_auth_policies)) {
114 $this->preferred_auth_policies[] = $uri;
115 }
AccessControlList.php (https://github.com/Alex8452/Kurogo-Mobile-Web-Doc-Translation.git) PHP · 327 lines
1 <?php
2 /**
3 * @package Authentication
299 public function __construct($ruleType, $ruleAction, $ruleScope, $ruleAuthority, $ruleValue)
300 {
301 if (!in_array($ruleType, self::ruleTypes())) {
302 throw new Exception("Invalid rule type $ruleType");
303 }
305 if (!in_array($ruleAction, self::ruleActions())) {
306 throw new Exception("Invalid rule action $ruleAction");
307 }
309 if (!in_array($ruleScope, self::ruleScopes())) {
310 throw new Exception("Invalid rule scope $ruleScope");
311 }
licenseadminpanel.php (https://gitlab.com/BeS/io.schiessle.org) PHP · 338 lines
1 <?php
2 /**
3 * StatusNet, the distributed open-source microblogging tool
5 * License administration panel
6 *
7 * PHP version 5
8 *
9 * LICENCE: This program is free software: you can redistribute it and/or modify
131 $types = array('private', 'allrightsreserved', 'cc');
133 if (!in_array($values['license']['type'], $types)) {
134 // TRANS: Client error displayed selecting an invalid license in the license admin panel.
135 $this->clientError(_('Invalid license selection.'));
Subscription.php (https://github.com/grandison/budo16.git) PHP · 339 lines
1 <?php
2 /**
3 * SocialEngine
7 * @copyright Copyright 2006-2010 Webligo Developments
8 * @license http://www.socialengine.net/license/
9 * @version $Id: Subscription.php 8906 2011-04-21 00:22:33Z john $
10 * @author John Boehr <j@webligo.com>
11 */
154 {
155 $this->_statusChanged = false;
156 if( in_array($this->status, array('initial', 'trial', 'pending', 'active')) ) {
158 // If the subscription is in initial or pending, set as active and
159 // cancel any other active subscriptions
160 if( in_array($this->status, array('initial', 'pending')) ) {
161 $this->setActive(true);
162 Engine_Api::_()->getDbtable('subscriptions', 'payment')
Amalgamator.php (https://github.com/livinglab/openlab.git) PHP · 305 lines
1 <?php
2 /**
3 * Merge pre-3.0 duplicate venues and organizers
210 */
211 private function update_default_venues( $keep, array $replace ) {
212 if ( $this->default_venue && in_array( $this->default_venue, $replace ) ) {
213 $events = Tribe__Events__Main::instance();
214 $events->setOption( 'eventsDefaultVenueID', $keep );
215 }
216 if ( $this->default_community_venue && in_array( $this->default_community_venue, $replace ) ) {
217 $community = Tribe__Events__Community__Main::instance();
218 $community->setOption( 'defaultCommunityVenueID', $keep );
229 */
230 private function update_default_organizers( $keep, array $replace ) {
231 if ( $this->default_organizer && in_array( $this->default_organizer, $replace ) ) {
232 $events = Tribe__Events__Main::instance();
233 $events->setOption( 'eventsDefaultOrganizerID', $keep );
return.php (https://gitlab.com/shapcy/opencart) PHP · 238 lines
meta-box-saves.inc.php (https://gitlab.com/Gashler/dp) PHP · 148 lines
1 <?php
2 /**
3 * Meta box saves.
69 if (isset ($pages[$_p["ws_plugin__s2member_security_meta_box_level"]]) && is_array ($pages[$_p["ws_plugin__s2member_security_meta_box_level"]]))
70 if ($pages[$_p["ws_plugin__s2member_security_meta_box_level"]] !== array ("all")&& !in_array ("all-pages", $posts[$_p["ws_plugin__s2member_security_meta_box_level"]]))
71 array_push ($pages[$_p["ws_plugin__s2member_security_meta_box_level"]], (string)$page_id);
95 if (isset ($posts[$_p["ws_plugin__s2member_security_meta_box_level"]]) && is_array ($posts[$_p["ws_plugin__s2member_security_meta_box_level"]]))
96 if ($posts[$_p["ws_plugin__s2member_security_meta_box_level"]] !== array ("all")&& !in_array ("all-" . $_p["post_type"] . "s", $posts[$_p["ws_plugin__s2member_security_meta_box_level"]]))
97 array_push ($posts[$_p["ws_plugin__s2member_security_meta_box_level"]], (string)$post_id);
taxonomy.php (https://github.com/laposa/onxshop.git) PHP · 339 lines
1 <?php
2 /**
3 * Copyright (c) 2006-2011 Laposa Limited (https://laposa.ie)
60 public function initializeRelatedObject($relation = 'node') {
62 require_once('models/common/common_node.php');
63 $Node = new common_node();
67 case 'product':
68 require_once('models/ecommerce/ecommerce_product_taxonomy.php');
69 $Taxonomy = new ecommerce_product_taxonomy();
70 break;
72 case 'variety':
73 require_once('models/ecommerce/ecommerce_product_variety_taxonomy.php');
74 $Taxonomy = new ecommerce_product_variety_taxonomy();
75 break;
Domain.php (https://github.com/fabienpomerol/Propel2.git) PHP · 391 lines
1 <?php
3 /**
18 * @author Hans Lellelid <hans@xmpl.org> (Propel)
19 * @author Martin Poeschl <mpoeschl@marmot.at> (Torque)
20 * @author Hugo Hamon <webmaster@apprendre-php.com>
21 */
22 class Domain extends MappingModel
265 /**
266 * Returns the default value, type-casted for use in PHP OM.
267 *
268 * @return mixed
269 */
270 public function getPhpDefaultValue()
271 {
272 if (null === $this->defaultValue) {
class.wpcom-json-api-sharing-buttons-endpoint.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) PHP · 270 lines
1 <?php
2 /*
3 * WARNING: This file is distributed verbatim in Jetpack.
26 ( method_exists( 'Jetpack', 'is_module_active' ) && ! Jetpack::is_module_active( 'sharedaddy' ) ) ) {
27 return new WP_Error( 'missing_jetpack_module', 'The Sharing module must be activated in order to use this endpoint', 400 );
28 } else if ( ! empty( $args['visibility'] ) && ! in_array( $args['visibility'], self::$all_visibilities ) ) {
29 return new WP_Error( 'invalid_visibility', sprintf( 'The visibility field must be one of the following values: %s', implode( ', ', self::$all_visibilities ) ), 400 );
30 }
32 // Determine which visibilities to include based on request
33 $visibilities = empty( $args['visibility'] ) || ! in_array( $args['visibility'], self::$all_visibilities ) ? self::$all_visibilities : array( $args['visibility'] );
35 // Discover enabled services
45 // Filter visibility
46 if ( isset( $args['visibility'] ) && ! in_array( WPCOM_JSON_API_Get_Sharing_Button_Endpoint::get_button_visibility( $ss, $button ), $visibilities ) ) {
47 continue;
48 }
Optimizer.php (https://gitlab.com/pr0055/symfonypizza) PHP · 271 lines
1 <?php
3 /*
57 }
59 if (PHP_VERSION_ID < 50400 && self::OPTIMIZE_VAR_ACCESS === (self::OPTIMIZE_VAR_ACCESS & $this->optimizers) && !$env->isStrictVariables() && !$env->hasExtension('Twig_Extension_Sandbox')) {
60 if ($this->inABody) {
61 if (!$node instanceof Twig_Node_Expression) {
197 // optimize access to loop targets
198 elseif ($node instanceof Twig_Node_Expression_Name && in_array($node->getAttribute('name'), $this->loopsTargets)) {
199 $node->setAttribute('always_defined', true);
200 }
view.php (https://bitbucket.org/crevillo/enetcall.git) PHP · 240 lines
1 <?php
2 /**
3 * @copyright Copyright (C) 1999-2012 eZ Systems AS. All rights reserved.
26 if ( !isset( $currentSiteAccess ) or
27 !in_array( $currentSiteAccess, $siteAccessList ) )
28 $currentSiteAccess = $siteAccessList[0];
76 // if eZINI::instance() is called twice instance will be fetched from GLOBAL variable.
77 // Without reference there will be a inconsistency with GLOBAL instance and stored ini file.
78 $iniTemp = eZINI::create( $settingFile . '.append.php', $path, null, null, null );
79 $iniTemp->removeSetting( $block, $setting );
80 $iniTemp->save();
218 $iniPath = $iniDataSet[1] ? $iniDataSet[0] : 'settings/' . $iniDataSet[0];
219 $iniFiles = array_merge( $iniFiles, eZDir::recursiveFindRelative( $iniPath, '', '.ini' ) );
220 $iniFiles = array_merge( $iniFiles, eZDir::recursiveFindRelative( $iniPath, '', '.ini.append.php' ) );
221 }
TbInput.php (https://bitbucket.org/raboit/sisfac.git) PHP · 470 lines
1 <?php
2 /**
3 * TbInput class file.
4 * @author Christoffer Niska <ChristofferNiska@gmail.com>
5 * @copyright Copyright © Christoffer Niska 2011-
6 * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
7 * @package bootstrap.widgets.input
8 */
242 protected function getLabel()
243 {
244 if ($this->label !== false && !in_array($this->type, array('checkbox', 'radio')) && $this->hasModel())
245 return $this->form->labelEx($this->model, $this->attribute, $this->labelOptions);
246 else if ($this->label !== null)
OptionsResolver.php (https://github.com/r1pp3rj4ck/symfony.git) PHP · 352 lines
1 <?php
3 /*
296 foreach ($this->allowedValues as $option => $allowedValues) {
297 if (isset($options[$option])) {
298 if (is_array($allowedValues) && !in_array($options[$option], $allowedValues, true)) {
299 throw new InvalidOptionsException(sprintf('The option "%s" has the value "%s", but is expected to be one of "%s"', $option, $options[$option], implode('", "', $allowedValues)));
300 }
Shoppingcart.php (https://bitbucket.org/spenna/alexoo_produzione.git) PHP · 203 lines
class.wdtbrowsechartstable.php (https://gitlab.com/ogar.vasily/activetables) PHP · 243 lines
1 <?php
2 /**
3 * Browse charts for the admin panel
6 if( ! class_exists( 'WP_List_Table' ) ) {
7 require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
8 }
54 if(isset($_REQUEST['orderby'])){
55 if( in_array(
56 $_REQUEST['orderby'],
57 array(
104 public function column_title($item){
105 $actions = array(
106 'edit' => '<a href="admin.php?page=wpdatatables-chart-wizard&chart_id='.$item['id'].'" title="'.__('Edit','wpdatatables').'">'.__('Edit','wpdatatables').'</a>',
107 'trash' => '<a class="submitdelete" title="'.__('Delete','wpdatatables').'" href="admin.php?page=wpdatatables-charts&action=delete&chart_id='.$item['id'].'" rel="'.$item['id'].'">'.__('Delete','wpdatatables').'</a>'
listings.php (https://gitlab.com/sihabudinahmad/asppi) PHP · 423 lines
119 if ( $archive ) {
120 ?>
121 <a href="<?php echo esc_attr( get_post_type_archive_link( $post_type ) ); ?>"><?php esc_html_e( 'View frontend archive', 'custom-post-type-ui' ); ?></a>
122 <?php } ?>
168 <p><strong><?php esc_html_e( 'Archives file name examples.', 'custom-post-type-ui' ); ?></strong><br/>
169 archive-<?php echo esc_html( $post_type ); ?>.php<br/>
170 archive.php<br/>
174 <p><strong><?php esc_html_e( 'Single Posts file name examples.', 'custom-post-type-ui' ); ?></strong><br/>
175 single-<?php echo esc_html( $post_type ); ?>-post_slug.php (WP 4.4+) *<br/>
176 single-<?php echo esc_html( $post_type ); ?>.php<br/>
178 singular.php (WP 4.3+)<br/>
179 index.php
180 </p>
334 <p><strong><?php esc_html_e( 'Archives', 'custom-post-type-ui' ); ?></strong><br />
335 taxonomy-<?php echo esc_html( $taxonomy ); ?>-term_slug.php *<br />
336 taxonomy-<?php echo esc_html( $taxonomy ); ?>.php<br />
information.php (https://gitlab.com/reclamare/mao) PHP · 199 lines
ConfigDependencies.php (https://gitlab.com/andecode/theme-spark) PHP · 275 lines
1 <?php
3 namespace Drupal\rest\Entity;
166 foreach (array_keys($rest_config->get('configuration')) as $request_method) {
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 }
235 // authentication providers and formats.
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 }
FormRow.php (https://bitbucket.org/saifshuvo/zf2.git) PHP · 393 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
273 {
274 $labelPosition = strtolower($labelPosition);
275 if (!in_array($labelPosition, array(self::LABEL_APPEND, self::LABEL_PREPEND))) {
276 throw new Exception\InvalidArgumentException(sprintf(
277 '%s expects either %s::LABEL_APPEND or %s::LABEL_PREPEND; received "%s"',
sfRequest.class.php (https://github.com/mikesname/ehri-ica-atom.git) PHP · 359 lines
1 <?php
3 /*
19 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
20 * @author Sean Kerr <sean@code-box.org>
21 * @version SVN: $Id: sfRequest.class.php 28641 2010-03-21 10:20:44Z fabien $
22 */
23 abstract class sfRequest implements ArrayAccess
108 foreach ($parameters as $key => $value)
109 {
110 if (in_array($key, $names))
111 {
112 $array[$key] = $value;
136 public function setMethod($method)
137 {
138 if (!in_array(strtoupper($method), array(self::GET, self::POST, self::PUT, self::DELETE, self::HEAD)))
139 {
140 throw new sfException(sprintf('Invalid request method: %s.', $method));
layout.php (https://github.com/sansanwawa/e-commerse.git) PHP · 419 lines
1 <?php
2 class ControllerDesignLayout extends Controller {
3 private $error = array();
185 'layout_id' => $result['layout_id'],
186 'name' => $result['name'],
187 'selected' => isset($this->request->post['selected']) && in_array($result['layout_id'], $this->request->post['selected']),
188 'action' => $action
189 );
PhpValue.php (https://github.com/Exercise/zf2.git) PHP · 340 lines
26 namespace Zend\CodeGenerator\Php;
28 class PhpValue extends AbstractPhp
29 {
30 /**#@+
132 *
133 * @param mixed $value
134 * @return \Zend\CodeGenerator\Php\PhpPropertyValue
135 */
136 public function setValue($value)
154 *
155 * @param string $type
156 * @return \Zend\CodeGenerator\Php\PhpPropertyValue
157 */
158 public function setType($type)
abstract.php (https://github.com/pjwiseman/joomla-cms.git) PHP · 282 lines
1 <?php
2 /**
3 * @package FrameworkOnFramework
120 * Note: this function has to be called from the addSubmenu function in
121 * the ExtensionNameHelper class located in
122 * administrator/components/com_ExtensionName/helpers/Extensionname.php
123 *
124 * Example Code:
129 * {
130 * // Load FOF
131 * include_once JPATH_LIBRARIES . '/fof/include.php';
132 *
133 * if (!defined('FOF_INCLUDED'))
271 $classes = explode(' ', $class);
273 if (!in_array('tab-pane', $classes))
274 {
275 return false;
accesgroupes_fonctions.php (https://bitbucket.org/pombredanne/spip-zone-treemap.git) PHP · 284 lines
1 <?php
2 //spip_log('inclusion accesgroupes_boucles = OK!');
31 $sect_ec = $row1['id_secteur'];
32 // si le parent ou le secteur est déja dans le tableau : vu le principe d'héritage pas la peine d'aller plus loin :)
33 /* if (in_array($parent_ec, $Trub_restreintes) OR in_array($sect_ec, $Trub_restreintes)) {
34 $Trub_restreintes[] = $rub_ec;
35 }
55 $result3 = spip_query("SELECT id_article, id_rubrique FROM spip_articles");
56 while ($row3 = spip_fetch_array($result3)) {
57 if (in_array($row3['id_rubrique'], $Trub_rest)) {
58 $Tart_restreints[] = $row3['id_article'];
59 }
71 $result4 = spip_query("SELECT id_breve, id_rubrique FROM spip_breves");
72 while ($row4 = spip_fetch_array($result4)) {
73 if (in_array($row4['id_rubrique'], $Trub_rest)) {
74 $Tbrev_restreintes[] = $row4['id_breve'];
75 }
payment_address.php (https://bitbucket.org/deringer/opencart.git) PHP · 245 lines
1 <?php
2 class ControllerCheckoutPaymentAddress extends Controller {
3 public function index() {
128 if (empty($this->request->post['address_id'])) {
129 $json['error']['warning'] = $this->language->get('error_address');
130 } elseif (!in_array($this->request->post['address_id'], array_keys($this->model_account_address->getAddresses()))) {
131 $json['error']['warning'] = $this->language->get('error_address');
132 } else {
ezsysinfo.php (https://bitbucket.org/ericsagnes/ezpublish-multisite.git) PHP · 325 lines
PropelTableComparator.php (https://github.com/1989gaurav/Propel.git) PHP · 315 lines
1 <?php
3 /**
9 */
11 require_once dirname(__FILE__) . '/../Table.php';
12 require_once dirname(__FILE__) . '/PropelTableDiff.php';
13 require_once dirname(__FILE__) . '/PropelColumnComparator.php';
14 require_once dirname(__FILE__) . '/PropelColumnDiff.php';
15 require_once dirname(__FILE__) . '/PropelIndexComparator.php';
16 require_once dirname(__FILE__) . '/PropelForeignKeyComparator.php';
298 foreach ($fromTableFks as $fromTableFkPos => $fromTableFk) {
299 if (!$fromTableFk->isSkipSql() && !in_array($fromTableFk, $toTableFks)) {
300 $this->tableDiff->addRemovedFk($fromTableFk->getName(), $fromTableFk);
301 $fkDifferences++;
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)
112 if (!isset($this->queries[$queryName])) {
113 throw new \Exception('Query ' . $queryName . ' does not exist');
114 } elseif (in_array($queryName, $this->mappedQueries)) {
115 throw new StateException(
116 new Phrase('Cycle found. Query %1 already used in request hierarchy', [$queryName])
TestCase.php (https://bitbucket.org/ksekar/campus.git) PHP · 351 lines
1 <?php
2 /**
3 * Zend Framework
23 * @see Zend_Cloud_QueueService_Adapter
24 */
25 require_once 'Zend/Cloud/QueueService/Adapter.php';
27 /**
28 * @see Zend_Config
29 */
30 require_once 'Zend/Config.php';
32 /**
33 * @see Zend_Cloud_Queue_Factory
34 */
35 require_once 'Zend/Cloud/QueueService/Factory.php';
37 /**
RedirectMiddleware.php (https://gitlab.com/virtualrealms/d7civicrm) PHP · 237 lines
Set.php (https://github.com/boekkooi/PEAR2_Pyrus.git) PHP · 285 lines
1 <?php
2 /**
3 * \PEAR2\Pyrus\Dependency\Set
4 *
5 * PHP version 5
6 *
7 * @category PEAR2
8 * @package PEAR2_Pyrus
9 * @author Greg Beaver <cellog@php.net>
10 * @copyright 2010 The PEAR Group
11 * @license http://www.opensource.org/licenses/bsd-license.php New BSD License
12 * @version SVN: $Id$
13 * @link http://svn.php.net/viewvc/pear2/Pyrus/
14 */
HtmlTag.php (https://gitlab.com/rsilveira1987/Expresso) PHP · 278 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: HtmlTag.php 10020 2009-08-18 14:34:09Z j.fischer@metaways.de $
21 */
24 * @see Zend_Tag_Cloud_Decorator_Tag
25 */
26 require_once 'Zend/Tag/Cloud/Decorator/Tag.php';
28 /**
94 if (is_array($classList)) {
95 if (count($classList) === 0) {
96 require_once 'Zend/Tag/Cloud/Decorator/Exception.php';
97 throw new Zend_Tag_Cloud_Decorator_Exception('Classlist is empty');
98 }
Converter.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 202 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
75 protected function convertField(&$data, $field, $value)
76 {
77 if (in_array($field, ['color', 'size'])) {
78 if (!empty($value)) {
79 $data['configurable_attributes_data'][$field] = $this->getArrayValue($value);
109 'is_percent' => false,
110 'pricing_value' => $price,
111 'include' => (int)in_array($option->getValue(), $values),
112 ];
113 $attributeOptions[] = [
class.wp-dependencies.php (https://github.com/livinglab/openlab.git) PHP · 452 lines
1 <?php
2 /**
3 * Dependencies API: WP_Dependencies base class
108 foreach ( $this->to_do as $key => $handle ) {
109 if ( ! in_array( $handle, $this->done, true ) && isset( $this->registered[ $handle ] ) ) {
110 /*
111 * Attempt to process the item. If successful,
166 $handle_parts = explode( '?', $handle );
167 $handle = $handle_parts[0];
168 $queued = in_array( $handle, $this->to_do, true );
170 if ( in_array( $handle, $this->done, true ) ) { // Already done.
315 $handle = explode( '?', $handle );
317 if ( ! in_array( $handle[0], $this->queue, true ) && isset( $this->registered[ $handle[0] ] ) ) {
318 $this->queue[] = $handle[0];
users_DeleteReassign.php (https://bitbucket.org/ferOnti/processmaker.git) PHP · 165 lines
1 <?php
2 /**
3 * cases_ReassignByUser.php
83 $aAux2 = $oGroups->getUsersOfGroup( $aGroup['GRP_UID'] );
84 foreach ($aAux2 as $aUser) {
85 if (! in_array( $aUser['USR_UID'], $aUsers )) {
86 $aUsers[] = $aUser['USR_UID'];
87 $aData = $oUser->load( $aUser['USR_UID'] );
94 $aAux1 = $oTasks->getUsersOfTask( $aRow['TAS_UID'], 1 );
95 foreach ($aAux1 as $aUser) {
96 if (! in_array( $aUser['USR_UID'], $aUsers )) {
97 $aUsers[] = $aUser['USR_UID'];
98 $aData = $oUser->load( $aUser['USR_UID'] );
123 $aAux2 = $oGroups->getUsersOfGroup( $aGroup['GRP_UID'] );
124 foreach ($aAux2 as $aUser) {
125 if (! in_array( $aUser['USR_UID'], $aUsers )) {
126 $aUsers[] = $aUser['USR_UID'];
127 $aData = $oUser->load( $aUser['USR_UID'] );
php.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 2590 lines
11 </PROPS>
12 <RULES IGNORE_CASE="TRUE">
13 <SPAN TYPE="MARKUP" DELEGATE="PHP">
14 <BEGIN><?php</BEGIN>
16 </SPAN>
18 <SPAN TYPE="MARKUP" DELEGATE="PHP">
19 <BEGIN><?</BEGIN>
20 <END>?></END>
21 </SPAN>
23 <SPAN TYPE="MARKUP" DELEGATE="PHP">
24 <BEGIN><%=</BEGIN>
25 <END>%></END>
65 <RULES SET="TAGS" DEFAULT="MARKUP">
66 <SPAN TYPE="MARKUP" DELEGATE="PHP">
67 <BEGIN><?php</BEGIN>
session.php
(http://forceworkbench.googlecode.com/svn/trunk/workbench/)
PHP · 106 lines
✨ Summary
This PHP code initializes and configures a Workbench application, setting up session management, error handling, and security measures to ensure a secure connection with Salesforce. It also checks for user authentication, validates CSRF tokens, and monitors user activity to prevent idle sessions from expiring prematurely.
This PHP code initializes and configures a Workbench application, setting up session management, error handling, and security measures to ensure a secure connection with Salesforce. It also checks for user authentication, validates CSRF tokens, and monitors user activity to prevent idle sessions from expiring prematurely.
9 require_once 'config.php';
10 if(is_file('configOverrides.php')) require_once 'configOverrides.php';
12 foreach ($config as $configKey => $configValue) {
50 //clear ResultsWithData and retrievedZips from session unless downloading them
51 if (isset($_SESSION['resultsWithData']) && basename($_SERVER['PHP_SELF']) != 'downloadResultsWithData.php') {
52 unset($_SESSION['resultsWithData']);
53 }
55 if (isset($_SESSION['retrievedZips']) && basename($_SERVER['PHP_SELF']) != 'metadataStatus.php') {
56 unset($_SESSION['retrievedZips']);
57 }
94 if (isLoggedIn()) {
95 // todo: should this be in the ctx?
96 if (!in_array(basename($_SERVER['PHP_SELF'], ".php"), array("login", "logout")) && isset($_SESSION['lastRequestTime'])) {
97 $idleTime = microtime(true) - $_SESSION['lastRequestTime'];
98 if ($idleTime > (getConfig("sessionIdleMinutes") * 60)) {