PageRenderTime 2699ms queryTime 143ms sortTime 975ms getByIdsTime 140ms findMatchingLines 114ms

100+ results results for 'php array' (2699 ms)

Not the results you expected?
renderer.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 301 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
61        $inputname = $qa->get_qt_field_name('answer');
                    
62        $inputattributes = array(
                    
63            'type' => $this->get_input_type(),
                    
70
                    
71        $radiobuttons = array();
                    
72        $feedbackimg = array();
                    
72        $feedbackimg = array();
                    
73        $feedback = array();
                    
74        $classes = array();
                    
87            if (!$options->readonly && $this->get_input_type() == 'checkbox') {
                    
88                $hidden = html_writer::empty_tag('input', array(
                    
89                    'type' => 'hidden',
                    
99                                $qa, 'question', 'answer', $ansid)),
                    
100                    array('for' => $inputattributes['id']));
                    
101
                    
                
lib_test.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 262 lines
                    
205        );
                    
206        $assessment1 = (object)array('dimgrades' => array(3 => 15, 4 => 2));
                    
207        $assessment2 = (object)array('dimgrades' => array(3 => 15, 4 => 2));
                    
219        );
                    
220        $assessment1 = (object)array('dimgrades' => array(3 => 25, 4 => 4));
                    
221        $assessment2 = (object)array('dimgrades' => array(3 => 75, 4 => 2));
                    
221        $assessment2 = (object)array('dimgrades' => array(3 => 75, 4 => 2));
                    
222        $referential = (object)array('dimgrades' => array(3 => 50, 4 => 3));
                    
223        $settings = (object)array('comparison' => 5);
                    
234        $assessment2 = (object)array('dimgrades' => array(1 => 50, 2 => 33.33333));
                    
235        $referential = (object)array('dimgrades' => array(1 => 25, 2 => 50));
                    
236        $settings = (object)array('comparison' => 9);
                    
249
                    
