100+ results for 'php is_file'
Not the results you expected?
File.php (https://github.com/pcoughlin/CiviCRM-SR.git) PHP · 343 lines
1 <?php
3 /*
44 * Files required for this package
45 */
46 require_once 'api/v3/utils.php';
48 /**
66 }
68 require_once 'CRM/Core/DAO/File.php';
70 $fileDAO = new CRM_Core_DAO_File();
109 civicrm_api3_verify_one_mandatory($params, null,array('file_type_id','id'));
111 require_once 'CRM/Core/DAO/File.php';
112 $fileDAO = new CRM_Core_DAO_File();
options.php (https://github.com/livinglab/openlab.git) PHP · 316 lines
voucher_theme.php (https://gitlab.com/reclamare/mao) PHP · 402 lines
1 <?php
2 class ControllerSaleVoucherTheme extends Controller {
3 private $error = array();
348 $this->load->model('tool/image');
350 if (isset($this->request->post['image']) && is_file(DIR_IMAGE . $this->request->post['image'])) {
351 $data['thumb'] = $this->model_tool_image->resize($this->request->post['image'], 100, 100);
352 } elseif (!empty($voucher_theme_info) && is_file(DIR_IMAGE . $voucher_theme_info['image'])) {
pageTranslations.php (https://gitlab.com/macitsimsek/fastsubtitle) PHP · 217 lines
Filesystem.php (https://gitlab.com/techniconline/kmc) PHP · 426 lines
admin.functions.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) PHP · 321 lines
Storage.php (https://gitlab.com/fiesta-framework/Documentation) PHP · 382 lines
1 <?php
3 /**
251 $r=scandir($this->path($name));
252 foreach ($r as $key => $value) {
253 if(is_file($this->storagePath."/".$value)) $files[]=$value;
254 }
255 return $files;
266 $r=scandir($self->path($name));
267 foreach ($r as $key => $value) {
268 if(is_file($self->storagePath."/".$value)) $files[]=$value;
269 }
270 return $files;
User_agent.php (https://gitlab.com/sittipongwork/impro_dashboard) PHP · 550 lines
1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2 /**
3 * CodeIgniter
4 *
5 * An open source application development framework for PHP 5.1.6 or newer
6 *
7 * @package CodeIgniter
86 private function _load_agent_file()
87 {
88 if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/user_agents.php'))
89 {
90 include(APPPATH.'config/'.ENVIRONMENT.'/user_agents.php');
91 }
92 elseif (is_file(APPPATH.'config/user_agents.php'))
93 {
94 include(APPPATH.'config/user_agents.php');
SplFileInfo.php (https://github.com/tstarling/hiphop-php.git) PHP · 432 lines
3 // This doc comment block generated by idl/sysdoc.php
4 /**
5 * ( excerpt from http://php.net/manual/en/class.splfileinfo.php )
6 *
7 * The SplFileInfo class offers a high-level object oriented interface to
189 // This doc comment block generated by idl/sysdoc.php
190 /**
191 * ( excerpt from http://php.net/manual/en/splfileinfo.getmtime.php )
192 *
193 * Returns the time when the contents of the file were changed. The time
410 // This doc comment block generated by idl/sysdoc.php
411 /**
412 * ( excerpt from http://php.net/manual/en/splfileinfo.setinfoclass.php )
413 *
414 * Use this method to set a custom class which will be used when
mysql4-install-0.8.0.php (https://bitbucket.org/dnejedly/eaparts.git) PHP · 222 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Core
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 */
CustomOptions.php (https://gitlab.com/LisovyiEvhenii/ismextensions) PHP · 386 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Tests_Functional
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 */
106 * @return mixed
107 *
108 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
109 */
110 public function getData($key = null)
WebTestCase.php (https://github.com/nattaphat/hgis.git) PHP · 173 lines
1 <?php
3 /*
21 * @author Fabien Potencier <fabien@symfony.com>
22 */
23 abstract class WebTestCase extends \PHPUnit_Framework_TestCase
24 {
25 protected static $class;
55 * If not, override this method in your test classes.
56 *
57 * @return string The directory where phpunit.xml(.dist) is stored
58 *
59 * @throws \RuntimeException
67 $dir = static::getPhpUnitCliConfigArgument();
68 if ($dir === null &&
69 (is_file(getcwd().DIRECTORY_SEPARATOR.'phpunit.xml') ||
70 is_file(getcwd().DIRECTORY_SEPARATOR.'phpunit.xml.dist'))) {
Openssl.php (https://github.com/Martin1982/IBMessagingWorkshopServer.git) PHP · 353 lines
1 <?php
2 /**
3 * Zend Framework
17 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id: Openssl.php 20288 2010-01-14 20:15:43Z thomas $
20 */
23 * @see Zend_Filter_Encrypt_Interface
24 */
25 // require_once 'Zend/Filter/Encrypt/Interface.php';
27 /**
69 {
70 if (!extension_loaded('openssl')) {
71 // require_once 'Zend/Filter/Exception.php';
72 throw new Zend_Filter_Exception('This filter needs the openssl extension');
73 }
vfsStreamWrapperFileTestCase.php (https://github.com/acoulton/vfsStream.git) PHP · 335 lines
1 <?php
2 /**
3 * Test for org::bovigo::vfs::vfsStreamWrapper.
9 require_once 'org/bovigo/vfs/vfsStream.php';
10 require_once 'PHPUnit/Framework/TestCase.php';
11 require_once dirname(__FILE__) . '/vfsStreamWrapperBaseTestCase.php';
144 /**
145 * assert is_file() returns correct result
146 *
147 * @test
148 */
149 public function is_file()
150 {
151 $this->assertFalse(is_file($this->fooURL));
LegacyComponent.php (https://github.com/joomla/joomla-cms.git) PHP · 276 lines
1 <?php
3 /**
110 if (!class_exists($classname)) {
111 $path = JPATH_SITE . '/components/com_' . $this->component . '/helpers/category.php';
113 if (!is_file($path)) {
226 if (!class_exists($class)) {
227 // Use the component routing handler if it exists
228 $path = JPATH_SITE . '/components/com_' . $this->component . '/router.php';
230 // Use the custom routing handler if it exists
231 if (is_file($path)) {
232 require_once $path;
233 }
File.php (https://bitbucket.org/Maron1/taqman.git) PHP · 152 lines
1 <?php
3 /*
38 public function __construct($path, $checkPath = true)
39 {
40 if ($checkPath && !is_file($path)) {
41 throw new FileNotFoundException($path);
42 }
83 * Returns the extension of the file.
84 *
85 * \SplFileInfo::getExtension() is not available before PHP 5.3.6
86 *
87 * @return string The extension
Image.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 254 lines
plugincontroller.class.php (https://github.com/horaciocaine/top.git) PHP · 168 lines
1 <?php
2 /**
3 * Class to encapsulate access to dokuwiki plugins
78 list($plugin,$component) = $this->_splitName($name);
79 $dir = $this->get_directory($plugin);
80 $file = $component ? "$type/$component.php" : "$type.php";
82 if (!include_once(DOKU_PLUGIN."$dir/$file")) {
118 while (false !== ($plugin = readdir($dh))) {
119 if ($plugin == '.' || $plugin == '..' || $plugin == 'tmp') continue;
120 if (is_file(DOKU_PLUGIN.$plugin)) continue;
122 if (substr($plugin,-9) == '.disabled') {
140 $dir = $this->get_directory($plugin);
142 if (@file_exists(DOKU_PLUGIN."$dir/$type.php")){
143 $plugins[] = $plugin;
144 } else {
Decimal.php (https://github.com/rgranadino/magento-mirror.git) PHP · 145 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Catalog
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 */
jigoshop_shipping.class.php (https://github.com/annzaan/jigoshop.git) PHP · 257 lines
TSqlMapConfig.php (https://bitbucket.org/volatileeight/prado.git) PHP · 179 lines
1 <?php
2 /**
3 * TSqlMapConfig class file.
129 public function setConfigFile($value)
130 {
131 if(is_file($value))
132 $this->_configFile=$value;
133 else
134 {
135 $file = Prado::getPathOfNamespace($value,self::CONFIG_FILE_EXT);
136 if($file === null || !is_file($file))
137 throw new TConfigurationException('sqlmap_configfile_invalid',$value);
138 else
Observer.php (https://bitbucket.org/acidel/buykoala.git) PHP · 300 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Catalog
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 */
Files.php (https://github.com/jaws-project/jaws.git) PHP · 282 lines
Decimal.php (https://bitbucket.org/tschrock52/ethodeshare.git) PHP · 145 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Catalog
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 */
DefaultFileLocator.php (https://bitbucket.org/alessandro-aglietti/itis-leonardo-da-vinci.git) PHP · 173 lines
1 <?php
2 /*
3 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
113 // Check whether file exists
114 foreach ($this->paths as $path) {
115 if (is_file($path . DIRECTORY_SEPARATOR . $fileName)) {
116 return $path . DIRECTORY_SEPARATOR . $fileName;
117 }
164 // Check whether file exists
165 foreach ((array) $this->paths as $path) {
166 if (is_file($path . DIRECTORY_SEPARATOR . $fileName)) {
167 return true;
168 }
action_event_test.php (https://github.com/markn86/moodle.git) PHP · 204 lines
Router.php (https://github.com/MiDealerVirtual/mdvCMS.git) PHP · 137 lines
1 <?php (defined('BASEPATH')) OR exit('No direct script access allowed');
3 /* load the MX core module class */
4 require dirname(__FILE__).'/Modules.php';
6 /**
13 * This library extends the CodeIgniter router class.
14 *
15 * Install this file as application/third_party/MX/Router.php
16 *
17 * @copyright Copyright (c) 2011 Wiredesignz
87 /* module sub-controller exists? */
88 if($directory AND is_file($source.$directory.$ext)) {
89 return array_slice($segments, 1);
90 }
MwEmbedResourceManager.php (https://github.com/ChuguluGames/mediawiki-svn.git) PHP · 115 lines
1 <?php
2 /**
3 * MwEmbedResourceManager adds some convenience functions for loading mwEmbed 'modules'.
34 // Add module messages if present:
35 if( is_file( $localResourcePath . '/' . $moduleName . '.i18n.php' ) ){
36 $wgExtensionMessagesFiles[ 'MwEmbed.' . $moduleName ] = $localResourcePath . '/' . $moduleName . '.i18n.php';
39 // Check that resource file is present:
40 $resourceListFilePath = $localResourcePath . '/' . $moduleName . '.php';
41 if( !is_file( $resourceListFilePath ) ){
47 // Look for special 'messages' => 'moduleFile' key and load all modules file messages:
48 foreach( $resourceList as $name => $resources ){
49 if( isset( $resources['messageFile'] ) && is_file( $localResourcePath . '/' .$resources['messageFile'] ) ){
50 $resourceList[ $name ][ 'messages' ] = array();
51 include( $localResourcePath . '/' .$resources['messageFile'] );
commands.php (https://github.com/lxcenter/hypervm.git) PHP · 222 lines
1 <?php
2 /*
3 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
20 * == END LICENSE ==
21 *
22 * This is the File Manager Connector for PHP.
23 */
187 $sFilePath = $sServerDir . $sFileName ;
189 if ( is_file( $sFilePath ) )
190 {
191 $iCounter++ ;
197 move_uploaded_file( $oFile['tmp_name'], $sFilePath ) ;
199 if ( is_file( $sFilePath ) )
200 {
201 $oldumask = umask(0) ;
sfWebControllerTest.php (https://github.com/yuya-takeyama/symfony-hackathon-20110924.git) PHP · 214 lines
1 <?php
3 /*
9 */
11 require_once(dirname(__FILE__).'/../../bootstrap/unit.php');
12 require_once($_test_dir.'/unit/sfContextMock.class.php');
13 require_once($_test_dir.'/unit/sfNoRouting.class.php');
15 $t = new lime_test(21);
28 $_SERVER['HTTP_HOST'] = 'localhost';
29 $_SERVER['SCRIPT_NAME'] = '/index.php';
30 sfConfig::set('sf_max_forwards', 10);
31 $context = sfContext::getInstance(array(
FileProfilerStorage.php (https://github.com/Faianca/symfony.git) PHP · 223 lines
gift.php (https://github.com/pinhao/giftweb.git) PHP · 171 lines
1 <?php
2 defined('BASEPATH') OR exit('No direct script access allowed');
9 *
10 */
11 require APPPATH.'/libraries/REST_Controller.php';
12 require APPPATH.'/libraries/GIFTLib.php';
92 if ( $uploadData['file_type'] != 'image/jpeg' || $uploadData['is_image'] === 0 ) {
93 $this->errorResponse(array(array('msg'=>'Image File invalid')));
94 if ( is_file($uploadData['full_path']) === TRUE ) {
95 unlink($uploadData['full_path']);
96 }
banner.php (https://gitlab.com/dadangnh/sb1-bon) PHP · 430 lines
1 <?php
2 class ControllerDesignBanner extends Controller {
3 private $error = array();
372 foreach ($banner_images as $key => $value) {
373 foreach ($value as $banner_image) {
374 if (is_file(DIR_IMAGE . $banner_image['image'])) {
375 $image = $banner_image['image'];
376 $thumb = $banner_image['image'];
Helper.php (https://github.com/soitun/minify.git) PHP · 250 lines
1 <?php
2 /**
3 * Class Minify_HTML_Helper
122 $this->groupsConfigFile = self::app()->groupsConfigPath;
123 }
124 if (is_file($this->groupsConfigFile)) {
125 $gc = (require $this->groupsConfigFile);
126 $keys = explode(',', $key);
173 }
174 if ($cached === null) {
175 $cached = (require __DIR__ . '/../../../bootstrap.php');
176 }
SplClassLoader.php (https://bitbucket.org/fsilva/slick-framework.git) PHP · 167 lines
1 <?php
3 /**
4 * SplClassLoader
5 *
6 * PHP version 5
7 *
8 * Licensed under the Apache License, Version 2.0 (the "License");
28 /**
29 * SplClassLoader implementation that implements the technical interoperability
30 * standards for PHP 5.3 namespaces and class names.
31 *
32 * http://groups.google.com/group/php-standards/web/final-proposal
47 class SplClassLoader
48 {
49 private $_fileExtension = '.php';
50 private $_namespace;
51 private $_includePath;
Libupload.php (https://github.com/ekoisa/pyrocms-shop.git) PHP · 256 lines
DirectFilesystem.php (https://github.com/ChuguluGames/mediawiki-svn.git) PHP · 500 lines
1 <?php
3 /**
4 * File holding the DirectFilesystem class.
5 *
6 * @file DirectFilesystem.php
7 * @ingroup Deployment
8 * @ingroup Filesystem
17 /**
18 * Filesystem class for direct PHP file and folder manipulation.
19 *
20 * @author Jeroen De Dauw
330 public function isFile( $path ) {
331 wfSuppressWarnings();
332 $result = (bool)is_file( $path );
333 wfRestoreWarnings();
334 return $result;
AssertConfigurableProductPage.php (https://gitlab.com/LisovyiEvhenii/ismextensions) PHP · 142 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Tests_Functional
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 */
tiny_mce_gzip.php (https://bitbucket.org/stager94/skmz-joomla.git) PHP · 183 lines
file.php (https://bitbucket.org/alvinpd/monsterninja.git) PHP · 186 lines
1 <?php defined('SYSPATH') or die('No direct access allowed.');
2 /**
3 * File helper class.
7 * @author Kohana Team
8 * @copyright (c) 2007-2009 Kohana Team
9 * @license http://kohanaphp.com/license
10 */
11 class Kohana_File {
13 /**
14 * Attempt to get the mime type from a file. This method is horribly
15 * unreliable, due to PHP being horribly unreliable when it comes to
16 * determining the mime type of a file.
17 *
69 * $mime = File::mime_by_ext('png'); // "image/png"
70 *
71 * @param string extension: php, pdf, txt, etc
72 * @return string mime type on success
73 * @return FALSE on failure
class-path-processor.php (https://gitlab.com/campus-academy/krowkaramel) PHP · 186 lines
75 $file = $this->get_real_path( $file );
77 // phpcs:disable WordPress.PHP.NoSilencedErrors.Discouraged
78 $directory = @is_file( $file ) ? dirname( $file ) : $file;
79 if ( ! @is_file( $directory . '/vendor/composer/jetpack_autoload_classmap.php' ) ) {
80 return false;
81 }
82 // phpcs:enable WordPress.PHP.NoSilencedErrors.Discouraged
84 return $directory;
152 foreach ( $directories_to_check as $directory ) {
153 $normalized_check = wp_normalize_path( trailingslashit( $directory ) ) . $normalized_path;
154 // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged
155 if ( @is_file( $normalized_check ) ) {
class-ai1wm-import-controller.php (https://gitlab.com/vanafroo/landingpage) PHP · 125 lines
1 <?php
2 /**
3 * Copyright (C) 2014-2016 ServMask Inc.
89 // Log request
90 if ( empty( $params['priority'] ) || is_file( ai1wm_import_path( $params ) ) ) {
91 Ai1wm_Log::import( $params );
92 }
94 // Do request
95 if ( $completed === false || ( $next = next( $filters ) ) && ( $params['priority'] = key( $filters ) ) ) {
96 return Ai1wm_Http::get( admin_url( 'admin-ajax.php?action=ai1wm_import' ), $params );
97 }
98 }
settings_model.php (https://gitlab.com/fredec/ionizecms-1.0.8.x) PHP · 294 lines
Form.php (https://bitbucket.org/jokusafet/magento2.git) PHP · 132 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Widget
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 */
FileProfilerStorageTest.php (https://github.com/israelnoguera/parejas.git) PHP · 187 lines
wincache.reroutes.html (https://bitbucket.org/thncr/manuals.git) HTML · 119 lines
17 that are optimized for a particular purpose. WinCache extension includes Windows-optimized implementation of PHP file functions that
18 may improve performance of PHP applications in cases when PHP has to access files on network shares. The optimized implementation is
19 provided for the following functions:
20 </p>
69 <p><strong>Example #1 Enabling WinCache functions reroutes</strong></p>
70 <div class="example-contents">
71 <div class="php.inicode"><pre class="php.inicode">wincache.rerouteini = C:\PHP\reroute.ini</pre>
72 </div>
73 </div>
96 <p><strong>Example #2 Reroute.ini file content</strong></p>
97 <div class="example-contents">
98 <div class="php.inicode"><pre class="php.inicode">[FunctionRerouteList]
99 file_exists=wincache_file_exists
100 file_get_contents:2=wincache_file_get_contents
103 is_writable=wincache_is_writable
104 is_writeable=wincache_is_writable
105 is_file=wincache_is_file
106 is_dir=wincache_is_dir
107 realpath=wincache_realpath
PluginManager.class.php (https://github.com/cj/Project-Pier.git) PHP · 183 lines
1 <?php
2 /**
3 * PluginManager
15 * previous filters on the same hook.
16 *
17 * @see application/plugins.php
18 *
19 * @version 1.0
39 // now load each plugin
40 foreach(array_keys($activated_plugins) as $name) {
41 include_once 'plugins/'.$name.'/init.php';
42 } // foreach
129 function useHelper($plugin_name, $helper) {
130 //$helper_file = APPLICATION_PATH . "/plugins/$plugin_name/helpers/$helper.php";
131 $helper_file = "plugins/$plugin_name/helpers/$helper.php";
FolderHandler.php (https://gitlab.com/manuvelasco/agostoliquida) PHP · 271 lines
dmFilesystem.php (https://github.com/h16bit/diem.git) PHP · 260 lines
1 <?php
3 class dmFilesystem extends sfFilesystem
53 $currentEntry = $dir.DIRECTORY_SEPARATOR.$entryname;
55 if (is_file($currentEntry))
56 {
57 $files[] = $currentEntry;
105 try
106 {
107 $phpCli = sfToolkit::getPhpCli();
108 }
109 catch(sfException $e)
119 $sfCommand = sprintf(
120 '%s "%s" %s',
121 $phpCli,
122 sfConfig::get('sf_root_dir').'/symfony',
123 $command
roles-list-table.php (https://bitbucket.org/akeda/bmw-id-hris.git) PHP · 238 lines
66 <ul class="subsubsub">
67 <li><a <?php if ( 'all' == $role_status ) echo 'class="current"'; ?> href="<?php echo admin_url( esc_url( 'users.php?page=roles' ) ); ?>"><?php _e( 'All', 'members' ); ?> <span class="count">(<span id="all_count"><?php echo $roles_count; ?></span>)</span></a> | </li>
68 <li><a <?php if ( 'active' == $role_status ) echo 'class="current"'; ?> href="<?php echo admin_url( esc_url( 'users.php?page=roles&role_status=active' ) ); ?>"><?php _e( 'Has Users', 'members' ); ?> <span class="count">(<span id="active_count"><?php echo $active_roles_count; ?></span>)</span></a> | </li>
69 <li><a <?php if ( 'inactive' == $role_status ) echo 'class="current"'; ?> href="<?php echo admin_url( esc_url( 'users.php?page=roles&role_status=inactive' ) ); ?>"><?php _e( 'No Users', 'members' ); ?> <span class="count">(<span id="inactive_count"><?php echo $inactive_roles_count; ?></span>)</span></a></li>
70 </ul><!-- .subsubsub -->
158 <?php if ( current_user_can( 'manage_options' ) && $role == get_option( 'default_role' ) ) { ?>
159 | <a href="<?php echo admin_url( ( 'options-general.php' ) ); ?>" title="<?php _e( 'Change default role', 'members' ); ?>"><?php _e( 'Default Role', 'members' ); ?></a>
160 <?php } ?>
162 <?php if ( current_user_can( 'list_users' ) ) { ?>
163 | <a href="<?php echo admin_url( esc_url( "users.php?role={$role}" ) ); ?>" title="<?php printf( esc_attr__( 'View all users with the %s role', 'members' ), $name ); ?>"><?php _e( 'View Users', 'members' ); ?></a>
164 <?php } ?>
178 <?php if ( current_user_can( 'list_users' ) ) { ?>
179 <a href="<?php echo admin_url( esc_url( "users.php?role={$role}" ) ); ?>" title="<?php printf( __( 'View all users with the %s role', 'members' ), $name ); ?>"><?php printf( _n( '%s User', '%s Users', members_get_role_user_count( $role ), 'members' ), members_get_role_user_count( $role ) ); ?></a>
180 <?php } else { ?>
OpenDKIMSigner.php (https://gitlab.com/madwanz64/laravel) PHP · 183 lines
Filesystem.php (https://gitlab.com/kimting254/wbms) PHP · 441 lines
FilesystemCache.php (https://github.com/jfilip/moodle.git) PHP · 159 lines
1 <?php
3 /*
4 * This file is part of Mustache.php.
5 *
6 * (c) 2010-2014 Justin Hileman
47 {
48 $fileName = $this->getCacheFilename($key);
49 if (!is_file($fileName)) {
50 return false;
51 }
88 protected function getCacheFilename($name)
89 {
90 return sprintf('%s/%s.php', $this->baseDir, $name);
91 }
RawCodeCoverageData.php (https://gitlab.com/jjpa2018/dashboard) PHP · 227 lines
1 <?php declare(strict_types=1);
2 /*
3 * This file is part of phpunit/php-code-coverage.
4 *
5 * (c) Sebastian Bergmann <sebastian@phpunit.de>
24 /**
25 * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage
26 */
27 final class RawCodeCoverageData
192 /**
193 * At the end of a file, the PHP interpreter always sees an implicit return. Where this occurs in a file that has
194 * e.g. a class definition, that line cannot be invoked from a test and results in confusing coverage. This engine
195 * implementation detail therefore needs to be masked which is done here by simply ensuring that all empty lines
Collection.php (https://github.com/rgranadino/magento-mirror.git) PHP · 263 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Log
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 */
Router.php (https://github.com/kelios/imshop.git) PHP · 136 lines
1 <?php (defined('BASEPATH')) OR exit('No direct script access allowed');
3 /* load the MX core module class */
4 require dirname(__FILE__).'/Modules.php';
6 /**
13 * This library extends the CodeIgniter router class.
14 *
15 * Install this file as application/third_party/MX/Router.php
16 *
17 * @copyright Copyright (c) 2011 Wiredesignz
86 /* module sub-controller exists? */
87 if($directory AND is_file($source.$directory.$ext)) {
88 return array_slice($segments, 1);
89 }
Image.php (https://bitbucket.org/acidel/buykoala.git) PHP · 294 lines
1 <?php
2 /**
3 * @category Fishpig
105 public function imageExists($image)
106 {
107 return is_file($this->getBaseImagePath() . $image);
108 }
190 $cachedFilename = $this->getResizedImagePath($this->_filename, $width, $height);
192 if ($this->_forceRecreate || !is_file($cachedFilename)) {
193 $this->_imageObject->resize($width, $height);
194 $this->_imageObject->save($cachedFilename);
question_test.php (https://github.com/mnoorenberghe/moodle.git) PHP · 155 lines
Collection.php (https://bitbucket.org/tschrock52/ethodeshare.git) PHP · 263 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Log
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 */
index.php (https://github.com/durand54/sitellite.git) PHP · 160 lines
1 <?php
3 if (! is_writeable ('inc/app/siteinvoice/conf/properties.php')) {
4 page_title ('Error');
5 echo '<p>Unable to write to the inc/app/siteinvoice/conf/properties.php file. Please adjust your filesystem permissions and try again.</p>';
6 return;
7 }
8 if (is_file ('inc/app/siteinvoice/conf/properties.old.php') && ! is_writeable ('inc/app/siteinvoice/conf/properties.old.php')) {
9 page_title ('Error');
10 echo '<p>Unable to write to the inc/app/siteinvoice/conf/properties.old.php file. Please adjust your filesystem permissions and try again.</p>';
146 $vals['currencies'] = preg_split ('/, ?/', $vals['currencies']);
148 file_overwrite ('inc/app/siteinvoice/conf/properties.old.php', join ('', file ('inc/app/siteinvoice/conf/properties.php')));
149 file_overwrite ('inc/app/siteinvoice/conf/properties.php', template_simple ($this->_template, $vals));
Block.php (https://gitlab.com/gregtyka/SiberianCMS) PHP · 127 lines
move.php (https://github.com/cindyli/ATutor.git) PHP · 131 lines
16 require(AT_INCLUDE_PATH.'vitals.inc.php');
17 require(AT_INCLUDE_PATH.'../mods/_standard/file_storage/file_storage.inc.php');
19 $owner_type = abs($_REQUEST['ot']);
88 ?>
90 <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
91 <?php if ($_GET['files']): foreach ($_GET['files'] as $tmpfile): ?>
93 <?php endforeach; endif; ?>
95 <?php if ($_GET['folders']): foreach ($_GET['folders'] as $tmpfolder): ?>
96 <input type="hidden" name="folders[]" value="<?php echo $tmpfolder; ?>" />
129 </form>
131 <?php require(AT_INCLUDE_PATH.'footer.inc.php'); ?>
ActiveFixture.php (https://gitlab.com/isdzulqor/Slis-Dev) PHP · 145 lines
1 <?php
2 /**
3 * @link http://www.yiiframework.com/
40 /**
41 * @var string|boolean the file path or path alias of the data file that contains the fixture data
42 * to be returned by [[getData()]]. If this is not set, it will default to `FixturePath/data/TableName.php`,
43 * where `FixturePath` stands for the directory containing this fixture class, and `TableName` stands for the
44 * name of the table associated with this fixture. You can set this property to be false to prevent loading any data.
97 if ($this->dataFile === null) {
98 $class = new \ReflectionClass($this);
99 $dataFile = dirname($class->getFileName()) . '/data/' . $this->getTableSchema()->fullName . '.php';
101 return is_file($dataFile) ? require($dataFile) : [];
smarty_internal_resource_file.php (https://gitlab.com/team_fsn/fsn-php) PHP · 179 lines
1 <?php
2 /**
3 * Smarty Internal Plugin Resource File
33 if ($file[0] == '/' || $file[1] == ':') {
34 $file = $source->smarty->_realpath($file, true);
35 return is_file($file) ? $file : false;
36 }
37 // go relative to a given template?
48 $path = $source->smarty->_realpath($path);
49 // files relative to a template only get one shot
50 return is_file($path) ? $path : false;
51 }
52 // normalize DS
91 foreach ($_directories as $_directory) {
92 $path = $_directory . $file;
93 if (is_file($path)) {
94 return (strpos($path, '.' . DS) !== false) ? $source->smarty->_realpath($path) : $path;
95 }
FindOneAndReplace.php (https://github.com/markn86/moodle.git) PHP · 168 lines
voucher.php (https://gitlab.com/reclamare/mao) PHP · 213 lines
1 <?php
2 class ModelSaleVoucher extends Model {
3 public function addVoucher($data) {
107 $voucher_theme_info = $this->model_sale_voucher_theme->getVoucherTheme($voucher_info['voucher_theme_id']);
109 if ($voucher_theme_info && is_file(DIR_IMAGE . $voucher_theme_info['image'])) {
110 $data['image'] = HTTP_CATALOG . 'image/' . $voucher_theme_info['image'];
111 } else {
151 $voucher_theme_info = $this->model_sale_voucher_theme->getVoucherTheme($voucher_info['voucher_theme_id']);
153 if ($voucher_theme_info && is_file(DIR_IMAGE . $voucher_theme_info['image'])) {
154 $data['image'] = HTTP_CATALOG . 'image/' . $voucher_theme_info['image'];
155 } else {
img.php (https://bitbucket.org/inginer/yashr1_1.git) PHP · 272 lines
1 <?php
2 /**
3 * Created by JetBrains PhpStorm.
78 $this->src = $_SERVER['DOCUMENT_ROOT'].$info['path'].'/'.$info['title'];
80 if (!is_file($this->src))
81 {
82 return '/img/no-photo.jpg';
145 if (!file_exists($save_file))
146 {
147 if (!is_file($this->src))
148 {
149 return '/up/'.$params['format'].'-no-photo.jpg';//$this->src;
video.php (https://bitbucket.org/ulisesrodriguez/imgvid.git) PHP · 241 lines
1 <?php
2 // Include Files
3 require 'settings.php';
126 $this->video = $this->directory . $this->data[0]['name'];
128 if( is_file( $this->video ) )
129 unlink( $this->video );
195 $this->video = $this->directory . $this->data[0]['name'];
197 if( is_file( $this->video ) )
198 unlink( $this->video );
ms-default-filters.php (https://gitlab.com/VTTE/sitios-vtte) PHP · 128 lines
1 <?php
2 /**
3 * Sets up the default filters and actions for Multisite.
6 * for which to use to remove the hook.
7 *
8 * Not all of the Multisite default hooks are found in ms-default-filters.php
9 *
10 * @package WordPress
11 * @subpackage Multisite
12 * @see default-filters.php
13 * @since 3.0.0
14 */
101 // Mail.
102 add_action( 'phpmailer_init', 'fix_phpmailer_messageid' );
104 // Disable somethings by default for multisite.
sidebar.php (https://gitlab.com/Blueprint-Marketing/wordpress-unit-tests) PHP · 91 lines
3 <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
5 <?php include (TEMPLATEPATH . '/searchform.php'); ?>
7 <?php if (is_single()) { ?>
9 <h3><?php _e('About This Post','chaoticsoul'); ?></h3>
10 <p class="postmetadata alt">
11 <small>
12 <?php
13 printf(__('This entry was posted on %s at %s and is filed under %s.', 'chaoticsoul'), get_the_time(get_option('date_format')), get_the_time(get_option('time_format')), get_the_category_list(', '));
14 printf(__('You can follow any responses to this entry through the %s feed.', 'chaoticsoul'), '<a href="'.get_post_comments_feed_link().'">RSS 2.0</a>');
55 <h3><?php _e('About This Page'); ?></h3>
56 <p><?php printf(__('You are currently browsing the %s weblog archives for %s.', 'chaoticsoul'), '<a href="'.get_bloginfo('home').'/">'.get_bloginfo('name').'</a>', get_the_time('F, Y'));?></p>
58 <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
Edit.php (https://bitbucket.org/thomashii/vtigercrm-6-for-postgresql.git) PHP · 168 lines
SliceFilter.php (https://bitbucket.org/nlabyt/bcf-ball-4eb2.git) PHP · 178 lines
1 <?php
2 /**
3 * @version $Id: SliceFilter.php 39525 2011-07-05 18:58:14Z btowles $
36 $info->admin_thumb_path = $this->getThumbPath($record, 'admin-thumb');
37 $info->admin_thumb_url = $this->getThumbUrl($record, 'admin-thumb');
38 if ($this->checkThumbExists($record, $info->admin_thumb_path, 'admin-thumb') && is_file($info->admin_thumb_path)) {
39 $imageinfo = getimagesize($info->admin_thumb_path);
40 $info->admin_thumb_xsize = $imageinfo[0];
44 $info->mini_admin_thumb_path = $this->getThumbPath($record, 'mini-admin-thumb');
45 $info->mini_admin_thumb_url = $this->getThumbUrl($record, 'mini-admin-thumb');
46 if ($this->checkThumbExists($record, $info->mini_admin_thumb_path, 'mini-admin-thumb') && is_file($info->mini_admin_thumb_path)) {
47 $imageinfo = getimagesize($info->mini_admin_thumb_path);
48 $info->mini_admin_thumb_xsize = $imageinfo[0];
feed.php (https://bitbucket.org/mslepko/default-kohana.git) PHP · 176 lines
1 <?php defined('SYSPATH') or die('No direct script access.');
2 /**
3 * RSS and Atom feed helper.
32 // Allow loading by filename or raw XML string
33 $load = (is_file($feed) OR Valid::url($feed)) ? 'simplexml_load_file' : 'simplexml_load_string';
35 // Load the feed
79 public static function create($info, $items, $format = 'rss2', $encoding = 'UTF-8')
80 {
81 $info += array('title' => 'Generated Feed', 'link' => '', 'generator' => 'KohanaPHP');
83 $feed = '<?xml version="1.0" encoding="'.$encoding.'"?><rss version="2.0"><channel></channel></rss>';
admin.php (https://github.com/BlendedByChris/pyrocms.git) PHP · 226 lines
1 <?php
2 /**
3 * Modules controller, lists all installed modules
24 // Check the referrer
25 parse_url($this->input->server('HTTP_REFERER'), PHP_URL_HOST) == parse_url(BASE_URL, PHP_URL_HOST) or show_error('Invalid Referrer');
27 }
75 // Now try to unzip
76 $this->load->library('unzip');
77 $this->unzip->allow(array('xml', 'html', 'css', 'js', 'png', 'gif', 'jpeg', 'jpg', 'swf', 'ico', 'php'));
79 // Try and extract
208 private function _delete_recursive($str)
209 {
210 if(is_file($str))
211 {
212 return @unlink($str);
README.txt (http://swx-format.googlecode.com/svn/trunk/) Unknown · 251 lines
5 Released under GNU Lesser General Public License (http://www.gnu.org/copyleft/lgpl.html)
6 For more information about the class and upcoming tools and applications using it,
7 visit http://www.phpflickr.com/ or http://www.sourceforge.net/projects/phpflickr/
9 If you are interested in hiring me for a project (involving phpFlickr
53 that it's easier for everyone if you just have to pass an
54 associative array of arguments. See the comment in the
55 photos_search() definition in phpFlickr.php for more information.
67 I know how complicated this API looks at first glance, so I've tried to
68 make this as transparent to the coding process. I'll go through the steps
69 you'll need to use this. Both the auth.php and getToken.php file will
70 need your API Key and Secret entered before you can use them.
guesser_test.php (https://github.com/VSEphpbb/phpbb.git) PHP · 230 lines
4 * This file is part of the phpBB Forum Software package.
5 *
6 * @copyright (c) phpBB Limited <https://www.phpbb.com>
7 * @license GNU General Public License, version 2 (GPL-2.0)
8 *
48 $this->path = dirname(__FILE__);
49 $this->jpg_file = $this->path . '/fixtures/jpg';
50 $this->phpbb_root_path = $phpbb_root_path;
51 }
109 public function test_null_guess()
110 {
111 $guesser = new \phpbb\mimetype\guesser(array(new \phpbb\mimetype\null_guesser));
112 $this->assertEquals('application/octet-stream', $guesser->guess($this->jpg_file));
113 }
lib_test.php (https://github.com/cmiic/moodle.git) PHP · 140 lines
1 <?php
2 // This file is part of Moodle - http://moodle.org/
3 //
28 global $CFG;
29 require_once($CFG->dirroot . '/webservice/xmlrpc/lib.php');
31 /**
57 global $CFG;
59 $client = new webservice_xmlrpc_client_mock('/webservice/xmlrpc/server.php', 'anytoken');
60 $mockresponse = file_get_contents($CFG->dirroot . '/webservice/xmlrpc/tests/fixtures/array_response.xml');
61 $client->set_mock_response($mockresponse);
70 global $CFG;
72 $client = new webservice_xmlrpc_client_mock('/webservice/xmlrpc/server.php', 'anytoken');
73 $mockresponse = file_get_contents($CFG->dirroot . '/webservice/xmlrpc/tests/fixtures/value_response.xml');
74 $client->set_mock_response($mockresponse);
FilterTest.php (https://gitlab.com/arthur_quiroga/dystawork) PHP · 151 lines
area.php (https://github.com/Keilaron/TweetBeagle.git) PHP · 264 lines
1 <?php
2 /**
3 * Fuel is a fast, lightweight, community driven PHP5 framework.
8 * @license MIT License
9 * @copyright 2010 - 2011 Fuel Development Team
10 * @link http://fuelphp.com
11 */
81 $path = $this->get_path($path);
83 if (is_file($path))
84 {
85 $info = pathinfo($path);
262 }
264 /* End of file area.php */
Widget.class.php (https://gitlab.com/llwhois/woaimm) PHP · 107 lines
1 <?php
2 // +----------------------------------------------------------------------
3 // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
4 // +----------------------------------------------------------------------
5 // | Copyright (c) 2006-2012 http://thinkphp.cn All rights reserved.
6 // +----------------------------------------------------------------------
7 // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
12 /**
13 * ThinkPHP Widget类 抽象类
14 * @category Think
15 * @package Think
68 }else{
69 $class = 'Template'.ucwords($template);
70 if(is_file(CORE_PATH.'Driver/Template/'.$class.'.class.php')) {
71 // 内置驱动
72 $path = CORE_PATH;
Init.php (https://github.com/unarchive/trunk.git) PHP · 147 lines
FileLockRegion.php (https://gitlab.com/martinstti/silex-microframework-rest) PHP · 265 lines
Debug.php (https://gitlab.com/LisovyiEvhenii/ismextensions) PHP · 204 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Varien_Debug
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 */
Generator.php (https://github.com/hatone/moodle.git) PHP · 191 lines
7 * @category PHP
8 * @package PHP_CodeSniffer
9 * @author Greg Sherwood <gsherwood@squiz.net>
10 * @author Marc McIntyre <mmcintyre@squiz.net>
13 * @version CVS: $Id: Generator.php,v 1.2 2010/12/14 17:35:53 moodlerobot Exp $
14 * @link http://pear.php.net/package/PHP_CodeSniffer
15 */
21 * in a standard.
22 *
23 * @category PHP
24 * @package PHP_CodeSniffer
28 * @license http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
29 * @version Release: 1.1.0
30 * @link http://pear.php.net/package/PHP_CodeSniffer
31 */
32 class PHP_CodeSniffer_DocGenerators_Generator
ezsqldiff.php (https://github.com/GunioRobot/ezpublish.git) PHP · 225 lines
1 #!/usr/bin/env php
2 <?php
3 /**
4 * File containing the ezsqldiff.php script.
5 *
6 * @copyright Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.
10 */
12 require 'autoload.php';
14 $cli = eZCLI::instance();
17 "and sets exit code based whether there is a difference or not\n" .
18 "\n" .
19 "ezsqldiff.php --type mysql --user=root stable32 stable33" ),
20 'use-session' => false,
21 'use-modules' => true,
class.WpdiscuzCache.php (https://github.com/livinglab/openlab.git) PHP · 212 lines
1 <?php
3 if (!defined("ABSPATH")) {
32 $redirect = $referer;
33 } else {
34 $redirect = admin_url("admin.php?page=" . self::PAGE_SETTINGS . "&wpd_tab=" . self::TAB_GENERAL);
35 }
36 wp_redirect($redirect);
49 public function deleteGravatarsFolder() {
50 if (!class_exists("WP_Filesystem_Direct")) {
51 require_once ABSPATH . "wp-admin/includes/class-wp-filesystem-base.php";
52 require_once ABSPATH . "wp-admin/includes/class-wp-filesystem-direct.php";
121 * do not use current_time here as it returns WP time
122 */
123 if (is_file($fileInfo["path"]) && time() > @filemtime($fileInfo["path"]) + ($this->options->general["cacheTimeout"] * DAY_IN_SECONDS)) {
124 @unlink($fileInfo["path"]);
125 return [];
GD.php (https://github.com/timglabisch/pimcore.git) PHP · 270 lines
index.php (https://bitbucket.org/broo/sitedev-core.git) PHP · 152 lines
template.php (https://github.com/Shigaru/shigaru.git) PHP · 446 lines
1 <?php
2 /**
3 *
28 /**
29 * A hack to support __construct() on PHP 4
30 * Hint: descendant classes have no PHP4 class_name() constructors,
123 /**
124 * A hack to support __construct() on PHP 4
125 * Hint: descendant classes have no PHP4 class_name() constructors,
230 function load( $template ) {
232 $templateFileName = $this->getRoot().DS.$template.'.php';
234 if (is_file($templateFileName)) {
File.php (https://bitbucket.org/tschrock52/ethodeshare.git) PHP · 274 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Archive
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 */
107 }
109 if (is_file($this->_filePath) && !is_writable($this->_filePath)) {
110 throw new Mage_Exception("Can't open file " . $this->_fileName . " for writing. Permission denied.");
111 }
File.php (https://bitbucket.org/rybadour/todo_list_site.git) PHP · 241 lines
1 <?php defined('SYSPATH') OR die('No direct script access.');
2 /**
3 * File helper class.
13 /**
14 * Attempt to get the mime type from a file. This method is horribly
15 * unreliable, due to PHP being horribly unreliable when it comes to
16 * determining the mime type of a file.
17 *
67 * $mime = File::mime_by_ext('png'); // "image/png"
68 *
69 * @param string $extension php, pdf, txt, etc
70 * @return string mime type on success
71 * @return FALSE on failure
218 $pieces = 0;
220 while (is_file($piece = $filename.'.'.str_pad($pieces + 1, 3, '0', STR_PAD_LEFT)))
221 {
222 // Read another piece
QMimeType.class.php (https://github.com/quinta/qcodo.git) PHP · 158 lines
1 <?php
2 abstract class QMimeType {
3 // Constants for Mime Types
44 'mpg' => QMimeType::MpegVideo,
45 'pdf' => QMimeType::Pdf,
46 'php' => QMimeType::PlainText,
47 'png' => QMimeType::Png,
48 'ppt' => QMimeType::MsPowerpoint,
78 // Clean up the File Path and pull out the filename
79 $strRealPath = realpath($strFilePath);
80 if (!is_file($strRealPath))
81 throw new QCallerException('File Not Found: ' . $strFilePath);
82 $strFilename = basename($strRealPath);
MaildirMessageOldTest.php (https://bitbucket.org/Dal-Papa/is-340-publish-base.git) PHP · 192 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: MaildirMessageOldTest.php 24593 2012-01-05 20:35:02Z matthew $
21 */
24 * Zend_Mail_Storage_Maildir
25 */
26 require_once 'Zend/Mail/Storage/Maildir.php';
28 /**
29 * Zend_Config
30 */
31 require_once 'Zend/Config.php';
33 /**
class-ai1wm-extractor.php (https://gitlab.com/haque.mdmanzurul/neophix) PHP · 296 lines
UtilTest.php (https://github.com/peteboere/css-crush.git) PHP · 135 lines
1 <?php
3 namespace CssCrush\UnitTest;
7 use CssCrush\Url;
9 class UtilTest extends \PHPUnit\Framework\TestCase
10 {
11 public function setUp(): void
66 $original_path = getcwd();
67 chdir(__DIR__);
68 $this_filename = basename(__FILE__);
69 // Case-insensitive file systems may normalize case.
70 $this->assertEquals(strtolower(__FILE__), strtolower(Util::resolveUserPath($this_filename)));
121 {
122 $contents = <<<'NOW_DOC'
123 <?php
125 $plugins = ['svg', 'px2em'];
TokenUtils.php (https://gitlab.com/iamgraeme/royalmile) PHP · 300 lines
1 <?php
2 namespace WebSharks\ZenCache;
35 } else { // For the current blog ID.
36 $token = $self->domainMappingUrlFilter($self->currentUrl());
37 $token = $self->parseUrl($token, PHP_URL_HOST);
38 }
39 }
156 $self->hostDirToken = function ($dashify = false, $consider_domain_mapping = false, $path = null) use ($self) {
157 if (!isset($path)) { // Use current/default path?
158 $path = (string) $self->parseUrl($_SERVER['REQUEST_URI'], PHP_URL_PATH);
159 }
160 $path = '/'.ltrim((string) $path, '/'); // Force leading slash.
185 if ($token !== '/') { // Perhaps NOT the main site?
186 $blog_paths_file = $self->cacheDir().'/'.strtolower(SHORT_NAME).'-blog-paths';
187 if (!is_file($blog_paths_file) || !in_array($token, unserialize(file_get_contents($blog_paths_file)), true)) {
188 $token = '/'; // NOT a real/valid child blog path.
189 }
Modules.php (https://gitlab.com/fredec/ionizecms-1.0.8.x) PHP · 278 lines
1 <?php
2 /**
3 * Modules Class
85 // Modules from config file
86 $modules = $aliases = $disable_controller = array();
87 include APPPATH . 'config/modules.php';
89 if(in_array($module_uri, array_keys($modules)) && ( ! in_array($module_uri, $disable_controller)))
176 static::$installed_modules = array();
178 // Installed modules, stored in application/config/modules.php
179 $modules = array();
180 include(APPPATH.'config/modules.php');
189 if (is_dir($folder))
190 {
191 $file = $folder .'/config/config.php';
192 if (is_file($file))
DateUtils.java
(http://wogwt.googlecode.com/svn/trunk/)
Java · 231 lines
✨ Summary
This Java class, DateUtils
, provides utility methods for working with dates, including formatting and parsing date strings according to various formats (e.g., RFC 1123, W3C, etc.). It also includes comparison methods for dates and a method to get the time zone offset. The class is designed as a utility class, providing static methods that can be used without creating an instance of the class.
This Java class, DateUtils
, provides utility methods for working with dates, including formatting and parsing date strings according to various formats (e.g., RFC 1123, W3C, etc.). It also includes comparison methods for dates and a method to get the time zone offset. The class is designed as a utility class, providing static methods that can be used without creating an instance of the class.
11 *
12 * You can obtain a copy of the LGPL 2.1 license at
13 * http://www.opensource.org/licenses/lgpl-2.1.php
14 *
15 * You can obtain a copy of the CDDL 1.0 license at
16 * http://www.opensource.org/licenses/cddl1.php
17 *
18 * You can obtain a copy of the EPL 1.0 license at
19 * http://www.opensource.org/licenses/eclipse-1.0.php
20 *
21 * See the Licenses for the specific language governing permissions and
runme.php
(https://swig.svn.sourceforge.net/svnroot/swig)
PHP · 77 lines
✨ Summary
The PHP code demonstrates cross-language polymorphism using directors, showcasing how a C++ CEO class can be used with a PHP EmployeeList instance. It creates an instance of CEO and adds it to the list, then accesses its properties through the list’s proxy objects, allowing for transparent method calls between languages. The output shows the results of these interactions.
The PHP code demonstrates cross-language polymorphism using directors, showcasing how a C++ CEO class can be used with a PHP EmployeeList instance. It creates an instance of CEO and adds it to the list, then accesses its properties through the list’s proxy objects, allowing for transparent method calls between languages. The output shows the results of these interactions.
1 <?php
3 # This file illustrates the cross language polymorphism using directors.
5 require("example.php");
7 # CEO class, which overrides Employee::getPosition().
39 # methods of all these instances are treated the same. For items 0, 1, and
40 # 2, both all methods resolve in C++. For item 3, our CEO, getTitle calls
41 # getPosition which resolves in PHP. The call to getPosition is
42 # slightly different, however, from the e.getPosition() call above, since
43 # now the object reference has been "laundered" by passing through
44 # EmployeeList as an Employee*. Previously, PHP resolved the call
45 # immediately in CEO, but now PHP thinks the object is an instance of
IgnoreDialog.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 172 lines
✨ Summary
This Java code creates a graphical user interface (GUI) dialog box for ignoring files and directories in a Subversion version control system. The dialog allows users to select whether to ignore specific files, directories, or patterns within directories, as well as enable recursive ignoring. It also includes options for canceling the operation and displaying the selected path, filename, pattern, and recursive status.
This Java code creates a graphical user interface (GUI) dialog box for ignoring files and directories in a Subversion version control system. The dialog allows users to select whether to ignore specific files, directories, or patterns within directories, as well as enable recursive ignoring. It also includes options for canceling the operation and displaying the selected path, filename, pattern, and recursive status.
67 // choices
68 ButtonGroup bg = new ButtonGroup();
69 final JRadioButton this_file_btn = new JRadioButton( jEdit.getProperty( "ips.This_file", "This file" ) );
70 final JRadioButton this_dir_btn = new JRadioButton( jEdit.getProperty( "ips.This_directory", "This directory" ) );
71 final JRadioButton this_dir_pattern_btn = new JRadioButton( jEdit.getProperty( "ips.Files_in_this_directory_with_this_pattern>", "Files in this directory with this pattern:" ) );
72 if (f.isFile()) {
73 bg.add( this_file_btn );
74 this_file_btn.setSelected(true);
134 // layout the panel
135 panel.add( "0, 0, 8, 1, W, wh, 3", new JLabel( "Ignore:" ) );
136 panel.add( "0, 1, 8, 1, W, wh, 3", f.isFile() ? this_file_btn : this_dir_btn );
137 panel.add( "0, 2, 8, 1, W, wh, 3", this_dir_pattern_btn );
138 panel.add( "1, 3, 7, 1, W, wh, 3", pattern_field );
MoneyTypeTest.php
(git://github.com/symfony/symfony.git)
PHP · 28 lines
✨ Summary
This PHP code tests a MoneyType
form type, specifically its behavior when rendering a localized pattern for money formatting. It sets the locale to German and creates a form instance using the factory
. The test then verifies that the correct pattern is used in the view representation of the form.
This PHP code tests a MoneyType
form type, specifically its behavior when rendering a localized pattern for money formatting. It sets the locale to German and creates a form instance using the factory
. The test then verifies that the correct pattern is used in the view representation of the form.
XmlReader.java
(http://btalk.googlecode.com/svn/)
Java · 240 lines
✨ Summary
This Java code implements an XML reader that parses and interprets XML documents. It reads input from an InputStream, identifies XML tags, attributes, and text content, and returns information about each element in a stack-based data structure. The reader can be used to parse and process XML files, and provides methods for accessing the parsed elements’ names, attributes, and text content.
This Java code implements an XML reader that parses and interprets XML documents. It reads input from an InputStream, identifies XML tags, attributes, and text content, and returns information about each element in a stack-based data structure. The reader can be used to parse and process XML files, and provides methods for accessing the parsed elements’ names, attributes, and text content.
php.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 2590 lines
11 </PROPS>
12 <RULES IGNORE_CASE="TRUE">
13 <SPAN TYPE="MARKUP" DELEGATE="PHP">
14 <BEGIN><?php</BEGIN>
16 </SPAN>
18 <SPAN TYPE="MARKUP" DELEGATE="PHP">
19 <BEGIN><?</BEGIN>
20 <END>?></END>
21 </SPAN>
23 <SPAN TYPE="MARKUP" DELEGATE="PHP">
24 <BEGIN><%=</BEGIN>
25 <END>%></END>
65 <RULES SET="TAGS" DEFAULT="MARKUP">
66 <SPAN TYPE="MARKUP" DELEGATE="PHP">
67 <BEGIN><?php</BEGIN>
nssckfwc.h
(http://firefox-mac-pdf.googlecode.com/svn/trunk/)
C Header · 1050 lines
✨ Summary
This is a C header file that defines an interface for a cryptographic key management system, specifically for generating, managing, and using cryptographic keys. It provides functions for tasks such as key generation, wrapping, unwrapping, deriving, seeding, and verifying keys, as well as canceling and getting the status of functions in progress.
This is a C header file that defines an interface for a cryptographic key management system, specifically for generating, managing, and using cryptographic keys. It provides functions for tasks such as key generation, wrapping, unwrapping, deriving, seeding, and verifying keys, as well as canceling and getting the status of functions in progress.
Abstract.php
(https://code.google.com/p/ecartcommerce/)
PHP · 109 lines
✨ Summary
This is a base class for Ecart payment methods, providing common functionality and properties such as code, title, description, icon, and configuration settings. It allows subclasses to override the init
method and provides methods to check if the method is enabled, retrieve its module name and file name, and access its configuration settings.
This is a base class for Ecart payment methods, providing common functionality and properties such as code, title, description, icon, and configuration settings. It allows subclasses to override the init
method and provides methods to check if the method is enabled, retrieve its module name and file name, and access its configuration settings.
xfs_filestream.h
(http://omnia2droid.googlecode.com/svn/trunk/)
C++ Header · 137 lines
✨ Summary
This C header file defines a set of functions and macros for managing filestream associations with allocation groups (AGs) on an XFS filesystem. It provides atomic counters to track active filestreams, ensuring that no invalid references exist in the cache. The code also includes prototypes for various filestream-related functions and constants for allocation selection flags.
This C header file defines a set of functions and macros for managing filestream associations with allocation groups (AGs) on an XFS filesystem. It provides atomic counters to track active filestreams, ensuring that no invalid references exist in the cache. The code also includes prototypes for various filestream-related functions and constants for allocation selection flags.
compile_to_c.h
(git://github.com/tybor/Liberty.git)
C Header · 19784 lines
✨ Summary
This is a C header file that declares a large number of global variables, each with its own unique identifier and data type. The variables are likely used to store configuration settings, constants, or other data that needs to be accessed throughout the program. They are declared using the extern
keyword, indicating that they will be defined elsewhere in the codebase.
This is a C header file that declares a large number of global variables, each with its own unique identifier and data type. The variables are likely used to store configuration settings, constants, or other data that needs to be accessed throughout the program. They are declared using the extern
keyword, indicating that they will be defined elsewhere in the codebase.
exploretags.js
(https://code.google.com/p/ontowiki/)
JavaScript · 249 lines
✨ Summary
This JavaScript code is part of a tagging extension for OntoWiki, a semantic web platform. It enables users to add, remove, and manage tags on resources in the platform. The code handles user interactions such as clicking cloud values, deleting properties, and sorting tag clouds, while also refreshing the page with updated tag lists.
This JavaScript code is part of a tagging extension for OntoWiki, a semantic web platform. It enables users to add, remove, and manage tags on resources in the platform. The code handles user interactions such as clicking cloud values, deleting properties, and sorting tag clouds, while also refreshing the page with updated tag lists.