250    public function normalize_grades(array $assessments, array $diminfo) {
                    
251        return parent::normalize_grades($assessments, $diminfo);
                    
                
communitycourse.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 248 lines
                    
32require_once($CFG->dirroot . '/blocks/community/forms.php');
                    
33require_once($CFG->dirroot . '/' . $CFG->admin . '/registration/lib.php');
                    
34
                    
80    echo $renderer->save_link_success(
                    
81            new moodle_url('/course/view.php', array('id' => $courseid)));
                    
82    echo $OUTPUT->footer();
                    
118    echo html_writer::tag('div', get_string('downloaded', 'block_community'),
                    
119            array('class' => 'textinfo'));
                    
120    echo $OUTPUT->notification(get_string('downloadconfirmed', 'block_community',
                    
230$PAGE->requires->yui_module('moodle-block_community-comments', 'M.blocks_community.init_comments',
                    
231        array(array('commentids' => $commentedcourseids, 'closeButtonTitle' => get_string('close', 'editor'))));
                    
232$PAGE->requires->yui_module('moodle-block_community-imagegallery', 'M.blocks_community.init_imagegallery',
                    
232$PAGE->requires->yui_module('moodle-block_community-imagegallery', 'M.blocks_community.init_imagegallery',
                    
233        array(array('imageids' => $courseids, 'imagenumbers' => $courseimagenumbers,
                    
234                'huburl' => $huburl, 'closeButtonTitle' => get_string('close', 'editor'))));
                    
                
shortcode.js https://gitlab.com/Mirros/jsdelivr | JavaScript | 342 lines
                    
88		// The base regex is functionally equivalent to the one found in
                    
89		// `get_shortcode_regex()` in `wp-includes/shortcodes.php`.
                    
90		//
                    
110		// Named attributes are assigned on a key/value basis, while numeric
                    
111		// attributes are treated as an array.
                    
112		//
                    
121			// This regular expression is reused from `shortcode_parse_atts()`
                    
122			// in `wp-includes/shortcodes.php`.
                    
123			//
                    
                
sesivacka.php https://gitlab.com/error414/fileshit | PHP | 433 lines
                    
1<?php
                    
2
                    
48     *      
                    
49     *@var array
                    
50     */
                    
50     */
                    
51    private $supportImgType = array(
                    
52                                'image/gif',
                    
62     *      
                    
63     *@var array
                    
64     */
                    
64     */
                    
65   public $imageInfo = array();
                    
66   
                    
123    {
                    
124        if (version_compare(PHP_VERSION , '5.0.3', '<')){
                    
125            die('sesivacka potrebuje PHP ve verzi 5.0.3 nebo novejsi');
                    
                
class.wp-styles.php https://gitlab.com/VTTE/sitios-vtte | PHP | 461 lines
                    
1<?php
                    
2/**
                    
98	 * @since 2.8.0
                    
99	 * @var array
                    
100	 */
                    
134		 */
                    
135		do_action_ref_array( 'wp_default_styles', array( &$this ) );
                    
136	}
                    
267
                    
268			/** This filter is documented in wp-includes/class.wp-styles.php */
                    
269			$rtl_tag = apply_filters( 'style_loader_tag', $rtl_tag, $handle, $rtl_href, $media );
                    
310		if ( ! $after ) {
                    
311			$after = array();
                    
312		}
                    
359	 *
                    
360	 * @param string|string[] $handles   Item handle (string) or item handles (array of strings).
                    
361	 * @param bool            $recursion Optional. Internal flag that function is calling itself.
                    
                
em-shortcode.php https://gitlab.com/Blueprint-Marketing/interoccupy.net | PHP | 248 lines
                    
16	$img_url = is_ssl() ? 'https://www.google.com/calendar/images/ext/gc_button6.gif':'http://www.google.com/calendar/images/ext/gc_button6.gif';
                    
17	$atts = shortcode_atts(array('img'=>$img_url, 'button'=>6), $atts);
                    
18	if( $img_url == $atts['img'] && $atts['button'] != 6 ){
                    
34	ob_start();
                    
35	em_locate_template('templates/map-global.php',true, array('args'=>$args)); 
                    
36	return ob_get_clean();
                    
106function em_get_location_shortcode($atts, $format='') {
                    
107	$atts = (array) $atts;
                    
108	$atts['format'] = ($format != '' || empty($atts['format'])) ? $format : $atts['format']; 
                    
139 * Shows a single location according to given specifications. Accepts any event query attribute.
                    
140 * @param array $atts
                    
141 * @return string
                    
143function em_get_event_category_shortcode($atts, $format='') {
                    
144	$atts = (array) $atts;
                    
145	$atts['format'] = ($format != '' || empty($atts['format'])) ? $format : $atts['format']; 
                    
                
config.php https://gitlab.com/webkod3r/tripolis | PHP | 216 lines
                    
78															if ( ! function_exists( 'wp_http_supports' ) ) {
                    
79																?><b><?php esc_html_e( 'Disabled.', 'akismet' ); ?></b> <?php printf( esc_html( 'Your WordPress installation does not include the function %s; upgrade to the latest version of WordPress.', 'akismet' ), '<code>wp_http_supports</code>' ); ?><?php
                    
80															}
                    
81															else if ( ! wp_http_supports( array( 'ssl' ) ) ) {
                    
82																?><b><?php esc_html_e( 'Disabled.', 'akismet' ); ?></b> <?php esc_html_e( 'Your Web server cannot make SSL requests; contact your Web host and ask them to add support for SSL requests.', 'akismet' ); ?><?php
                    
83															}
                    
87																if ( $ssl_disabled ) {
                    
88																	?><b><?php esc_html_e( 'Temporarily disabled.', 'akismet' ); ?></b> <?php esc_html_e( 'Akismet encountered a problem with a previous SSL request and disabled it temporarily. It will begin using SSL for requests again shortly.', 'akismet' ); ?><?php
                    
89																}
                    
90																else {
                    
91																	?><b><?php esc_html_e( 'Enabled.', 'akismet' ); ?></b> <?php esc_html_e( 'All systems functional.', 'akismet' ); ?><?php
                    
92																}
                    
104													<p>
                    
105														<label for="akismet_show_user_comments_approved" title="<?php esc_attr_e( 'Show approved comments' , 'akismet'); ?>"><input name="akismet_show_user_comments_approved" id="akismet_show_user_comments_approved" value="1" type="checkbox" <?php checked('1', get_option('akismet_show_user_comments_approved')); ?>> <?php esc_html_e('Show the number of approved comments beside each comment author', 'akismet'); ?></label>
                    
106													</p>
                    
                
XmlFileLoader.php https://gitlab.com/Pasantias/pasantiasASLG | PHP | 270 lines
                    
1<?php
                    
2
                    
221     *
                    
222     * @return array An array with the defaults as first item, requirements as second and options as third.
                    
223     *
                    
227    {
                    
228        $defaults = array();
                    
229        $requirements = array();
                    
229        $requirements = array();
                    
230        $options = array();
                    
231        $condition = null;
                    
256
                    
257        return array($defaults, $requirements, $options, $condition);
                    
258    }
                    
                
Filesystem.php https://gitlab.com/judielsm/Handora | PHP | 442 lines
                    
1<?php
                    
2
                    
114     *
                    
115     * @param  string|array  $paths
                    
116     * @return bool
                    
119    {
                    
120        $paths = is_array($paths) ? $paths : func_get_args();
                    
121
                    
264     * @param  int     $flags
                    
265     * @return array
                    
266     */
                    
272    /**
                    
273     * Get an array of all files in a directory.
                    
274     *
                    
275     * @param  string  $directory
                    
276     * @return array
                    
277     */
                    
                
ins_search.php https://github.com/md-tech/openemr.git | PHP | 374 lines
                    
19
                    
20 include_once("../globals.php");
                    
21 include_once("$srcdir/acl.inc");
                    
27 // really be in a SQL table.
                    
28 $freeb_type_array = array(''
                    
29  , xl('Other HCFA')
                    
84
                    
85<?php require($GLOBALS['srcdir'] . "/restoreSession.php"); ?>
                    
86
                    
254 <tr>
                    
255  <td valign='top' nowrap><b><?php xl('Attention','e');?>:</b></td>
                    
256  <td>
                    
358<p>&nbsp;<br>
                    
359<input type='button' value='<?php xl('Search','e'); ?>' class='search' onclick='dosearch()' />
                    
360&nbsp;
                    
                
page.tpl.php https://github.com/krimson-rayne/GameScoops-Theme.git | PHP | 288 lines
                    
1<?php
                    
2	$vars = get_defined_vars();
                    
6	if (isset($page))
                    
7		foreach (array_keys($page) as $name)
                    
8				$$name = & $page[$name];
                    
27<div class="art-logo">
                    
28     <?php   if (!empty($site_name)) { echo '<h1 class="art-logo-name"><a href="'.check_url($front_page).'" title = "'.$site_name.'">'.$site_name.'</a></h1>'; } ?>
                    
29     <?php   if (!empty($site_slogan)) { echo '<h2 class="art-logo-text">'.$site_slogan.'</h2>'; } ?>
                    
46    <div class="art-sheet-body">
                    
47<?php if (!empty($navigation) || !empty($extra1) || !empty($extra2)): ?>
                    
48<div class="art-nav">
                    
151<?php if (!empty($messages)) { echo $messages; } ?>
                    
152<?php if (isset($action_links) && !empty($action_links)): ?><ul class="action-links"><?php print render($action_links); ?></ul><?php endif; ?>
                    
153
                    
210<?php if (!empty($messages)) { echo $messages; } ?>
                    
211<?php if (isset($action_links) && !empty($action_links)): ?><ul class="action-links"><?php print render($action_links); ?></ul><?php endif; ?>
                    
212<?php echo art_content_replace(render($content)); ?>
                    
                
RefHelper.create.php https://github.com/ChuguluGames/mediawiki-svn.git | PHP | 238 lines
                    
1<?php
                    
2class RefHelper extends SpecialPage {
                    
16		$out->addHTML( Xml::openElement( 'tr' ) );
                    
17		$out->addHTML( Xml::openElement( 'td', array( 'class' => 'mw-label' ) ) );
                    
18		$out->addHTML( Xml::element( 'label', array( 'for' => $varname ), "$label" ) );
                    
20		$out->addHTML( Xml::openElement( 'td' ) );
                    
21		$out->addHTML( Xml::input( $varname, $size, $varval, array( 'id' => "inp_$varname" ) ) );
                    
22		$out->addHTML( Xml::closeElement( 'td' ) );
                    
31		$out->addHTML( Xml::openElement( 'tr' ) );
                    
32		$out->addHTML( Xml::openElement( 'td', array( 'class' => 'mw-label' ) ) );
                    
33		$out->addHTML( Xml::element( 'label', array( 'for' => $varname1 ), "$label1" ) );
                    
35		$out->addHTML( Xml::openElement( 'td' ) );
                    
36		$out->addHTML( Xml::input( $varname1, 15, $varval1, array( 'id' => "inp_$varname1", 'oninput' => 'updateFirstName(event)' ) ) );
                    
37		$out->addHTML( Xml::element( 'label', array( 'for' => $varname2 ), " $label2: " ) );
                    
37		$out->addHTML( Xml::element( 'label', array( 'for' => $varname2 ), " $label2: " ) );
                    
38		$out->addHTML( Xml::input( $varname2, 20, $varval2, array( 'id' => "inp_$varname2", 'oninput' => 'updateSurname(event)' ) ) );
                    
39		$out->addHTML( Xml::closeElement( 'td' ) );
                    
                
horizontal_bar.php https://github.com/ardowz/Thesis-SideB.git | PHP | 292 lines
                    
1<?php
                    
2/**
                    
24 *  // Add data to line chart
                    
25 *  $chart->data['sample dataset'] = new ezcGraphArrayDataSet(
                    
26 *      array(
                    
72     * 
                    
73     * @param array $options Default option array
                    
74     * @return void
                    
76     */
                    
77    public function __construct( array $options = array() )
                    
78    {
                    
110        // Initialize counters
                    
111        $nr = array();
                    
112        $count = array();
                    
230        // Virtual data set build for agrregated values sums for bar charts
                    
231        $virtualBarSumDataSet = array( array(), array() );
                    
232
                    
                
ShowController.php https://bitbucket.org/Sinfin/pawtucket.git | PHP | 210 lines
                    
75 			$va_sets = caExtractValuesByUserLocale($t_set->getSets(array('table' => 'ca_objects', 'access' => __CA_SET_READ_ACCESS__, 'user_id' => $this->request->getUserID())));
                    
76 			$va_set_first_items = $t_set->getFirstItemsFromSets(array_keys($va_sets), array("version" => "widepreview", "checkAccess" => $va_access_values));
                    
77 			$va_set_descriptions = $t_set->getAttributeFromSets($this->opo_plugin_config->get('set_description_element_code'), array_keys($va_sets), array("checkAccess" => $va_access_values));
                    
78			$va_set_date = $t_set->getAttributeFromSets('setdate', array_keys($va_sets), array("checkAccess" => $va_access_values));
                    
79			$va_set_creator = $t_set->getAttributeFromSets('setcreator', array_keys($va_sets), array("checkAccess" => $va_access_values));
                    
80 		
                    
113 			$this->view->setVar('t_set', $t_set);
                    
114 			$va_items = caExtractValuesByUserLocale($t_set->getItems(array('thumbnailVersions' => array('widepreview', 'medium'), 'access' => __CA_SET_READ_ACCESS__, "checkAccess" => $va_access_values, 'user_id' => $this->request->getUserID())));
                    
115 			$this->view->setVar('items', $va_items);
                    
132 			$va_set_first_items = array();
                    
133 			$va_set_first_items = $t_set->getFirstItemsFromSets(array_keys($va_sets), array("version" => "icon", "checkAccess" => $va_access_values));
                    
134 		
                    
182 			$va_set_item_info["item_id"] = $t_set_item->get("item_id");
                    
183			$va_rep = $t_set_item->getRepresentations(array("mediumlarge", "small"), null, array("return_with_access" => $va_access_values));
                    
184			
                    
                
formTimeperiod.php https://gitlab.com/florianocomercial/centreon | PHP | 302 lines
                    
53	$res = $pearDB->query("SELECT * FROM timeperiod_include_relations WHERE timeperiod_id = '".$tp_id."'");
                    
54	$tp["tp_include"] = array();
                    
55	while ($row = $res->fetchRow()) {
                    
143    $attrTimeperiods,
                    
144    array('defaultDatasetRoute' => './include/common/webServices/rest/internal.php?object=centreon_configuration_timeperiod&action=defaultValues&target=timeperiodRenderer&field=tp_include&id=' . $tp_id)
                    
145);
                    
150 */
                    
151$mTp = array();
                    
152$k = 0;
                    
173		globalExceptionTabId[<?php echo $k;?>] = <?php echo $exception_id[$k];?>;
                    
174		globalExceptionTabName[<?php echo $k;?>] = '<?php echo $exception_days[$k];?>';
                    
175		globalExceptionTabTimerange[<?php echo $k;?>] = '<?php echo $exception_timerange[$k];?>';
                    
175		globalExceptionTabTimerange[<?php echo $k;?>] = '<?php echo $exception_timerange[$k];?>';
                    
176		globalExceptionTabTimeperiodId[<?php echo $k;?>] = <?php echo $exception_timeperiod_id[$k];?>;
                    
177		</script>
                    
                
HeadMeta.php https://gitlab.com/rsilveira1987/Expresso | PHP | 363 lines
                    
1<?php
                    
2/**
                    
18 * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
                    
19 * @version    $Id: HeadMeta.php 10020 2009-08-18 14:34:09Z j.fischer@metaways.de $
                    
20 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
23/** Zend_View_Helper_Placeholder_Container_Standalone */
                    
24require_once 'Zend/View/Helper/Placeholder/Container/Standalone.php';
                    
25
                    
39     * Types of attributes
                    
40     * @var array
                    
41     */
                    
41     */
                    
42    protected $_typeKeys     = array('name', 'http-equiv');
                    
43    protected $_requiredKeys = array('content');
                    
43    protected $_requiredKeys = array('content');
                    
44    protected $_modifierKeys = array('lang', 'scheme');
                    
45
                    
                
Mcrypt.php https://gitlab.com/rsilveira1987/Expresso | PHP | 364 lines
                    
46     */
                    
47    protected $_encryption = array(
                    
48        'key'                 => 'ZendFramework',
                    
59     *
                    
60     * @var array
                    
61     */
                    
80        } elseif (is_string($options)) {
                    
81            $options = array('key' => $options);
                    
82        } elseif (!is_array($options)) {
                    
117        if (!is_array($options)) {
                    
118            require_once 'Zend/Filter/Exception.php';
                    
119            throw new Zend_Filter_Exception('Invalid options argument provided to filter');
                    
171            $this->_srand();
                    
172            if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' && version_compare(PHP_VERSION, '5.3.0', '<')) {
                    
173                $method = MCRYPT_RAND;
                    
                
Core.php https://gitlab.com/rsilveira1987/Expresso | PHP | 239 lines
                    
108		PHPExcel_Worksheet_PageSetup::PAPERSIZE_ITALY_ENVELOPE					=> array(311.81,651.97),	//	(110 mm by 230 mm)
                    
109		PHPExcel_Worksheet_PageSetup::PAPERSIZE_MONARCH_ENVELOPE				=> array(279.00,540.00),	//	(3.875 in. by 7.5 in.)
                    
110		PHPExcel_Worksheet_PageSetup::PAPERSIZE_6_3_4_ENVELOPE					=> array(261.00,468.00),	//	(3.625 in. by 6.5 in.)
                    
120		PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER_EXTRA_PAPER				=> array(667.80,864.00),	//	(9.275 in. by 12 in.)
                    
121		PHPExcel_Worksheet_PageSetup::PAPERSIZE_LEGAL_EXTRA_PAPER				=> array(667.80,1080.00),	//	(9.275 in. by 15 in.)
                    
122		PHPExcel_Worksheet_PageSetup::PAPERSIZE_TABLOID_EXTRA_PAPER				=> array(841.68,1296.00),	//	(11.69 in. by 18 in.)
                    
134		PHPExcel_Worksheet_PageSetup::PAPERSIZE_A5_EXTRA_PAPER					=> array(493.23,666.14),	//	(174 mm by 235 mm)
                    
135		PHPExcel_Worksheet_PageSetup::PAPERSIZE_ISO_B5_EXTRA_PAPER				=> array(569.76,782.36),	//	(201 mm by 276 mm)
                    
136		PHPExcel_Worksheet_PageSetup::PAPERSIZE_A2_PAPER						=> 'A2',					//	(420 mm by 594 mm)
                    
137		PHPExcel_Worksheet_PageSetup::PAPERSIZE_A3_TRANSVERSE_PAPER				=> 'A3',					//	(297 mm by 420 mm)
                    
138		PHPExcel_Worksheet_PageSetup::PAPERSIZE_A3_EXTRA_TRANSVERSE_PAPER		=> array(912.76,1261.42)	//	(322 mm by 445 mm)
                    
139	);
                    
143	 *
                    
144	 * @param 	PHPExcel	$phpExcel	PHPExcel object
                    
145	 */
                    
                
Mysql4.php https://gitlab.com/LisovyiEvhenii/ismextensions | PHP | 322 lines
                    
1<?php
                    
2/**
                    
9 * It is also available through the world-wide-web at this URL:
                    
10 * http://opensource.org/licenses/osl-3.0.php
                    
11 * If you did not receive a copy of the license and are unable to
                    
23 * @copyright  Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
                    
24 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
29    /**
                    
30     * Tables foreign key data array
                    
31     * [tbl_name] = array(create foreign key strings)
                    
32     *
                    
33     * @var array
                    
34     */
                    
34     */
                    
35    protected $_foreignKeys    = array();
                    
36
                    
                
Collection.php https://gitlab.com/LisovyiEvhenii/ismextensions | PHP | 411 lines
                    
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
                    
53     *
                    
54     * @var array
                    
55     */
                    
255        )
                    
256        ->join(array('t' => $tagTable), 't.tag_id = tr.tag_id', array('*'));
                    
257    }
                    
282    {
                    
283        $productsId   = array();
                    
284        $productsData = array();
                    
397
                    
398            $appliedOrders = array();
                    
399            foreach ($orders as $order) {
                    
                
Tax.php https://github.com/rgranadino/magento-mirror.git | PHP | 301 lines
                    
1<?php
                    
2/**
                    
9 * It is also available through the world-wide-web at this URL:
                    
10 * http://opensource.org/licenses/osl-3.0.php
                    
11 * If you did not receive a copy of the license and are unable to
                    
23 * @copyright   Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
                    
24 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
102    {
                    
103        $taxTotal = new Varien_Object(array(
                    
104            'code'      => 'tax',
                    
144            $baseSubtotalIncl = max(0, $baseSubtotalIncl);
                    
145            $totalExcl = new Varien_Object(array(
                    
146                'code'      => 'subtotal_excl',
                    
150            ));
                    
151            $totalIncl = new Varien_Object(array(
                    
152                'code'      => 'subtotal_incl',
                    
                
download_phenotype_class.php https://github.com/Dave-Matthews/The-Triticeae-Toolbox.git | PHP | 283 lines
                    
1<?php
                    
2/**
                    
39        $result_thtbase=mysqli_query($mysqli, $sql) or die(mysqli_error($mysqli));
                    
40        while ($row_thtbase=mysqli_fetch_array($result_thtbase)) {
                    
41            $thtbase_uid[] = $row_thtbase['tht_base_uid'];
                    
45        $num_lines = count($linerecord_uid);
                    
46        $titles=array('Line Name'); //stores the titles for the display table with units
                    
47        $titles[]="GRIN Accession";//add CAP Code column to titles
                    
63
                    
64        while ($row1=mysqli_fetch_array($result1)) {
                    
65            $phenotype_data_name[]=$row1['name'];
                    
73
                    
74        $all_rows=array(); //2D array that will hold the values in table format to be displayed
                    
75        $all_rows_long=array(); // For the full unrounded values
                    
75        $all_rows_long=array(); // For the full unrounded values
                    
76        $single_row=array(); //1D array which will hold each row values in the table format to be displayed
                    
77        $single_row_long=array();
                    
                
AbstractFindAdapter.php https://gitlab.com/techniconline/kmc | PHP | 331 lines
                    
1<?php
                    
2
                    
51        if (Iterator\FileTypeFilterIterator::ONLY_DIRECTORIES === $this->mode && ($this->contains || $this->notContains)) {
                    
52            return new Iterator\FilePathsIterator(array(), $dir);
                    
53        }
                    
63
                    
64        if (PHP_INT_MAX !== $this->maxDepth) {
                    
65            $find->add('-maxdepth')->add($this->maxDepth + 1);
                    
104
                    
105        $paths = $this->shell->testCommand('uniq') ? $command->add('| uniq')->execute() : array_unique($command->execute());
                    
106        $iterator = new Iterator\FilePathsIterator($paths, $dir);
                    
155     */
                    
156    private function buildNamesFiltering(Command $command, array $names, $not = false)
                    
157    {
                    
203     */
                    
204    private function buildPathsFiltering(Command $command, $dir, array $paths, $not = false)
                    
205    {
                    
                
README.markdown https://github.com/d11wtq/php-resque.git | Markdown | 332 lines
                    
150
                    
151    $ QUEUE=file_serve php resque.php
                    
152
                    
156
                    
157   $ QUEUE=file_serve APP_INCLUDE=../application/init.php php resque.php
                    
158
                    
189
                    
190    $ QUEUE=* php resque.php
                    
191
                    
196
                    
197	$ COUNT=5 php resque.php
                    
198
                    
244
                    
245`[callback]` may be anything in PHP that is callable by `call_user_func_array`:
                    
246
                    
                
Form_Input.php https://bitbucket.org/JakePratt/kupcakz.com.git | PHP | 555 lines
                    
61
                    
62			if (in_array($action, array('-', '+', '=')))
                    
63			{
                    
234			{
                    
235				if ( ! in_array($rule, $this->rules))
                    
236				{
                    
269	 * @chainable
                    
270	 * @param   string|array  failed validation function, or an array of messages
                    
271	 * @param   string        error message
                    
316				// Force args to be an array
                    
317				$args = is_array($args) ? $args : array();
                    
318
                    
461							default:
                    
462								call_user_func_array(array($this, $rule), $args);
                    
463							break;
                    
                
admin.php https://github.com/Doap/pyrocms.git | PHP | 460 lines
                    
99		$all_options 	= $this->themes_m->get_options_by(array('theme'=> $slug));
                    
100		$options_array 	= array();
                    
101
                    
107				$this->validation_rules[] = array(
                    
108					'field' => $option->slug . (in_array($option->type, array('select-multiple', 'checkbox')) ? '[]' : ''),
                    
109					'label' => $option->title,
                    
154
                    
155				return $this->template->build_json(array(
                    
156					'status'	=> 'error',
                    
270		$this->load->helper('file');
                    
271		$name_array = $theme_name ? array($theme_name) : $this->input->post('action_to');
                    
272
                    
448	{
                    
449		$select_array = array();
                    
450
                    
                
Grid.php https://bitbucket.org/acidel/buykoala.git | PHP | 192 lines
                    
123		
                    
124		$this->addColumn ( 'billing_region', array ('header' => Mage::helper ( 'customer' )->__ ( 'State/Province' ), 'width' => '100', 'index' => 'billing_region' ) );
                    
125		
                    
137		
                    
138		$this->addColumn ( 'action', array ('header' => Mage::helper ( 'customer' )->__ ( 'Action' ), 'width' => '120px', 'type' => 'action', 'getter' => 'getId', 'actions' => array (array ('caption' => Mage::helper ( 'rewards' )->__ ( 'Make Transfer' ), 'url' => array ('base' => '*/manage_transfer/new/controller/manage_customer_points' ), 'field' => 'customer_id' ) ), 'filter' => false, 'sortable' => false, 'index' => 'stores', 'is_system' => true ) );
                    
139		
                    
175		$cids = Mage::helper ( 'rewards/currency' )->getAvailCurrencyIds ();
                    
176		//array_unshift($currencies, array('label'=> '', 'value'=> ''));
                    
177		
                    
178
                    
179		$mass_transfer_fields = array ('points' => array ('name' => 'quantity', 'type' => 'text', 'class' => 'required-entry', 'label' => Mage::helper ( 'customer' )->__ ( 'Quantity' ) ) );
                    
180		if (sizeof ( $cids ) > 1) {
                    
186		$this->getMassactionBlock ()->addItem ( 'mass_distribution', array ('label' => Mage::helper ( 'rewards' )->__ ( 'Give Points' ), 'url' => $this->getUrl ( '*/*/massTransferPoints', array ('is_deduction' => 0 ) ), 'additional' => $mass_transfer_fields, 'confirm' => Mage::helper ( 'customer' )->__ ( 'Are you sure you want to create the transfer for all selected customers?' ) ) );
                    
187		$this->getMassactionBlock ()->addItem ( 'mass_redemption', array ('label' => Mage::helper ( 'rewards' )->__ ( 'Deduct Points' ), 'url' => $this->getUrl ( '*/*/massTransferPoints', array ('is_deduction' => 1 ) ), 'additional' => array ('currency' => array ('name' => 'currency', 'type' => 'select', 'class' => 'required-entry', 'label' => Mage::helper ( 'customer' )->__ ( 'Currency' ), 'values' => $currencies ), 'points' => array ('name' => 'quantity', 'type' => 'text', 'class' => 'required-entry', 'label' => Mage::helper ( 'customer' )->__ ( 'Quantity' ) ) ), 'confirm' => Mage::helper ( 'customer' )->__ ( 'Are you sure you want to create the transfer for all selected customers?' ) ) );
                    
188		
                    
                
Edit.php https://bitbucket.org/acidel/buykoala.git | PHP | 231 lines
                    
1<?php

                    
2

                    
15        $this->_updateButton('delete', 'label', Mage::helper('groupdeals')->__('Delete Deal'));

                    
16        $this->_updateButton('delete', 'onclick', 'deleteConfirm(\'Are you sure you want to do this?\', \''.$this->getUrl('*/*/delete', array('groupdeals_id' => $this->getRequest()->getParam('groupdeals_id'), 'id' => $this->getProductId())).'\')');

                    
17		$this->_removeButton('reset');		

                    
17		$this->_removeButton('reset');		

                    
18        $this->_addButton('saveandcontinue', array(

                    
19            'label'     => Mage::helper('adminhtml')->__('Save And Continue Edit'),

                    
61			

                    
62			$this->_addButton('email_coupons', array(

                    
63				'label'     => Mage::helper('adminhtml')->__('Email Coupons'),

                    
63				'label'     => Mage::helper('adminhtml')->__('Email Coupons'),

                    
64				'onclick'   => 'deleteConfirm(\''.$emailMessage.'\', \''.$this->getUrl('*/*/email', array('groupdeals_id' => $this->getRequest()->getParam('groupdeals_id'), 'id' => $this->getProductId())).'\')',           	

                    
65			));		 

                    
66			

                    
67			$this->_addButton('email_merchants', array(

                    
68				'label'     => Mage::helper('adminhtml')->__('Email Coupons CSV to Merchant'),

                    
                
AbstractAction.php https://gitlab.com/crazybutterfly815/magento2 | PHP | 361 lines
                    
1<?php
                    
2/**
                    
10 *
                    
11 * @SuppressWarnings(PHPMD.NumberOfChildren)
                    
12 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
                    
31    /**
                    
32     * Array of actions which can be processed without secret key validation
                    
33     *
                    
33     *
                    
34     * @var array
                    
35     */
                    
305     * @param   string $path
                    
306     * @param   array $arguments
                    
307     * @return \Magento\Framework\App\ResponseInterface
                    
350    {
                    
351        if (is_array($this->_publicActions) && in_array($this->getRequest()->getActionName(), $this->_publicActions)) {
                    
352            return true;
                    
                
condition.php https://gitlab.com/unofficial-mirrors/moodle | PHP | 292 lines
                    
36class condition extends \core_availability\condition {
                    
37    /** @var array Array from group id => name */
                    
38    protected static $groupnames = array();
                    
75            if ($this->groupid) {
                    
76                $allow = in_array($this->groupid, $groups);
                    
77            } else {
                    
183    public static function wipe_static_cache() {
                    
184        self::$groupnames = array();
                    
185    }
                    
192
                    
193    public function filter_user_list(array $users, $not, \core_availability\info $info,
                    
194            \core_availability\capability_checker $checker) {
                    
289                 WHERE (userids.id IN ($aagsql)) OR $condition EXISTS ($matchsql)";
                    
290        return array($sql, array_merge($enrolparams, $aagparams, $matchparams));
                    
291    }
                    
                
SfPropelBehaviorI18n.php https://github.com/StefanRHRO/SCRM.git | PHP | 389 lines
                    
126    $foreignKey = $this->getI18nTable()->getBehavior('symfony_i18n_translation')->getForeignKey();
                    
127    $refPhpName = $foreignKey->getRefPhpName() ? $foreignKey->getRefPhpName() : $this->getI18nTable()->getPhpName();
                    
128
                    
142{
                    
143  return \$this->getCurrent{$refPhpName}(\$culture)->get{$column->getPhpName()}();
                    
144}
                    
193 */
                    
194public function set{$refPhpName}ForCulture({$this->getI18nTable()->getPhpName()} \$object, \$culture)
                    
195{
                    
222    $foreignKey = $this->getI18nTable()->getBehavior('symfony_i18n_translation')->getForeignKey();
                    
223    $refPhpName = $foreignKey->getRefPhpName() ? $foreignKey->getRefPhpName() : $this->getI18nTable()->getPhpName();
                    
224    $join = in_array($this->getBuildProperty('propel.useLeftJoinsInDoJoinMethods'), array(true, null), true) ? 'LEFT' : 'INNER';
                    
272  {$this->getTable()->getPhpName()}Peer::addSelectColumns(\$criteria);
                    
273  \$startcol = ({$this->getTable()->getPhpName()}Peer::NUM_COLUMNS - {$this->getTable()->getPhpName()}Peer::NUM_LAZY_LOAD_COLUMNS);
                    
274  {$this->getI18nTable()->getPhpName()}Peer::addSelectColumns(\$criteria);
                    
                
Tax.php https://bitbucket.org/sevenly/magento-ce.git | PHP | 301 lines
                    
1<?php
                    
2/**
                    
9 * It is also available through the world-wide-web at this URL:
                    
10 * http://opensource.org/licenses/osl-3.0.php
                    
11 * If you did not receive a copy of the license and are unable to
                    
23 * @copyright   Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
                    
24 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
102    {
                    
103        $taxTotal = new Varien_Object(array(
                    
104            'code'      => 'tax',
                    
144            $baseSubtotalIncl = max(0, $baseSubtotalIncl);
                    
145            $totalExcl = new Varien_Object(array(
                    
146                'code'      => 'subtotal_excl',
                    
150            ));
                    
151            $totalIncl = new Varien_Object(array(
                    
152                'code'      => 'subtotal_incl',
                    
                
import.lib.php https://github.com/shafiqissani/ASTRA-College-Website.git | PHP | 283 lines
                    
1<?php
                    
2/* $Id: import.lib.php 9905 2007-02-01 17:33:29Z lem9 $ */
                    
7// We need to know something about user
                    
8require_once('./libraries/check_user_privileges.lib.php');
                    
9// We do this check
                    
114                            if (!isset($my_die)) {
                    
115                                $my_die = array();
                    
116                            }
                    
116                            }
                    
117                            $my_die[] = array('sql' => $import_run_buffer['full'], 'error' => PMA_DBI_getError());
                    
118
                    
165            }
                    
166            // check length of query unless we decided to pass it to sql.php
                    
167            if (!$go_sql) {
                    
184    if (!empty($sql) || !empty($full)) {
                    
185        $import_run_buffer = array('sql' => $sql, 'full' => $full);
                    
186    } else {
                    
                
sk.php https://github.com/adobo/agendav.git | PHP | 263 lines
                    
1<?php
                    
2/*
                    
18
                    
19$translations = array(
                    
20    'labels.username' => 'Používateľské meno',
                    
                
rararchive.getentries.html https://bitbucket.org/thncr/manuals.git | HTML | 165 lines
                    
11 <div class="up"><a href="class.rararchive.html">RarArchive</a></div>
                    
12 <div class="home"><a href="index.html">PHP Manual</a></div>
                    
13</div><hr /><div id="rararchive.getentries" class="refentry">
                    
24   <div class="methodsynopsis dc-description">
                    
25   <span class="modifier">public</span> <span class="type">array</span> <span class="methodname"><strong>RarArchive::getEntries</strong></span>
                    
26    ( <span class="methodparam">void</span>
                    
30  <div class="methodsynopsis dc-description">
                    
31   <span class="type">array</span> <span class="methodname"><strong>rar_list</strong></span>
                    
32    ( <span class="methodparam"><span class="type"><a href="class.rararchive.html" class="type RarArchive">RarArchive</a></span> <code class="parameter">$rarfile</code></span>
                    
41    entries with the same name, this method, together with <span class="type"><a href="class.rararchive.html" class="type RarArchive">RarArchive</a></span>
                    
42    <em>foreach</em> iteration and array-like access with numeric indexes,
                    
43    are the only ones to access all the entries (i.e.,
                    
76  <p class="para">
                    
77    <span class="function"><strong>rar_list()</strong></span> returns array of <span class="type"><a href="class.rarentry.html" class="type RarEntry">RarEntry</a></span> objects
                    
78    或者在失败时返回 <strong><code>FALSE</code></strong>.
                    
                
filter.examples.validation.html https://bitbucket.org/thncr/manuals.git | HTML | 77 lines
                    
11 <div class="up"><a href="filter.examples.html">范例</a></div>
                    
12 <div class="home"><a href="index.html">PHP Manual</a></div>
                    
13</div><hr /><div id="filter.examples.validation" class="section">
                    
18    <div class="example-contents">
                    
19<div class="phpcode"><code><span style="color: #000000">
                    
20<span style="color: #0000BB">&lt;?php<br />$email_a&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'joe@example.com'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$email_b&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'bogus'</span><span style="color: #007700">;<br /><br />if&nbsp;(</span><span style="color: #0000BB">filter_var</span><span style="color: #007700">(</span><span style="color: #0000BB">$email_a</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FILTER_VALIDATE_EMAIL</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"This&nbsp;(email_a)&nbsp;email&nbsp;address&nbsp;is&nbsp;considered&nbsp;valid."</span><span style="color: #007700">;<br />}<br />if&nbsp;(</span><span style="color: #0000BB">filter_var</span><span style="color: #007700">(</span><span style="color: #0000BB">$email_b</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FILTER_VALIDATE_EMAIL</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"This&nbsp;(email_b)&nbsp;email&nbsp;address&nbsp;is&nbsp;considered&nbsp;valid."</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span>
                    
37    <div class="example-contents">
                    
38<div class="phpcode"><code><span style="color: #000000">
                    
39<span style="color: #0000BB">&lt;?php<br />$ip_a&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'127.0.0.1'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$ip_b&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'42.42'</span><span style="color: #007700">;<br /><br />if&nbsp;(</span><span style="color: #0000BB">filter_var</span><span style="color: #007700">(</span><span style="color: #0000BB">$ip_a</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FILTER_VALIDATE_IP</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"This&nbsp;(ip_a)&nbsp;IP&nbsp;address&nbsp;is&nbsp;considered&nbsp;valid."</span><span style="color: #007700">;<br />}<br />if&nbsp;(</span><span style="color: #0000BB">filter_var</span><span style="color: #007700">(</span><span style="color: #0000BB">$ip_b</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FILTER_VALIDATE_IP</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"This&nbsp;(ip_b)&nbsp;IP&nbsp;address&nbsp;is&nbsp;considered&nbsp;valid."</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span>
                    
57<div class="phpcode"><code><span style="color: #000000">
                    
58<span style="color: #0000BB">&lt;?php<br />$int_a&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'1'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$int_b&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'-1'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$int_c&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'4'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$options&nbsp;</span><span style="color: #007700">=&nbsp;array(<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'options'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;array(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'min_range'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'max_range'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)<br />);<br />if&nbsp;(</span><span style="color: #0000BB">filter_var</span><span style="color: #007700">(</span><span style="color: #0000BB">$int_a</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FILTER_VALIDATE_INT</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$options</span><span style="color: #007700">)&nbsp;!==&nbsp;</span><span style="color: #0000BB">FALSE</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"This&nbsp;(int_a)&nbsp;integer&nbsp;is&nbsp;considered&nbsp;valid&nbsp;(between&nbsp;0&nbsp;and&nbsp;3).\n"</span><span style="color: #007700">;<br />}<br />if&nbsp;(</span><span style="color: #0000BB">filter_var</span><span style="color: #007700">(</span><span style="color: #0000BB">$int_b</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FILTER_VALIDATE_INT</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$options</span><span style="color: #007700">)&nbsp;!==&nbsp;</span><span style="color: #0000BB">FALSE</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"This&nbsp;(int_b)&nbsp;integer&nbsp;is&nbsp;considered&nbsp;valid&nbsp;(between&nbsp;0&nbsp;and&nbsp;3).\n"</span><span style="color: #007700">;<br />}<br />if&nbsp;(</span><span style="color: #0000BB">filter_var</span><span style="color: #007700">(</span><span style="color: #0000BB">$int_c</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FILTER_VALIDATE_INT</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$options</span><span style="color: #007700">)&nbsp;!==&nbsp;</span><span style="color: #0000BB">FALSE</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"This&nbsp;(int_c)&nbsp;integer&nbsp;is&nbsp;considered&nbsp;valid&nbsp;(between&nbsp;0&nbsp;and&nbsp;3).\n"</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #0000BB">$options</span><span style="color: #007700">[</span><span style="color: #DD0000">'options'</span><span style="color: #007700">][</span><span style="color: #DD0000">'default'</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br />if&nbsp;((</span><span style="color: #0000BB">$int_c&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">filter_var</span><span style="color: #007700">(</span><span style="color: #0000BB">$int_c</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FILTER_VALIDATE_INT</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$options</span><span style="color: #007700">))&nbsp;!==&nbsp;</span><span style="color: #0000BB">FALSE</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"This&nbsp;(int_c)&nbsp;integer&nbsp;is&nbsp;considered&nbsp;valid&nbsp;(between&nbsp;0&nbsp;and&nbsp;3)&nbsp;and&nbsp;is&nbsp;</span><span style="color: #0000BB">$int_c</span><span style="color: #DD0000">."</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span>
                    
59</span>
                    
75 <div class="up"><a href="filter.examples.html">范例</a></div>
                    
76 <div class="home"><a href="index.html">PHP Manual</a></div>
                    
77</div></body></html>
                    
                
ezurlobjectlink.php https://github.com/eeggenberger/ezpublish.git | PHP | 227 lines
                    
29    {
                    
30        static $definition = array( 'fields' => array( 'url_id' => array( 'name' => 'URLID',
                    
31                                                            'datatype' => 'integer',
                    
43                                                                                'multiplicity' => '1..*' ),
                    
44                                         'contentobject_attribute_version' => array( 'name' => 'ContentObjectAttributeVersion',
                    
45                                                                                     'datatype' => 'integer',
                    
48                                                                                     'required' => true ) ),
                    
49                      'keys' => array( 'url_id', 'contentobject_attribute_id', 'contentobject_attribute_version' ),
                    
50                      'sort' => array( 'url_id' => 'asc' ),
                    
103                                                                   true );
                    
104        $storedVersionList = array();
                    
105        foreach ( $urlObjectLinkList as $urlObjectLink )
                    
141                                                        false,
                    
142                                                        array( array( 'operation' => 'count( * )',
                    
143                                                                      'name' => 'count' ) ) );
                    
                
Api.php https://bitbucket.org/jokusafet/magento2.git | PHP | 349 lines
                    
1<?php
                    
2/**
                    
9 * It is also available through the world-wide-web at this URL:
                    
10 * http://opensource.org/licenses/osl-3.0.php
                    
11 * If you did not receive a copy of the license and are unable to
                    
23 * @copyright   Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
                    
24 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
38     *
                    
39     * @var array
                    
40     */
                    
40     */
                    
41    protected $_typeMap = array(
                    
42        'related'       => Mage_Catalog_Model_Product_Link::LINK_TYPE_RELATED,
                    
58     * @param  string $identifierType
                    
59     * @return array
                    
60     */
                    
                
PubSubContextTest.php https://bitbucket.org/larryg/powerhut.git | PHP | 308 lines
                    
59
                    
60        $client = $this->getMock('Predis\Client', array('executeCommand'), array($connection));
                    
61        $client->expects($this->never())->method('executeCommand');
                    
78
                    
79        $client = $this->getMock('Predis\Client', array('createCommand', 'writeCommand'), array($connection));
                    
80        $client->expects($this->exactly(2))
                    
97
                    
98        $client = $this->getMock('Predis\Client', array('disconnect'), array($connection));
                    
99        $client->expects($this->exactly(1))->method('disconnect');
                    
118
                    
119        $client = $this->getMock('Predis\Client', array('disconnect'), array($connection));
                    
120
                    
139        $connection = $this->getMock('Predis\Connection\SingleConnectionInterface');
                    
140        $client = $this->getMock('Predis\Client', array('disconnect'), array($connection));
                    
141
                    
                
RasterUtils.scala https://gitlab.com/zachcoyle/geomesa | Scala | 227 lines
                    
5* which accompanies this distribution and is available at
                    
6* http://www.opensource.org/licenses/apache2.0.php.
                    
7*************************************************************************/
                    
12import java.awt.image.{BufferedImage, Raster => JRaster, RenderedImage}
                    
13import java.io.{ByteArrayInputStream, ByteArrayOutputStream, ObjectInputStream, ObjectOutputStream}
                    
14import java.util.{Hashtable => JHashtable}
                    
48  def imageSerialize(image: RenderedImage): Array[Byte] = {
                    
49    val buffer: ByteArrayOutputStream = new ByteArrayOutputStream
                    
50    val out: ObjectOutputStream = new ObjectOutputStream(buffer)
                    
56    }
                    
57    buffer.toByteArray
                    
58  }
                    
59
                    
60  def imageDeserialize(imageBytes: Array[Byte]): RenderedImage = {
                    
61    val in: ObjectInputStream = new ObjectInputStream(new ByteArrayInputStream(imageBytes))
                    
                
EmailComponent.php https://bitbucket.org/koronios/cakephp.git | PHP | 466 lines
                    
6 *
                    
7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
8 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
14 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
15 * @link          http://cakephp.org CakePHP(tm) Project
                    
16 * @package       Cake.Controller.Component
                    
220 */
                    
221	public $smtpOptions = array();
                    
222
                    
260 * @param ComponentCollection $collection A ComponentCollection this component can use to lazy load its components
                    
261 * @param array $settings Array of configuration settings.
                    
262 */
                    
282 *
                    
283 * @param string|array $content Either an array of text lines, or a string with contents
                    
284 *  If you are rendering a template this variable will be sent to the templates as `$content`
                    
                
admin_member.class.php https://github.com/usagi-project/mynets1.git | PHP | 285 lines
                    
1<?php
                    
2/* ========================================================================
                    
3 *
                    
4 * @license This source file is subject to version 3.01 of the PHP license,
                    
5 *              that is available at http://www.php.net/license/3_01.txt
                    
5 *              that is available at http://www.php.net/license/3_01.txt
                    
6 *              If you did not receive a copy of the PHP license and are unable
                    
7 *              to obtain it through the world-wide-web, please send a note to
                    
7 *              to obtain it through the world-wide-web, please send a note to
                    
8 *              license@php.net so we can mail you a copy immediately.
                    
9 *
                    
27 *@param limit
                    
28 *@return diary_list array()
                    
29 */
                    
96    $sql = "select c_display_name from ". MYNETS_PREFIX_NAME ."c_display_view where c_display_view_id = ? ";
                    
97    $params = array(intval($c_display_view_id));
                    
98    $list = db_get_one($sql,$params);
                    
                
pm.php https://bitbucket.org/likeping/lkp.git | PHP | 373 lines
                    
1<?php
                    
2
                    
43		} elseif($more == 1) {
                    
44			return array('newpm' => $newpm, 'newprivatepm' => $newprvpm);
                    
45		} elseif($more == 2 || $more == 3) {
                    
46			if($more == 2) {
                    
47				return array('newpm' => $newpm, 'newprivatepm' => $newprvpm, 'newchatpm' => $newchatpm);
                    
48			} else {
                    
49				$lastpm = $_ENV['pm']->lastpm($uid);
                    
50				require_once UC_ROOT.'lib/uccode.class.php';
                    
51				$this->uccode = new uccode();
                    
52				$lastpm['lastsummary'] = $this->uccode->complie($lastpm['lastsummary']);
                    
53				return array('newpm' => $newpm, 'newprivatepm' => $newprvpm, 'newchatpm' => $newchatpm, 'lastdate' => $lastpm['lastdateline'], 'lastmsgfromid' => $lastpm['lastauthorid'], 'lastmsgfrom' => $lastpm['lastauthorusername'], 'lastmsg' => $lastpm['lastsummary']);
                    
54			}
                    
193
                    
194		$filter = $filter ? (in_array($filter, array('newpm', 'privatepm')) ? $filter : '') : '';
                    
195		if($filter == 'newpm') {
                    
                
forum_nl.php https://bitbucket.org/pombredanne/spip-zone-treemap.git | PHP | 178 lines
                    
1<?php
                    
2// This is a SPIP language file  --  Ceci est un fichier langue de SPIP
                    
7
                    
8$GLOBALS[$GLOBALS['idx_lang']] = array(
                    
9
                    
                
BaseObject.php https://github.com/homer6/Propel.git | PHP | 396 lines
                    
56	 */
                    
57	protected $virtualColumns = array();
                    
58
                    
209			if ($col !== null) {
                    
210				while (($offset = array_search($col, $this->modifiedColumns)) !== false) {
                    
211					array_splice($this->modifiedColumns, $offset, 1);
                    
253		}
                    
254		return crc32(serialize($ok)); // serialize because it could be an array ("ComboKey")
                    
255	}
                    
335		}
                    
336		return $this->fromArray($parser->toArray($data), BasePeer::TYPE_PHPNAME);
                    
337	}
                    
355		}
                    
356		return $parser->fromArray($this->toArray(BasePeer::TYPE_PHPNAME, true, array(), true));
                    
357	}
                    
                
Protobuf.Codec.Binary.spec.php https://gitlab.com/billyprice1/app-download.org | PHP | 280 lines
                    
12include_once __DIR__ . '/protos/complex.php';
                    
13include_once __DIR__ . '/protos/repeated.php';
                    
14include_once __DIR__ . '/protos/addressbook.php';
                    
14include_once __DIR__ . '/protos/addressbook.php';
                    
15include_once __DIR__ . '/protos/extension.php';
                    
16
                    
17// Include some hamcrest matchers manually since they are not included by default
                    
18// TODO: Fix spec4php to include them
                    
19include_once 'Hamcrest/Core/IsNot.php';
                    
47                'int64'  => array(0, 1, -1, 123456789123456789, -123456789123456789, $min),
                    
48                'uint64' => array(0, 1, 1000, 123456789123456789, PHP_INT_MAX, $max),
                    
49                'int32'  => array(0, 1, -1, 123456789, -123456789),
                    
229            $repeated should be instanceof 'Tests\Repeated';
                    
230            $repeated->getInt() should eq array(1,2,3);
                    
231
                    
                
weblinks.php https://bitbucket.org/eternaware/joomus.git | PHP | 378 lines
                    
1<?php
                    
2/**
                    
12// Load the base adapter.
                    
13require_once JPATH_ADMINISTRATOR . '/components/com_finder/helpers/indexer/adapter.php';
                    
14
                    
67	 * @param   object  &$subject  The object to observe
                    
68	 * @param   array   $config    An array that holds the plugin configuration
                    
69	 *
                    
83	 * @param   string   $extension  The extension whose category has been updated.
                    
84	 * @param   array    $pks        A list of primary key ids of the content that has changed state.
                    
85	 * @param   integer  $value      The value of the state that the content has been changed to.
                    
214	 * @param   string   $context  The context for the content passed to the plugin.
                    
215	 * @param   array    $pks      A list of primary key ids of the content that has changed state.
                    
216	 * @param   integer  $value    The value of the state that the content has been changed to.
                    
309		// Load dependent classes.
                    
310		require_once JPATH_SITE . '/components/com_weblinks/helpers/route.php';
                    
311
                    
                
adminsettings_include.php https://gitlab.com/nexxuz/phpBMS | PHP | 401 lines
                    
78
                    
79		$therecord = array();
                    
80
                    
89
                    
90		while($setting = $this->db->fetchArray($queryresult))
                    
91			$therecord[$setting["name"]] = $setting["value"];
                    
119		//include any procesing that needs to be done by modules
                    
120		foreach($phpbms->modules as $module => $moduleinfo){
                    
121			if($module != "base"){
                    
312    *
                    
313    * @param array $variables variables array passed from the $_POST
                    
314    */
                    
356
                    
357			?><option value="<?php echo $entry?>" <?php if($entry = $stylesheet) echo 'selected="selected"'; ?>><?php echo $entry?></option><?php
                    
358
                    
                
TranslatorTest.php https://bitbucket.org/hill2steve/mobileroom.git | PHP | 248 lines
                    
32        $translator = new Translator('en', new MessageSelector());
                    
33        $translator->addLoader('array', new ArrayLoader());
                    
34        $translator->addResource('array', array('foo' => 'foofoo'), 'en');
                    
34        $translator->addResource('array', array('foo' => 'foofoo'), 'en');
                    
35        $translator->addResource('array', array('bar' => 'foobar'), 'fr');
                    
36
                    
46        $translator = new Translator('en', new MessageSelector());
                    
47        $translator->addLoader('array', new ArrayLoader());
                    
48        $translator->addResource('array', array('foo' => 'foo (en)'), 'en');
                    
151            array('Symfony2 est awesome !', 'Symfony2 is %what%!', 'Symfony2 est %what% !', array('%what%' => 'awesome'), 'fr', ''),
                    
152            array('Symfony2 est super !', new String('Symfony2 is great!'), 'Symfony2 est super !', array(), 'fr', ''),
                    
153        );
                    
189
                    
190            array('Il y a 0 pomme', 'one: There is one apple|more: There is %count% apples', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 0, array('%count%' => 0), 'fr', ''),
                    
191            array('Il y a 1 pomme', 'one: There is one apple|more: There is %count% apples', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 1, array('%count%' => 1), 'fr', ''),
                    
                
MongoAuth.php https://bitbucket.org/paulscott56/c4-new.git | PHP | 336 lines
                    
1<?php 
                    
2
                    
55     * 
                    
56     * @var array
                    
57     */
                    
62     *
                    
63     * @var array
                    
64     */
                    
229     *
                    
230     * @param  string|array $returnColumns
                    
231     * @param  string|array $omitColumns
                    
257        
                    
258        $cursor = $this->_collection->find(array(
                    
259            $this->_identityKeyPath => $this->_identity
                    
311
                    
312        $this->_authenticateResultInfo = array(
                    
313            'code'     => AuthenticationResult::FAILURE,
                    
                
invoice_items.php https://bitbucket.org/jit_bec/shopifine.git | PHP | 313 lines
                    
2    <head>
                    
3       <?php $this->load->view("common/header"); ?> 
                    
4        <style>
                    
8    <body onLoad="extractOrder()">
                    
9        <?php $this->load->view("common/menubar"); ?>
                    
10        <?php if (isset($invoiceId)) :?>
                    
45        </form>
                    
46        <?php else: ?>
                    
47             <a href="index.php/invoice/addInvoice">Get Magento Invoice</a>
                    
47             <a href="index.php/invoice/addInvoice">Get Magento Invoice</a>
                    
48        <?php endif; ?>
                    
49    
                    
57        
                    
58        var invoiceIdJS = '<?php echo $invoiceId ?>';
                    
59        
                    
                
ExportPlugin.class.php https://gitlab.com/qbarbosa/klindev | PHP | 355 lines
                    
7 */
                    
8if (! defined('PHPMYADMIN')) {
                    
9    exit;
                    
95    /**
                    
96     * The following methods are used in export.php or in db_operations.php,
                    
97     * but they are not implemented by all export plugins
                    
166     * @param string       $db            database being exported
                    
167     * @param string|array $tables        table(s) being exported
                    
168     * @param array        $metadataTypes types of metadata to export
                    
168     * @param array        $metadataTypes types of metadata to export
                    
169     * @param array        $targetNames   associative array of db and table names of
                    
170     *                                    target configuraton storage
                    
329     *
                    
330     * @param array  $res_rel    the foreigners array
                    
331     * @param string $field_name the field name
                    
                
Properties.php https://gitlab.com/Isaki/le331.fr | PHP | 378 lines
                    
1<?php
                    
2
                    
22
                    
23include_once 'phing/system/io/PhingFile.php';
                    
24include_once 'phing/system/io/FileWriter.php';
                    
29 * FIXME
                    
30 *        - Add support for arrays (separated by ',')
                    
31 *
                    
37
                    
38    private $properties = array();
                    
39
                    
47     *
                    
48     * @param array $properties
                    
49     */
                    
51    {
                    
52        if (is_array($properties)) {
                    
53            foreach ($properties as $key => $value) {
                    
                
tracker-invocation.php https://github.com/orchestra-io/sample-openx.git | PHP | 245 lines
                    
32require_once MAX_PATH . '/lib/OA/Dal.php';
                    
33require_once MAX_PATH . '/www/admin/config.php';
                    
34require_once MAX_PATH . '/www/admin/lib-statistics.inc.php';
                    
34require_once MAX_PATH . '/www/admin/lib-statistics.inc.php';
                    
35require_once MAX_PATH . '/lib/max/Admin/Invocation.php';
                    
36require_once MAX_PATH . '/lib/max/other/html.php';
                    
107		echo "<img src='" . OX::assetPath() . "/images/icon-tracker.gif' align='absmiddle'>&nbsp;<b>".$strUntitled."</b><br /><br /><br />";
                    
108		phpAds_ShowSections(array("4.1.4.4"));
                    
109	} else {
                    
113        MAX_displayTrackerBreadcrumbs(null, $clientid);
                    
114		phpAds_ShowSections(array("4.1.4.1"));
                    
115	}
                    
181echo "</select>\n";
                    
182echo "&nbsp;<input type='image' src='" . OX::assetPath() . "/images/".$phpAds_TextDirection."/go_blue.gif' border='0'>\n";
                    
183
                    
                
default.php https://bitbucket.org/ke2083/transfans.co.uk-website.git | PHP | 274 lines
                    
73		<?php if ($presentation_style === 'sliders') : ?>
                    
74			<?php echo JHtml::_('bootstrap.startAccordion', 'slide-contact', array('active' => 'basic-details')); ?>
                    
75			<?php $accordionStarted = true; ?>
                    
77		<?php elseif ($presentation_style === 'tabs') : ?>
                    
78			<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'basic-details')); ?>
                    
79			<?php $tabSetStarted = true; ?>
                    
86			<div class="thumbnail pull-right">
                    
87				<?php echo JHtml::_('image', $this->contact->image, $this->contact->name, array('itemprop' => 'image')); ?>
                    
88			</div>
                    
103			<?php echo JText::_('COM_CONTACT_DOWNLOAD_INFORMATION_AS'); ?>
                    
104			<a href="<?php echo JRoute::_('index.php?option=com_contact&amp;view=contact&amp;id=' . $this->contact->id . '&amp;format=vcf'); ?>">
                    
105			<?php echo JText::_('COM_CONTACT_VCARD'); ?></a>
                    
147			<?php if (!$accordionStarted) : ?>
                    
148				<?php echo JHtml::_('bootstrap.startAccordion', 'slide-contact', array('active' => 'display-links')); ?>
                    
149				<?php $accordionStarted = true; ?>
                    
                
HeadMeta.php https://github.com/gryzz/crystal_magento.git | PHP | 363 lines
                    
1<?php
                    
2/**
                    
18 * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
                    
19 * @version    $Id: HeadMeta.php 16971 2009-07-22 18:05:45Z mikaelkael $
                    
20 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
23/** Zend_View_Helper_Placeholder_Container_Standalone */
                    
24#require_once 'Zend/View/Helper/Placeholder/Container/Standalone.php';
                    
25
                    
39     * Types of attributes
                    
40     * @var array
                    
41     */
                    
41     */
                    
42    protected $_typeKeys     = array('name', 'http-equiv');
                    
43    protected $_requiredKeys = array('content');
                    
43    protected $_requiredKeys = array('content');
                    
44    protected $_modifierKeys = array('lang', 'scheme');
                    
45
                    
                
LALR.php https://github.com/sergiosgc/Text_Parser.git | PHP | 219 lines
                    
58        }
                    
59        $this->_stateStack = array_slice($this->_stateStack, 0, count($this->_stateStack) - 2 * $count);
                    
60
                    
105        }
                    
106        if (!array_key_exists($state, $this->_actionTable)) throw new Text_Parser_UnexpectedTokenException($nextToken, $state);
                    
107
                    
114        if ($nextToken === '') $nextToken = new Text_Tokenizer_Token('', '');
                    
115        if (!array_key_exists($nextToken->getId(), $row)) throw new Text_Parser_UnexpectedTokenException($nextToken, $state);
                    
116        if ($row[$nextToken->getId()]['action'] == 'lookahead') {
                    
139        if (!is_array($this->_gotoTable)) throw new Text_Parser_InvalidParserException('This parser has not been configured. It has no goto table');
                    
140        if (!array_key_exists($state, $this->_gotoTable) || !array_key_exists($nextToken->getId(), $this->_gotoTable[$state])) throw new Text_Parser_UnexpectedTokenException($nextToken, $state);
                    
141
                    
195                    // Call the reduction function, retrieving the non-terminal that results from the reduction
                    
196                    $token = call_user_func_array(array($this, $action['function']), $symbols);
                    
197                    if (!is_object($token) || !method_exists($token, 'getId') || !method_exists($token, 'getValue')) {
                    
                
AbstractClient.php https://github.com/Exercise/zf2.git | PHP | 326 lines
                    
1<?php
                    
2/**
                    
68
                    
69    public function __construct($options = array())
                    
70    {
                    
85
                    
86    public function setOptions(Array $options)
                    
87    {
                    
138        if ($this instanceof Interactive\InteractiveOutput) {
                    
139            $this->_registry->getResponse()->setContentCallback(array($this, 'handleInteractiveOutput'));
                    
140        }
                    
317        if (method_exists($class, $methodName)) {
                    
318            call_user_func_array(array($class, $methodName), $callParameters);
                    
319        } elseif (method_exists($class, $methodName . 'Action')) {
                    
319        } elseif (method_exists($class, $methodName . 'Action')) {
                    
320            call_user_func_array(array($class, $methodName . 'Action'), $callParameters);
                    
321        } else {
                    
                
class_captcha.php https://gitlab.com/Conors99/ppm-1.8 | PHP | 467 lines
                    
165
                    
166		$insert_array = array(
                    
167			"imagehash" => $imagehash,
                    
286				$http_request .= "Content-Length: ".strlen($data)."\r\n";
                    
287				$http_request .= "User-Agent: reCAPTCHA/PHP\r\n";
                    
288				$http_request .= "\r\n";
                    
384	/**
                    
385	 * Add an error to the error array.
                    
386	 *
                    
401	 *
                    
402	 * @return array An array of errors in a MyBB format.
                    
403	 */
                    
438				array_unshift($error['data'], $lang->$lang_string);
                    
439				$errors[] = call_user_func_array(array($lang, "sprintf"), $error['data']);
                    
440			}
                    
                
engine.php https://bitbucket.org/lothario/fifa-tourny.git | PHP | 555 lines
                    
33
                    
34while($row = mysql_fetch_array($db->result))
                    
35{
                    
50$qualifiedTeams = array();
                    
51$seededTeams 	= array();
                    
52$stageGroups 	= array();
                    
250				$sql_data = array();
                    
251				$randTeam = array($team2, $team);
                    
252				
                    
254				
                    
255				$sql_data[] = array(
                    
256					'home_team' => $randTeam[0]['team_id'],
                    
411
                    
412//Find if the same key is in the array of arrays
                    
413function in_group($value, $array, $key)
                    
                
AdvertiserServiceImpl.php https://bitbucket.org/valmy/openx.git | PHP | 353 lines
                    
1<?php
                    
2
                    
34// Require the base class, BaseLogonService
                    
35require_once MAX_PATH . '/www/api/v1/common/BaseServiceImpl.php';
                    
36
                    
37// Require the advertiser Dll class.
                    
38require_once MAX_PATH . '/lib/OA/Dll/Advertiser.php';
                    
39
                    
332     * @param integer $agencyId
                    
333     * @param array &$aAdvertiserList  Array of OA_Dll_AdvertiserInfo classes
                    
334     *
                    
                
install.php https://github.com/Sleepcap/vDiplomacy.git | PHP | 241 lines
                    
1<?php
                    
2// This is file installs the map data for the Chromatic variant
                    
3defined('IN_CODE') or die('This script can not be run by itself.');
                    
4require_once("variants/install.php");
                    
5
                    
5
                    
6InstallTerritory::$Territories=array();
                    
7$countries=$this->countries;
                    
7$countries=$this->countries;
                    
8$territoryRawData=array(
                    
9	array('Ice Sea', 'Sea', 'No', 0, 400, 81, 214, 36),
                    
9	array('Ice Sea', 'Sea', 'No', 0, 400, 81, 214, 36),
                    
10	array('Sea of Cherries', 'Sea', 'No', 0, 343, 243, 172, 100),
                    
11	array('Garnet', 'Coast', 'Yes', 0, 236, 151, 120, 73),
                    
11	array('Garnet', 'Coast', 'Yes', 0, 236, 151, 120, 73),
                    
12	array('Carnation Sea', 'Sea', 'No', 0, 203, 372, 102, 182),
                    
13	array('Bay of Roses', 'Sea', 'No', 0, 390, 353, 195, 180),
                    
                
bookmark.php https://github.com/jywarren/whooz.git | PHP | 346 lines
                    
15 * @param int $bookmark_id
                    
16 * @param string $output Optional. Either OBJECT, ARRAY_N, or ARRAY_A constant
                    
17 * @param string $filter Optional, default is 'raw'.
                    
29		return $link;
                    
30	} elseif ( $output == ARRAY_A ) {
                    
31		return get_object_vars($link);
                    
74 * @param int $bookmark_id ID of link
                    
75 * @param string $output Either OBJECT, ARRAY_N, or ARRAY_A
                    
76 * @return object|array
                    
113 * @param string|array $args List of arguments to overwrite the defaults
                    
114 * @return array List of bookmark row objects
                    
115 */
                    
245 *		fields
                    
246 * @return object|array Same type as $bookmark but with fields sanitized.
                    
247 */
                    
                
DiffAlgorithms.java https://bitbucket.org/albfan/jgit.git | Java | 372 lines
                    
7 * accompanies this distribution, is reproduced below, and is
                    
8 * available at http://www.eclipse.org/org/documents/edl-v10.php
                    
9 *
                    
49import java.lang.reflect.Field;
                    
50import java.util.ArrayList;
                    
51import java.util.Collections;
                    
109	@Option(name = "--algorithm", multiValued = true, metaVar = "NAME", usage = "Enable algorithm(s)")
                    
110	List<String> algorithms = new ArrayList<String>();
                    
111
                    
115	@Option(name = "--repository", aliases = { "-r" }, multiValued = true, metaVar = "GIT_DIR", usage = "Repository to scan")
                    
116	List<File> gitDirs = new ArrayList<File>();
                    
117
                    
316	private List<Test> init() {
                    
317		List<Test> all = new ArrayList<Test>();
                    
318
                    
                
DfsPackCompactor.java https://bitbucket.org/albfan/jgit.git | Java | 317 lines
                    
7 * accompanies this distribution, is reproduced below, and is
                    
8 * available at http://www.eclipse.org/org/documents/edl-v10.php
                    
9 *
                    
48import java.io.IOException;
                    
49import java.util.ArrayList;
                    
50import java.util.Collections;
                    
103		autoAddSize = 5 * 1024 * 1024; // 5 MiB
                    
104		srcPacks = new ArrayList<DfsPackFile>();
                    
105		newPacks = new ArrayList<DfsPackDescription>(1);
                    
105		newPacks = new ArrayList<DfsPackDescription>(1);
                    
106		newStats = new ArrayList<PackWriter.Statistics>(1);
                    
107	}
                    
221		int cnt = srcPacks.size();
                    
222		List<DfsPackDescription> all = new ArrayList<DfsPackDescription>(cnt);
                    
223		for (DfsPackFile pack : srcPacks)
                    
                
Collection.php https://github.com/ticean/magento-mirror.git | PHP | 319 lines
                    
1<?php
                    
2/**
                    
9 * It is also available through the world-wide-web at this URL:
                    
10 * http://opensource.org/licenses/osl-3.0.php
                    
11 * If you did not receive a copy of the license and are unable to
                    
23 * @copyright   Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
                    
24 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
106            ->addAttributeToSelect('price');
                    
107        /*$this->getSelect()->columns(array(
                    
108                    'viewed' => 'CONCAT("","")',
                    
121                ->from(
                    
122                    array('quote_item_table' => $this->getTable('sales/quote_item')),
                    
123                    'COUNT(DISTINCT quote_item_table.product_id)'
                    
125                ->join(
                    
126                    array('quote_table' => $this->getTable('sales/quote')),
                    
127                    'quote_table.entity_id = quote_item_table.quote_id AND quote_table.is_active = 1',
                    
                
Tax.php https://github.com/ticean/magento-mirror.git | PHP | 301 lines
                    
1<?php
                    
2/**
                    
9 * It is also available through the world-wide-web at this URL:
                    
10 * http://opensource.org/licenses/osl-3.0.php
                    
11 * If you did not receive a copy of the license and are unable to
                    
23 * @copyright   Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
                    
24 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
102    {
                    
103        $taxTotal = new Varien_Object(array(
                    
104            'code'      => 'tax',
                    
144            $baseSubtotalIncl = max(0, $baseSubtotalIncl);
                    
145            $totalExcl = new Varien_Object(array(
                    
146                'code'      => 'subtotal_excl',
                    
150            ));
                    
151            $totalIncl = new Varien_Object(array(
                    
152                'code'      => 'subtotal_incl',
                    
                
Attribute.php https://bitbucket.org/dnejedly/eaparts.git | PHP | 345 lines
                    
1<?php
                    
2/**
                    
9 * It is also available through the world-wide-web at this URL:
                    
10 * http://opensource.org/licenses/osl-3.0.php
                    
11 * If you did not receive a copy of the license and are unable to
                    
23 * @copyright   Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
                    
24 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
154                'StringLength',
                    
155                array('max' => self::ATTRIBUTE_CODE_MAX_LENGTH)
                    
156            )
                    
165            $locale = Mage::app()->getLocale()->getLocaleCode();
                    
166            if (!Zend_Locale_Format::isNumber($defaultValue, array('locale' => $locale))) {
                    
167                 throw Mage::exception('Mage_Eav', Mage::helper('eav')->__('Invalid default decimal value'));
                    
171                $filter = new Zend_Filter_LocalizedToNormalized(
                    
172                    array('locale' => Mage::app()->getLocale()->getLocaleCode())
                    
173                );
                    
                
KalturaAuditClientPlugin.php https://github.com/kaltura/Clipping-tool.git | PHP | 753 lines
                    
1<?php
                    
2require_once(dirname(__FILE__) . "/../KalturaClientBase.php");
                    
2require_once(dirname(__FILE__) . "/../KalturaClientBase.php");
                    
3require_once(dirname(__FILE__) . "/../KalturaEnums.php");
                    
4require_once(dirname(__FILE__) . "/../KalturaTypes.php");
                    
549	 *
                    
550	 * @var array of KalturaAuditTrail
                    
551	 * @readonly
                    
596	 *
                    
597	 * @var array of KalturaAuditTrailChangeItem
                    
598	 */
                    
665	{
                    
666		$kparams = array();
                    
667		if ($filter !== null)
                    
681	{
                    
682		$kparams = array();
                    
683		$this->client->addParam($kparams, "auditTrail", $auditTrail->toParams());
                    
                
Extracted.php https://gitlab.com/devtoannh/cafe | PHP | 274 lines
                    
1<?php
                    
2/**
                    
78                    // Multiple descendant fonts are not supported
                    
79                    require_once 'Zend/Pdf/Exception.php';
                    
80                    throw new Zend_Pdf_Exception(self::TYPE_NOT_SUPPORTED);
                    
117            default:
                    
118                require_once 'Zend/Pdf/Exception.php';
                    
119                throw new Zend_Pdf_Exception(self::TYPE_NOT_SUPPORTED);
                    
137    /**
                    
138     * Returns an array of glyph numbers corresponding to the Unicode characters.
                    
139     *
                    
144     *
                    
145     * @param array $characterCodes Array of Unicode character codes (code points).
                    
146     * @return array Array of glyph numbers.
                    
204     * @param array $glyphNumbers Array of glyph numbers.
                    
205     * @return array Array of glyph widths (integers).
                    
206     * @throws Zend_Pdf_Exception
                    
                
ru_ru.lang.php https://gitlab.com/tjaafar/SuiteCRM | PHP | 162 lines
                    
1<?php
                    
2if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
                    
49 // Replaced by RAPIRA <--
                    
50$mod_strings = array (
                    
51'LBL_MODULE_NAME' => 'Сделки' ,
                    
                
Permission.php https://bitbucket.org/FuscaSoftware/candycane.git | PHP | 248 lines
                    
16    $this->set('search_project', array('search' => 'index'), array('public' => true));
                    
17    $this->set('edit_project', array('projects' => array('settings', 'edit')), array('require' => 'member'));
                    
18    $this->set('select_project_modules', array('projects' => 'modules'), array('require' => 'member'));
                    
19    $this->set('manage_members', array('projects' => 'settings', 'members' => array('new', 'edit', 'destroy')), array('require' => 'member'));
                    
20    $this->set('manage_versions', array('projects' => array('settings', 'add_version'),'versions' => array('edit', 'destroy')), array('require' => 'member'));
                    
21
                    
41    $this->set('manage_public_queries', array('queries' => array('new', 'edit', 'destroy')), array('require' => 'member'), 'issue_tracking');
                    
42    $this->set('save_queries', array('queries' => array('new', 'edit', 'destroy')), array('require' => 'loggedin'), 'issue_tracking');
                    
43    # Gantt & calendar
                    
78    $this->set('view_wiki_pages', array('wiki' => array('index', 'special')), array(), 'wiki');
                    
79    $this->set('view_wiki_edits', array('wiki' => array('history', 'diff', 'annotate')), array(), 'wiki');
                    
80    $this->set('edit_wiki_pages', array('wiki' => array('edit', 'preview', 'add_attachment')), array(), 'wiki');
                    
93  //  $this->set('manage_boards', array('boards' => array('new', 'edit', 'destroy')), array('require' => 'member'), 'boards');
                    
94  //  $this->set('view_messages', array('boards' => array('index', 'show'), array('messages' => array('show'))), array('public' => true), 'boards');
                    
95  //  $this->set('add_messages', array('messages' => array('new', 'reply', 'quote')), array(), 'boards');
                    
                
blockadvertising.php https://gitlab.com/brunorafael/enosis | PHP | 291 lines
                    
9* It is also available through the world-wide-web at this URL:
                    
10* http://opensource.org/licenses/afl-3.0.php
                    
11* If you did not receive a copy of the license and are unable to
                    
107		foreach (scandir(_PS_MODULE_DIR_.$this->name) as $file)
                    
108			if (in_array($file, array('advertising.jpg', 'advertising.gif', 'advertising.png')))
                    
109				Configuration::updateGlobalValue('BLOCKADVERT_IMG_EXT', substr($file, strrpos($file, '.') + 1));
                    
209			$this->smarty->assign(
                    
210				array(
                    
211					'image' => $this->context->link->protocol_content.$this->adv_img,
                    
233			'form' => array(
                    
234				'legend' => array(
                    
235					'title' => $this->l('Configuration'),
                    
237				),
                    
238				'input' => array(
                    
239					array(
                    
                
SlackRecord.php https://gitlab.com/madwanz64/laravel | PHP | 387 lines
                    
101        bool $includeContextAndExtra = false,
                    
102        array $excludeFields = array(),
                    
103        FormatterInterface $formatter = null
                    
186
                    
187            $dataArray['attachments'] = array($attachment);
                    
188        } else {
                    
344     *
                    
345     * @return array<array{title: string, value: string, short: false}>
                    
346     */
                    
346     */
                    
347    private function generateAttachmentFields(array $data): array
                    
348    {
                    
366     */
                    
367    private function removeExcludedFields(array $record): array
                    
368    {
                    
                
TargetVpnGateways.php https://gitlab.com/Anas7232/Layout-Changes | PHP | 208 lines
                    
1<?php
                    
2/*
                    
32   * @param string $project Project ID for this request.
                    
33   * @param array $optParams Optional parameters.
                    
34   *
                    
74   */
                    
75  public function aggregatedList($project, $optParams = array())
                    
76  {
                    
76  {
                    
77    $params = array('project' => $project);
                    
78    $params = array_merge($params, $optParams);
                    
78    $params = array_merge($params, $optParams);
                    
79    return $this->call('aggregatedList', array($params), "Google_Service_Compute_TargetVpnGatewayAggregatedList");
                    
80  }
                    
86   * @param string $targetVpnGateway Name of the target VPN gateway to delete.
                    
87   * @param array $optParams Optional parameters.
                    
88   *
                    
                
class-sensei-analysis-lesson-list-table.php https://gitlab.com/ezgonzalez/integral | PHP | 357 lines
                    
37	 * @since  1.7.0
                    
38	 * @return array $columns, the array of columns to use with the table
                    
39	 */
                    
54	 * @since  1.7.0
                    
55	 * @return array $columns, the array of columns to use with the table
                    
56	 */
                    
235        if ( !$this->csv_output ) {
                    
236			$url = add_query_arg( array( 'page' => $this->page_slug, 'user_id' => $item->user_id, 'course_id' => $this->course_id ), admin_url( 'admin.php' ) );
                    
237
                    
288		// WP_Comment_Query doesn't support SQL_CALC_FOUND_ROWS, so instead do this twice
                    
289		$this->total_items = Sensei_Utils::sensei_check_for_activity( array_merge( $activity_args, array('count' => true, 'offset' => 0, 'number' => 0) ) );
                    
290
                    
330		$report = sanitize_title( $lesson->post_title ) . '-learners-overview';
                    
331		$url = add_query_arg( array( 'page' => $this->page_slug, 'lesson_id' => $this->lesson_id, 'sensei_report_download' => $report ), admin_url( 'admin.php' ) );
                    
332		echo '<a class="button button-primary" href="' . esc_url( wp_nonce_url( $url, 'sensei_csv_download-' . $report, '_sdl_nonce' ) ) . '">' . __( 'Export all rows (CSV)', 'woothemes-sensei' ) . '</a>';
                    
                
lib.php https://github.com/lazydaisy/moodle.git | PHP | 277 lines
                    
71            $exportparams = ['type' => \tool_dataprivacy\api::DATAREQUEST_TYPE_EXPORT];
                    
72            $exporturl = new moodle_url('/admin/tool/dataprivacy/createdatarequest.php', $exportparams);
                    
73            $exportnode = new core_user\output\myprofile\node('privacyandpolicies', 'requestdataexport',
                    
82            $deleteparams = ['type' => \tool_dataprivacy\api::DATAREQUEST_TYPE_DELETE];
                    
83            $deleteurl = new moodle_url('/admin/tool/dataprivacy/createdatarequest.php', $deleteparams);
                    
84            $deletenode = new core_user\output\myprofile\node('privacyandpolicies', 'requestdatadeletion',
                    
141 *
                    
142 * @param array $args The fragment arguments.
                    
143 * @return string The rendered mform fragment.
                    
167 *
                    
168 * @param array $args The fragment arguments.
                    
169 * @return string The rendered mform fragment.
                    
245 */
                    
246function tool_dataprivacy_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload, array $options = array()) {
                    
247    if ($context->contextlevel == CONTEXT_USER) {
                    
                
actions.class.php https://github.com/PolloFox/Darwin.git | PHP | 264 lines
                    
56    $filterFormName = DarwinTable::getFilterForTable($request->getParameter('table'));
                    
57    $this->searchForm = new $filterFormName(array('table'=>$request->getParameter('table')));
                    
58  }
                    
78  {
                    
79    if(in_array($request->getParameter('table'), array('users_languages','users_comm','users_addresses')))
                    
80    {
                    
83
                    
84      if((in_array($request->getParameter('table'), array('users_comm','users_addresses'))
                    
85          && ($r->getPersonUserRef() == $this->getUser()->getId() || $this->getUser()->isAtLeast(Users::MANAGER)))
                    
85          && ($r->getPersonUserRef() == $this->getUser()->getId() || $this->getUser()->isAtLeast(Users::MANAGER)))
                    
86        || (in_array($request->getParameter('table'), array('users_languages'))
                    
87          && ($r->getUsersRef() == $this->getUser()->getId() || $this->getUser()->isAtLeast(Users::MANAGER)) ))
                    
110    {
                    
111      if(in_array($request->getParameter('table'),array('comments','catalogue_properties','ext_links')) && in_array($r->getReferencedRelation(),$this->ref_id))
                    
112      {
                    
                
CSqliteSchema.php https://github.com/ericjeney/M37-Scheduler.git | PHP | 288 lines
                    
1<?php
                    
2/**
                    
14 * @author Qiang Xue <qiang.xue@gmail.com>
                    
15 * @version $Id: CSqliteSchema.php 3304 2011-06-23 14:53:50Z qiang.xue $
                    
16 * @package system.db.schema.sqlite
                    
21	/**
                    
22	 * @var array the abstract column types mapped to physical column types.
                    
23	 * @since 1.1.6
                    
24	 */
                    
25    public $columnTypes=array(
                    
26        'pk' => 'integer PRIMARY KEY AUTOINCREMENT NOT NULL',
                    
83	 * @param string $schema the schema of the tables. This is not used for sqlite database.
                    
84	 * @return array all table names in the database.
                    
85	 * @since 1.0.2
                    
142				else if(is_string($table->primaryKey))
                    
143					$table->primaryKey=array($table->primaryKey,$c->name);
                    
144				else
                    
                
FieldDefinitionListenerTest.php https://gitlab.com/geeta7/drupal | PHP | 275 lines
                    
1<?php
                    
2
                    
82   * @param \Drupal\Core\Entity\EntityTypeInterface[]|\Prophecy\Prophecy\ProphecyInterface[] $definitions
                    
83   *   (optional) An array of entity type definitions.
                    
84   */
                    
84   */
                    
85  protected function setUpEntityManager($definitions = array()) {
                    
86    $class = $this->getMockClass(EntityInterface::class);
                    
                
ProxyBuilderTest.php https://gitlab.com/geeta7/drupal | PHP | 445 lines
                    
1<?php
                    
2
                    
129
                    
130    // @todo Solve the silly linebreak for array()
                    
131    $method_body = <<<'EOS'
                    
135 */
                    
136public function complexMethod($parameter, callable $function, \Drupal\Tests\Component\ProxyBuilder\TestServiceNoMethod $test_service = NULL, array &$elements = array (
                    
137))
                    
155
                    
156    // @todo Solve the silly linebreak for array()
                    
157    $method_body = <<<'EOS'
                    
343
                    
344    $expected_methods_body = implode("\n", array_map(function ($value) {
                    
345      if ($value === '') {
                    
383
                    
384  public function complexMethod($parameter, callable $function, TestServiceNoMethod $test_service = NULL, array &$elements = array()) {
                    
385
                    
                
ext.cpp https://github.com/tmjnaid/hiphop-php.git | C++ | 297 lines
                    
2   +----------------------------------------------------------------------+
                    
3   | HipHop for PHP                                                       |
                    
4   +----------------------------------------------------------------------+
                    
9   | available through the world-wide-web at the following url:           |
                    
10   | http://www.php.net/license/3_01.txt                                  |
                    
11   | If you did not receive a copy of the PHP license and are unable to   |
                    
12   | obtain it through the world-wide-web, please send a note to          |
                    
13   | license@php.net so we can mail you a copy immediately.               |
                    
14   +----------------------------------------------------------------------+
                    
112  m_functions["get_defined_vars"] = new EvalGetDefinedVars();
                    
113  m_functions["hphp_get_class_info"] = new EvalHphpGetClassInfo();
                    
114}
                    
180  case 0: {
                    
181    Array res = Array::Create();
                    
182    for (ArrayIter iter(env.getParams()); !iter.end(); iter.next()) {
                    
                
rules.php https://github.com/ianmacl/page_objects.git | PHP | 291 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * @version		$Id: rules.php 20359 2011-01-19 10:45:14Z infograf768 $
                    
4 * @package		Joomla.Framework
                    
53			if ($el->getName() == 'action') {
                    
54				$actions[] = (object) array(
                    
55					'name'			=> (string) $el['name'],
                    
97		// Prepare output
                    
98		$html = array();
                    
99		$html[] = '<div id="permissions-sliders" class="pane-sliders">';
                    
270	 *
                    
271	 * @return	array
                    
272	 * @since	1.6
                    
                
helper.php https://bitbucket.org/pastor399/newcastleunifc.git | PHP | 366 lines
                    
1<?php
                    
2/**
                    
130                    {
                    
131                        $url = 'index.php?Itemid=' . $itemId;
                    
132                    }
                    
139            $uri = JURI::getInstance();
                    
140            $url = $uri->toString(array('scheme', 'host', 'path', 'query'));
                    
141        }
                    
188            {
                    
189                $fbProfileURL = 'https://www.facebook.com/profile.php?id='.$fbUserId;
                    
190                $fbAvatarSize = $this->getJFBConnectAvatarSize();
                    
                
thickbox.js https://github.com/sharpmachine/wakeupmedia.com.git | JavaScript | 324 lines
                    
4 * Copyright (c) 2007 cody lindley
                    
5 * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
                    
6*/
                    
85			if(imageGroup){
                    
86				TB_TempArray = jQuery("a[rel="+imageGroup+"]").get();
                    
87				for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) {
                    
87				for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) {
                    
88					var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);
                    
89						if (!(TB_TempArray[TB_Counter].href == url)) {
                    
90							if (TB_FoundURL) {
                    
91								TB_NextCaption = TB_TempArray[TB_Counter].title;
                    
92								TB_NextURL = TB_TempArray[TB_Counter].href;
                    
94							} else {
                    
95								TB_PrevCaption = TB_TempArray[TB_Counter].title;
                    
96								TB_PrevURL = TB_TempArray[TB_Counter].href;
                    
                
PHP.php https://github.com/tmccormi/openemr.git | PHP | 410 lines
                    
15 */
                    
16abstract class PHPUnit_Util_PHP
                    
17{
                    
164    /**
                    
165     * @return PHPUnit_Util_PHP
                    
166     */
                    
235    /**
                    
236     * Runs a single job (PHP code) using a separate PHP process.
                    
237     *
                    
270     */
                    
271    private function processChildResult(PHPUnit_Framework_Test $test, PHPUnit_Framework_TestResult $result, $stdout, $stderr)
                    
272    {
                    
397                    '%s: %s',
                    
398                    $exceptionArray['_PHP_Incomplete_Class_Name'],
                    
399                    $exceptionArray['message']
                    
                
class-helper-script-manager.php https://gitlab.com/chernushov881/charity-fund | PHP | 347 lines
                    
20
                    
21	const README_LINES = array(
                    
22		'These files have been put on your server by Jetpack to assist with backups and restores of your site content. They are cleaned up automatically when we no longer need them.',
                    
36	 * @param string $script_body Helper Script file contents.
                    
37	 * @return array|WP_Error     Either an array containing the path and url of the helper script, or an error.
                    
38	 */
                    
183		// Check that the only remaining files are a README and index.php generated by this system.
                    
184		$allowed_files = array(
                    
185			'README'    => self::README_LINES[0],
                    
218	 *
                    
219	 * @return WP_Error|array Array containing the url and path of the temp directory if successful, WP_Error if not.
                    
220	 */
                    
330	 *
                    
331	 * @return array Array, with keys specifying the full path of install locations, and values with the equivalent URL.
                    
332	 */
                    
                
service-api-keys.php https://gitlab.com/chernushov881/charity-fund | PHP | 321 lines
                    
31			array(
                    
32				array(
                    
33					'methods'             => WP_REST_Server::READABLE,
                    
33					'methods'             => WP_REST_Server::READABLE,
                    
34					'callback'            => array( __CLASS__, 'get_service_api_key' ),
                    
35					'permission_callback' => '__return_true',
                    
89				),
                    
90				'service_api_key'        => array(
                    
91					'description' => __( 'The API key used by the service. Empty if none has been set yet', 'jetpack' ),
                    
269	 * Validate Mapbox API key
                    
270	 * Based loosely on https://github.com/mapbox/geocoding-example/blob/master/php/MapboxTest.php
                    
271	 *
                    
285			$msg    = esc_html__( 'Can\'t connect to Mapbox', 'jetpack' );
                    
286			return array(
                    
287				'status'        => $status,
                    
                
the_view.rst https://github.com/Gregwar/symfony-docs-fr.git | ReStructuredText | 299 lines
                    
11
                    
12    Plutôt que Twig, vous pouvez tout aussi bien utiliser :doc:`PHP </cookbook/templating/PHP>`
                    
13    pour vos templates. Les deux moteurs sont supportés par Symfony2.
                    
73
                    
74    {# array('name' => 'Fabien') #}
                    
75    {{ name }}
                    
76
                    
77    {# array('user' => array('name' => 'Fabien')) #}
                    
78    {{ user.name }}
                    
105un template peut être décoré par un autre. Cela fonctionne exactement
                    
106comme les classes PHP : l'héritage de template vous permet de bâtir un template
                    
107« layout » de base qui contient tous les éléments communs de votre site et de définir
                    
197
                    
198.. code-block:: php
                    
199
                    
                
Invitations.i18n.php https://github.com/Seizam/seizamcore.git | PHP | 169 lines
                    
1<?php
                    
2
                    
2
                    
3$messages = array();
                    
4
                    
7 */
                    
8$messages['en'] = array(
                    
9	/* General */
                    
88 */
                    
89$messages['qqq'] = array(
                    
90);
                    
94 */
                    
95$messages['fr'] = array(
                    
96	/* General */
                    
                
Http.php https://github.com/isS/Microweber.git | PHP | 396 lines
                    
1<?php
                    
2/**
                    
6 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
                    
7 * @version $Id: Http.php 3812 2011-01-26 15:53:24Z vipsoft $
                    
8 *
                    
137
                    
138			$streamMetaData = array('timed_out' => false);
                    
139			@stream_set_blocking($fsock, true);
                    
249			// we make sure the request takes less than a few seconds to fail
                    
250			// we create a stream_context (works in php >= 5.2.1)
                    
251			// we also set the socket_timeout (for php < 5.2.1)
                    
256			if(function_exists('stream_context_create')) {
                    
257				$stream_options = array(
                    
258					'http' => array(
                    
260						           .'Referer: http://'.Piwik_Common::getIpString()."/\r\n",
                    
261						'max_redirects' => 5, // PHP 5.1.0
                    
262						'timeout' => $timeout, // PHP 5.2.1
                    
                
mms-patches.inc.php https://gitlab.com/Gashler/dp | PHP | 150 lines
                    
48
                    
49						if (is_multisite () && is_network_admin () && $pagenow === "update-core.php")
                    
50							if ($message === "Upgrading database&#8230;" && c_ws_plugin__s2member_mms_patches::mms_patches ())
                    
74
                    
75									$wp_login_file = ABSPATH . "wp-login.php"; // This works for both WordPress® 3.0 and 3.1. WordPress® 3.1+ uses: `site_url('wp-signup.php')`. WordPress® 3.5+ uses: `network_site_url('wp-signup.php')`.
                    
76									$wp_login_section = "/([\r\n\t\s ]+)(wp_redirect( *?)\(( *?)apply_filters( *?)\(( *?)['\"]wp_signup_location['\"],( *?)(site_url( *?)\(( *?)['\"]wp-signup\.php['\"]( *?)\)|network_site_url( *?)\(( *?)['\"]wp-signup\.php['\"]( *?)\)|get_bloginfo( *?)\(['\"]wpurl['\"]\)( *?)\.( *?)['\"]\/wp-signup\.php['\"])( *?)\)( *?)\);)([\r\n\t\s ]+)(exit;)/";
                    
101											else if (!$load_patched) // Otherwise, we need to report that /wp-includes/load.php could NOT be updated. Wrong WordPress® version?
                    
102												($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your <code>/wp-includes/load.php</code> file could NOT be patched. Unverifiable.', true) : null;
                    
103										}
                    
108									$user_new_section = "/([\r\n\t\s ]+)(wpmu_signup_user( *?)\(( *?)\\\$new_user_login,( *?)\\\$_REQUEST\[( *?)'email'( *?)\],( *?)array( *?)\(( *?)'add_to_blog'( *?)\=\>( *?)\\\$wpdb->blogid,( *?)'new_role'( *?)\=\>( *?)\\\$_REQUEST\[( *?)'role'( *?)\]( *?)\)( *?)\);)/";
                    
109									$user_new_replace = "\n\t\t\t// Modified for full plugin compatiblity.\n\t\t\t//wpmu_signup_user( \$new_user_login, \$_REQUEST[ 'email' ], array( 'add_to_blog' => \$wpdb->blogid, 'new_role' => \$_REQUEST[ 'role' ] ) );\n\t\t\twpmu_signup_user( \$new_user_login, \$_REQUEST[ 'email' ], apply_filters( 'add_signup_meta', array( 'add_to_blog' => \$wpdb->blogid, 'new_role' => \$_REQUEST[ 'role' ] ) ) );";
                    
110
                    
135										}
                    
136									else // Otherwise, we need to report that /wp-includes/ms-functions.php could NOT be updated. Possibly a permissions error.
                    
137										($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your <code>/wp-includes/ms-functions.php</code> file could NOT be patched. File NOT writable.', true) : null;
                    
                
rolling-curl.class.php https://github.com/tivac/wp2static.git | PHP | 381 lines
                    
1<?php
                    
2/*
                    
76    /**
                    
77     * @var string|array
                    
78     *
                    
83    /**
                    
84     * @var array
                    
85     *
                    
87     */
                    
88    protected $options = array(
                    
89        CURLOPT_SSL_VERIFYPEER => 0,
                    
95    /**
                    
96     * @var array
                    
97     */
                    
97     */
                    
98    private $headers = array();
                    
99
                    
                
class-wp-rest-taxonomies-controller.php https://gitlab.com/VTTE/sitios-vtte | PHP | 425 lines
                    
1<?php
                    
2/**
                    
40			'/' . $this->rest_base,
                    
41			array(
                    
42				array(
                    
43					'methods'             => WP_REST_Server::READABLE,
                    
44					'callback'            => array( $this, 'get_items' ),
                    
45					'permission_callback' => array( $this, 'get_items_permissions_check' ),
                    
47				),
                    
48				'schema' => array( $this, 'get_public_item_schema' ),
                    
49			)
                    
54			'/' . $this->rest_base . '/(?P<taxonomy>[\w-]+)',
                    
55			array(
                    
56				'args'   => array(
                    
56				'args'   => array(
                    
57					'taxonomy' => array(
                    
58						'description' => __( 'An alphanumeric identifier for the taxonomy.' ),
                    
                
bookmark-template.php https://gitlab.com/VTTE/sitios-vtte | PHP | 324 lines
                    
51function _walk_bookmarks( $bookmarks, $args = '' ) {
                    
52	$defaults = array(
                    
53		'show_updated'     => 0,
                    
68
                    
69	foreach ( (array) $bookmarks as $bookmark ) {
                    
70		if ( ! isset( $bookmark->recently_updated ) ) {
                    
207function wp_list_bookmarks( $args = '' ) {
                    
208	$defaults = array(
                    
209		'orderby'          => 'name',
                    
232
                    
233	if ( ! is_array( $parsed_args['class'] ) ) {
                    
234		$parsed_args['class'] = explode( ' ', $parsed_args['class'] );
                    
258		foreach ( (array) $cats as $cat ) {
                    
259			$params    = array_merge( $parsed_args, array( 'category' => $cat->term_id ) );
                    
260			$bookmarks = get_bookmarks( $params );
                    
                
shell.test.php https://github.com/cgajardo/repositorium.git | PHP | 501 lines
                    
8 *
                    
9 * CakePHP :  Rapid Development Framework (http://cakephp.org)
                    
10 * Copyright 2006-2010, Cake Software Foundation, Inc.
                    
15 * @copyright     Copyright 2006-2010, Cake Software Foundation, Inc.
                    
16 * @link          http://cakephp.org CakePHP Project
                    
17 * @package       cake
                    
186		$this->Shell->Dispatch->setReturnValueAt(0, 'getInput', 'n');
                    
187		$this->Shell->Dispatch->expectAt(0, 'getInput', array('Just a test?', array('y', 'n'), 'n'));
                    
188		$result = $this->Shell->in('Just a test?', array('y', 'n'), 'n');
                    
191		$this->Shell->Dispatch->setReturnValueAt(1, 'getInput', 'Y');
                    
192		$this->Shell->Dispatch->expectAt(1, 'getInput', array('Just a test?', array('y', 'n'), 'n'));
                    
193		$result = $this->Shell->in('Just a test?', array('y', 'n'), 'n');
                    
247		$this->Shell->Dispatch->expectAt(1, 'stderr', array("Just\na\ntest\n"));
                    
248		$this->Shell->err(array('Just', 'a', 'test'));
                    
249
                    
                
edit_flow.php https://gitlab.com/Blueprint-Marketing/Edit-Flow | PHP | 348 lines
                    
94		// Edit Flow base module
                    
95		require_once( EDIT_FLOW_ROOT . '/common/php/class-module.php' );
                    
96		
                    
100		foreach( $module_dirs as $module_dir ) {
                    
101			if ( file_exists( EDIT_FLOW_ROOT . "/modules/{$module_dir}/$module_dir.php" ) ) {
                    
102				include_once( EDIT_FLOW_ROOT . "/modules/{$module_dir}/$module_dir.php" );
                    
120		// Other utils
                    
121		require_once( EDIT_FLOW_ROOT . '/common/php/util.php' );
                    
122		
                    
149
                    
150		do_action_ref_array( 'editflow_after_setup_actions', array( &$this ) );
                    
151	}
                    
236		if ( isset( $args['messages'] ) )
                    
237			$args['messages'] = array_merge( (array)$args['messages'], $defaults['messages'] );
                    
238		$args = array_merge( $defaults, $args );
                    
                
class-avada-sanitize.php https://gitlab.com/webkod3r/tripolis | PHP | 419 lines
                    
1<?php
                    
2//if ( ! class_exists( 'Avada_Sanitize' ) ) {
                    
88
                    
89			$word_colors = array(
                    
90				'aliceblue'=>'F0F8FF',
                    
242			// If it is, then convert to hex.
                    
243			if ( array_key_exists( $color, $word_colors ) ) {
                    
244				$color = $word_colors[ $color ];
                    
251			}
                    
252			$substr = array();
                    
253			for ( $i = 0; $i <= 5; $i++ ) {
                    
358			$blue   = hexdec( substr( $hex, 4, 2 ) );
                    
359			// rgb is an array
                    
360			$rgb = array( $red, $green, $blue );
                    
373			$rgba_array = explode( ',', $rgba );
                    
374			$rgba_array[0] = str_replace( 'rgba(', '', $rgba_array[0] );
                    
375			if ( isset( $rgba_array[3] ) ) {
                    
                
Router.php https://gitlab.com/Pasantias/pasantiasASLG | PHP | 394 lines
                    
90     * @param mixed           $resource The main resource to load
                    
91     * @param array           $options  An array of options
                    
92     * @param RequestContext  $context  The context
                    
94     */
                    
95    public function __construct(LoaderInterface $loader, $resource, array $options = array(), RequestContext $context = null, LoggerInterface $logger = null)
                    
96    {
                    
112     *
                    
113     * @param array $options An array of options
                    
114     *
                    
136        foreach ($options as $key => $value) {
                    
137            if (array_key_exists($key, $this->options)) {
                    
138                $this->options[$key] = $value;
                    
176    {
                    
177        if (!array_key_exists($key, $this->options)) {
                    
178            throw new \InvalidArgumentException(sprintf('The Router does not support the "%s" option.', $key));
                    
                
DebugClassLoader.php https://gitlab.com/Pasantias/pasantiasASLG | PHP | 328 lines
                    
32    private static $php7Reserved = array('int', 'float', 'bool', 'string', 'true', 'false', 'null');
                    
33    private static $darwinCache = array('/' => array('/', array()));
                    
34
                    
95
                    
96        if (!is_array($functions = spl_autoload_functions())) {
                    
97            return;
                    
117    {
                    
118        if (!is_array($functions = spl_autoload_functions())) {
                    
119            return;
                    
196
                    
197            if (in_array(strtolower($refl->getShortName()), self::$php7Reserved)) {
                    
198                @trigger_error(sprintf('%s uses a reserved class name (%s) that will break on PHP 7 and higher', $name, $refl->getShortName()), E_USER_DEPRECATED);
                    
281                            while (!isset(self::$darwinCache[$k])) {
                    
282                                self::$darwinCache[$k] = array($dir, array());
                    
283                                self::$darwinCache[$dir] = &self::$darwinCache[$k];
                    
                
hpioctl.c https://bitbucket.org/codefirex/kernel_samsung_jf.git | C | 482 lines
                    
102{
                    
103	struct hpi_ioctl_linux __user *phpi_ioctl_data;
                    
104	void __user *puhm;
                    
121
                    
122	phpi_ioctl_data = (struct hpi_ioctl_linux __user *)arg;
                    
123
                    
124	/* Read the message and response pointers from user space.  */
                    
125	if (get_user(puhm, &phpi_ioctl_data->phm)
                    
126		|| get_user(puhr, &phpi_ioctl_data->phr)) {
                    
183
                    
184		if (hm->h.adapter_index < ARRAY_SIZE(adapters))
                    
185			pa = &adapters[hm->h.adapter_index];
                    
                
PhpMatcherDumper.php https://bitbucket.org/laborautonomo/laborautonomo-site.git | PHP | 378 lines
                    
17/**
                    
18 * PhpMatcherDumper creates a PHP class able to match URLs for a given set of routes.
                    
19 *
                    
33     *
                    
34     * @param array $options An array of options
                    
35     *
                    
206            // GET and HEAD are equivalent
                    
207            if (in_array('GET', $methods) && !in_array('HEAD', $methods)) {
                    
208                $methods[] = 'HEAD';
                    
263            if (!in_array(\$this->context->getMethod(), array('$methods'))) {
                    
264                \$allow = array_merge(\$allow, array('$methods'));
                    
265                goto $gotoname;
                    
311        } elseif ($route->getDefaults()) {
                    
312            $code .= sprintf("            return %s;\n", str_replace("\n", '', var_export(array_replace($route->getDefaults(), array('_route' => $name)), true)));
                    
313        } else {
                    
                
Filter.php https://bitbucket.org/tduarte/atmailopen.git | PHP | 320 lines
                    
26
                    
27require_once("PEAR.php");
                    
28require_once('Util.php');
                    
73    * @access private
                    
74    * @var array
                    
75    */
                    
150        if ($escape) {
                    
151            $array = Net_LDAP_Util::escape_filter_value(array($value));
                    
152            $value = $array[0];
                    
198    * @param string $log_op         The locicall operator. May be "and", "or", "not" or the subsequent logical equivalents "&", "|", "!"
                    
199    * @param array|Net_LDAP_Filter  $filters     array with Net_LDAP_Filter objects
                    
200    * @return Net_LDAP_Filter|Net_LDAP_Error
                    
217            if (!is_array($filters) && is_a($filters, 'Net_LDAP_Filter')) {
                    
218                $filters = array($filters); // force array
                    
219            } else {
                    
                
index.php https://github.com/CLAMP-IT/moodle.git | PHP | 255 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
24require_once(__DIR__ . '/../config.php');
                    
25require_once($CFG->libdir . '/adminlib.php');
                    
26
                    
67
                    
68    $urlconfirm = new moodle_url('/theme/index.php', array('confirmation' => 1, 'choose' => $choose));
                    
69    redirect($urlconfirm);
                    
132
                    
133        $deviceurl = new moodle_url('/theme/index.php', array('device' => $thedevice, 'sesskey' => sesskey()));
                    
134
                    
144
                    
145        $table->data[] = array(
                    
146            $OUTPUT->heading(ucfirst($thedevice), 3),
                    
250}
                    
251echo $OUTPUT->single_button(new moodle_url('index.php', $params), get_string('themeresetcaches', 'admin'));
                    
252
                    
                
RouteTest.php https://github.com/Gyllsdorff/core.git | PHP | 416 lines
                    
131		// We use a mock object to make sure that the route wasn't recompiled
                    
132		$route = $this->getMock('Route', array('_compile'), array(), '', FALSE);
                    
133
                    
148	 *
                    
149	 * Technically we can't "test" this as the default regex is an empty array, this
                    
150	 * is purely for improving test coverage
                    
238		$this->assertArrayHasKey('controller', $matches);
                    
239		$this->assertArrayHasKey('action', $matches);
                    
240		$this->assertArrayNotHasKey('id', $matches);
                    
357			array('/welcome'),
                    
358			array('/news/view/42', array('controller' => 'news', 'action' => 'view', 'id' => 42)),
                    
359			array('http://kohanaframework.org/news', array('controller' => 'news'), true)
                    
382		$this->setEnvironment(array(
                    
383			'_SERVER' => array('HTTP_HOST' => 'kohanaframework.org'),
                    
384			'Kohana::$base_url' => '/',
                    
                
it.php https://gitlab.com/ptisky/API_prestashop | PHP | 105 lines
                    
1<?php
                    
2
                    
3global $_MODULE;
                    
4$_MODULE = array();
                    
5$_MODULE['<{leobootstrapmenu}leo_shoesworld>leobootstrapmenu_f00c4b5028a0b922b149954c5c1977c5'] = 'Leo Bootstrap Megamenu';
                    
                
WishlistController.php https://github.com/mikhailxu/magento.git | PHP | 302 lines
                    
1<?php
                    
2/**
                    
9 * It is also available through the world-wide-web at this URL:
                    
10 * http://opensource.org/licenses/osl-3.0.php
                    
11 * If you did not receive a copy of the license and are unable to
                    
23 * @copyright   Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
                    
24 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
125
                    
126            Mage::dispatchEvent('wishlist_add_product', array('wishlist'=>$wishlist, 'product'=>$product));
                    
127
                    
199        $post = $this->getRequest()->getPost();
                    
200        if ($post && isset($post['description']) && is_array($post['description'])) {
                    
201            $wishlist = $this->_getWishlist();
                    
                
news.Manage.php https://github.com/KenBoyer/CompactCMS.git | PHP | 324 lines
                    
164								?>
                    
165									<a href="news.Write.php?page_id=<?php echo $page_id; ?>&amp;newsID=<?php echo rm0lead($rsNews->newsID); ?>"><span class="ss_sprite_16 ss_pencil">&#160;</span><?php echo substr($rsNews->newsTitle,0,20); echo (strlen($rsNews->newsTitle)>20 ? '...' : null); ?></a>
                    
166								<?php
                    
175								</td>
                    
176								<td class="nowrap"><a href="mailto:<?php echo $rsNews->userEmail; ?>"><span class="ss_sprite_16 ss_email">&#160;</span><?php echo substr(ucfirst($rsNews->userFirst),0,1).'. '.ucfirst($rsNews->userLast); ?></a></td>
                    
177								<td class="nowrap"><span class="ss_sprite_16 ss_calendar">&#160;</span><?php echo date('Y-m-d G:i', strtotime($rsNews->newsModified)); ?></td>
                    
210			?>
                    
211				<p class="ss_has_sprite"><a href="news.Write.php?page_id=<?php echo $page_id; ?>"><span class="ss_sprite_16 ss_newspaper_add">&#160;</span><?php echo $ccms['lang']['news']['addnewslink']; ?></a></p>
                    
212
                    
291						<button type="submit"><span class="ss_sprite_16 ss_disk">&#160;</span><?php echo $ccms['lang']['forms']['savebutton']; ?></button>
                    
292						<a class="button" href="../../../admin/index.php" onClick="return confirmation();" title="<?php echo $ccms['lang']['editor']['cancelbtn']; ?>"><span class="ss_sprite_16 ss_cross">&#160;</span><?php echo $ccms['lang']['editor']['cancelbtn']; ?></a>
                    
293					</div>
                    
317	{
                    
318		return !close_mochaUI_window_or_goto_url("<?php echo makeAbsoluteURI($cfg['rootdir'] . 'admin/index.php'); ?>", '<?php echo $pageName; ?>_ccms');
                    
319	}
                    
                
MessagesKrj.php https://github.com/daevid/MWFork.git | PHP | 324 lines
                    
1<?php
                    
2/** Kinaray-a (Kinaray-a)
                    
3 *
                    
4 * See MessagesQqq.php for message documentation incl. usage of parameters
                    
5 * To improve a translation please visit http://translatewiki.net
                    
16
                    
17$messages = array(
                    
18# User preference toggles
                    
                
Yaml.php https://github.com/kervin/kyzstudio.git | PHP | 382 lines
                    
193        if (null === $section) {
                    
194            $dataArray = array();
                    
195            foreach ($config as $sectionName => $sectionData) {
                    
206
                    
207                $dataArray = array_merge($this->_processExtends($config, $sectionName), $dataArray);
                    
208            }
                    
218                // Section in the yaml data contains just one top level string
                    
219                $dataArray = array($section => $dataArray);
                    
220            }
                    
230     *
                    
231     * @param  array            $data Data array to process
                    
232     * @param  string           $section Section to process
                    
236     */
                    
237    protected function _processExtends(array $data, $section, array $config = array())
                    
238    {
                    
                
general_edit.html https://github.com/md-tech/openemr.git | HTML | 332 lines
                    
2<head>
                    
3{php}html_header_show();{/php}
                    
4
                    
111
                    
112{php} if ($GLOBALS['enable_amc_prompting']) { {/php}
                    
113  <div style='float:right;margin-right:25px;border-style:solid;border-width:1px;'>
                    
123  </div>
                    
124{php} } {/php}
                    
125
                    
159		<select name="drug_id" onchange="drugselected(this)">
                    
160    {html_options values=$DRUG_ARRAY_VALUES output=$DRUG_ARRAY_OUTPUT selected=$prescription->get_drug_id()}
                    
161		</select>
                    
180		<input TYPE="TEXT" NAME="size" id="size" SIZE="11" MAXLENGTH="10" VALUE="{$prescription->size}"/>
                    
181		<select name="unit" id="unit">{html_options options=$prescription->unit_array selected=$prescription->unit}</select>
                    
182	</td>
                    
                
manage.php https://github.com/mspall/moodle.git | PHP | 275 lines
                    
26require_once($CFG->libdir.'/tablelib.php');
                    
27require_once('lib.php');
                    
28require_once($CFG->libdir.'/adminlib.php');
                    
32
                    
33$tagschecked = optional_param_array('tagschecked', array(), PARAM_INT);
                    
34$tagid       = optional_param('tagid', null, PARAM_INT);
                    
69$tagarea = core_tag_area::get_by_id($tagareaid);
                    
70$manageurl = new moodle_url('/tag/manage.php');
                    
71if ($tagcoll) {
                    
169        require_sesskey();
                    
170        $tagobjects = array();
                    
171        if ($tagcoll) {
                    
177            if (!$tagobject->isstandard) {
                    
178                $tagobject->update(array('isstandard' => 1));
                    
179            }
                    
                
Group.php https://gitlab.com/yasminmostfa/thomas-site | PHP | 328 lines
                    
40 * @author     Bertrand Mansion <golgote@mamasam.com>
                    
41 * @license    http://opensource.org/licenses/bsd-license.php New BSD License
                    
42 * @version    SVN: $Id: Group.php 294057 2010-01-26 21:10:28Z avb $
                    
100            do {
                    
101                $token = array_shift($tokens);
                    
102                if (!isset($valueAry[$token])) {
                    
112    {
                    
113        // Prepare a mapper for element names as array
                    
114
                    
281    *
                    
282    * @param    string|array    Use a string for one separator, array for
                    
283    *                           alternating separators
                    
319    {
                    
320        // require_once 'HTML/QuickForm2/Renderer.php';
                    
321
                    
                
 

Source

Language