100+ results for 'php is_readable'
Not the results you expected?
Settings.php (https://bitbucket.org/kudutest/moodlegit.git) PHP · 332 lines
22 * @package PHPExcel_Settings
23 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
25 * @version ##VERSION##, ##DATE##
33 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../');
34 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
35 }
112 * @param string $zipClass The Zip handler class that PHPExcel should use for Zip file management
113 * e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive
114 * @return boolean Success or failure
115 */
130 * @return string Name of the Zip handler Class that PHPExcel is configured to use
131 * for Zip file management
132 * e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive
133 */
134 public static function getZipClass() {
Settings.php (https://gitlab.com/rsilveira1987/Expresso) PHP · 332 lines
22 * @package PHPExcel_Settings
23 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)
24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
25 * @version 1.7.8, 2012-10-12
33 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../');
34 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
35 }
112 * @param string $zipClass The Zip handler class that PHPExcel should use for Zip file management
113 * e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive
114 * @return boolean Success or failure
115 */
130 * @return string Name of the Zip handler Class that PHPExcel is configured to use
131 * for Zip file management
132 * e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive
133 */
134 public static function getZipClass() {
BodyTest.php (https://gitlab.com/jatasya/testSlimfrmwk) PHP · 401 lines
1 <?php
2 /**
3 * Slim Framework (http://slimframework.com)
4 *
5 * @link https://github.com/slimphp/Slim
6 * @copyright Copyright (c) 2011-2015 Josh Lockhart
7 * @license https://github.com/slimphp/Slim/blob/master/LICENSE.md (MIT License)
12 use Slim\Http\Body;
14 class BodyTest extends \PHPUnit_Framework_TestCase
15 {
16 /**
41 public function resourceFactory($mode = 'r+')
42 {
43 $stream = fopen('php://temp', $mode);
44 fwrite($stream, $this->text);
45 rewind($stream);
source_code.php (https://github.com/kamarulismail/kamarul-playground.git) PHP · 301 lines
1 <?php
2 /**
3 * File containing the ezcTemplateSourceCode class
56 *
57 * @property string $stream
58 * The PHP stream path for the template source file.
59 * @property string $resource
60 * The resource string which requested this template.
145 * Initialises the source object with the code and output context.
146 *
147 * @param string $stream The actual PHP stream path for the template source
148 * file.
149 * @param string $resource The requested resource string, if false $stream
165 /**
166 * Loads the data from the PHP stream into the $code member variable.
167 *
168 * @throws ezcTemplateFileNotFoundException if the file does not exist on disk.
Cache_File.php (https://gitlab.com/karlen/ayo_wp) PHP · 455 lines
1 <?php
2 namespace W3TC;
116 $expires_at = time() + $expire;
117 @fputs( $fp, pack( 'L', $expires_at ) );
118 @fputs( $fp, '<?php exit; ?>' );
119 @fputs( $fp, @serialize( $var ) );
120 @fclose( $fp );
153 ( $group ? $group . DIRECTORY_SEPARATOR : '' ) .
154 $this->_get_path( $storage_key );
155 if ( !is_readable( $path ) )
156 return array( null, $has_old_data );
314 $hash = md5( $key );
316 $path = sprintf( '%s/%s/%s.php', substr( $hash, 0, 3 ), substr( $hash, 3, 3 ), $hash );
318 return $path;
plugin.php (https://github.com/weissms/owb-mirror.git) PHP · 382 lines
1 <?php
3 function get_plugin_data( $plugin_file ) {
54 if ( substr($subfile, 0, 1) == '.' )
55 continue;
56 if ( substr($subfile, -4) == '.php' )
57 $plugin_files[] = "$file/$subfile";
58 }
59 }
60 } else {
61 if ( substr($file, -4) == '.php' )
62 $plugin_files[] = $file;
63 }
72 foreach ( $plugin_files as $plugin_file ) {
73 if ( !is_readable( "$plugin_root/$plugin_file" ) )
74 continue;
Settings.php (https://gitlab.com/team_fsn/fsn-php) PHP · 387 lines
22 * @package PHPExcel_Settings
23 * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
25 * @version 1.8.0, 2014-03-02
33 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../');
34 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
35 }
118 * @param string $zipClass The Zip handler class that PHPExcel should use for Zip file management
119 * e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive
120 * @return boolean Success or failure
121 */
137 * @return string Name of the Zip handler Class that PHPExcel is configured to use
138 * for Zip file management
139 * e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive
140 */
141 public static function getZipClass()
Mail.php (https://github.com/shooray/oscommerce.git) PHP · 375 lines
1 <?php
2 /**
3 * osCommerce Online Merchant
104 function addAttachment($file, $is_uploaded = false) {
105 if ( $is_uploaded === true ) {
106 } elseif ( file_exists($file) && is_readable($file) ) {
107 $data = file_get_contents($file);
108 $filename = basename($file);
119 function addImage($file, $is_uploaded = false) {
120 if ( $is_uploaded === true ) {
121 } elseif ( file_exists($file) && is_readable($file) ) {
122 $data = file_get_contents($file);
123 $filename = basename($file);
SimpleGdImage.class.old.php (https://gitlab.com/x33n/ProjectPier-Core) PHP · 549 lines
openid_file_store.php (https://github.com/F5/zetacomponents.git) PHP · 301 lines
ezwordtoimageoperator.php (https://github.com/GunioRobot/ezpublish.git) PHP · 488 lines
1 <?php
2 /**
3 * File containing the eZWordtoimageoperator class.
11 /*!
12 \class eZWordToImageOperator ezwordtoimageoperator.php
13 \brief The class eZWordToImageOperator does
199 $icon = $operatorValue . '.' . $iconFormat;
200 $iconPath = $repository . '/' . $theme . '/' . $icon;
201 if ( !is_readable( $iconPath ) )
202 {
203 $defaultIcon = $themeINI->variable( 'FlagIcons', 'DefaultIcon' );
363 default:
364 {
365 eZDebug::writeError( "Unknown operator: $operatorName", "ezwordtoimageoperator.php" );
366 }
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 }
Assert.php (https://gitlab.com/Sigpot/AirSpot) PHP · 903 lines
SplFileInfo.php (https://gitlab.com/iranjith4/hhvm) PHP · 444 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
416 // This doc comment block generated by idl/sysdoc.php
417 /**
418 * ( excerpt from http://php.net/manual/en/splfileinfo.setinfoclass.php )
419 *
420 * Use this method to set a custom class which will be used when
PolyfillTestCase.php (https://github.com/fabpot/composer.git) PHP · 762 lines
24 abstract class PolyfillTestCase extends TestCase
25 {
26 // all the functions below are form https://github.com/symfony/phpunit-bridge/blob/bd341a45ef79b30918376e8b8e2279fac6894c3b/Legacy/PolyfillAssertTrait.php
28 /**
512 foreach (array(
513 'PHPUnit\Framework\SelfDescribing',
514 ) as $interface) {
515 if (!interface_exists($interface) && interface_exists(str_replace('\\', '_', $interface))) {
520 if (!class_exists('PHPUnit\Framework\Constraint\Constraint')) {
521 class_alias('PHPUnit_Framework_Constraint', 'PHPUnit\Framework\Constraint\Constraint');
522 }
523 }
525 // all the code below taken from various PHPUnit versions to make things work on PHPUnit 4.8 / PHP 5.3
526 /*
527 * This file is part of PHPUnit.
StandardConfiguration.php (https://github.com/kiranatama/sagalaya.git) PHP · 707 lines
1 <?php
2 /**
3 * Zend Framework
289 $cookiePath = (string) $cookiePath;
291 $test = parse_url($cookiePath, PHP_URL_PATH);
292 if ($test != $cookiePath || '/' != $test[0]) {
293 throw new Exception\InvalidArgumentException('Invalid cookie path');
439 public function setEntropyFile($entropyFile)
440 {
441 if (is_dir($entropyFile) || !is_readable($entropyFile)) {
442 throw new Exception\InvalidArgumentException('Invalid entropy_file provided');
443 }
PatternOptions.php (https://github.com/kiranatama/sagalaya.git) PHP · 763 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
158 {
159 // disable file/directory permissions by default on windows systems
160 if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
161 $this->filePermission = false;
162 $this->dirPermission = false;
648 "Public directory '{$publicDir}' not writable"
649 );
650 } elseif (!is_readable($publicDir)) {
651 throw new Exception\InvalidArgumentException(
652 "Public directory '{$publicDir}' not readable"
generator.php (https://github.com/Yacodo/atoum.git) PHP · 709 lines
1 <?php
3 namespace mageekguy\atoum\tests\units\scripts\phar;
9 ;
11 require_once __DIR__ . '/../../../runner.php';
13 class generator extends atoum\test
24 $adapter = new atoum\test\adapter();
26 $adapter->php_sapi_name = function() { return uniqid(); };
28 $name = uniqid();
37 ;
39 $adapter->php_sapi_name = function() { return 'cli'; };
41 $name = uniqid();
File.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 934 lines
1 <?php
2 /**
3 * Origin filesystem driver
14 * Class File
15 * @package Magento\Framework\Filesystem\Driver
16 * @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
17 */
18 class File implements DriverInterface
85 {
86 clearstatcache();
87 $result = @is_readable($this->getScheme() . $path);
88 if ($result === null) {
89 throw new FileSystemException(
Testinstall.php (https://gitlab.com/flyhope/Hiblog) PHP · 571 lines
1 <?php
2 /**
3 * Smarty Internal TestInstall
44 if (!$template_dir) {
45 if ($smarty->use_include_path && !preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_template_dir)) {
46 // try PHP include_path
47 if ($_stream_resolve_include_path) {
48 $template_dir = stream_resolve_include_path($_template_dir);
89 $errors['template_dir'] = $message;
90 }
91 } elseif (!is_readable($template_dir)) {
92 $status = false;
93 $message = "FAILED: $template_dir is not readable";
382 "smarty_internal_compile_include.php" => true,
383 "smarty_internal_compile_include_php.php" => true,
384 "smarty_internal_compile_insert.php" => true,
422 "smarty_internal_resource_file.php" => true,
423 "smarty_internal_resource_php.php" => true,
424 "smarty_internal_resource_registered.php" => true,
Tmx.php (https://github.com/MontmereLimited/ZendFramework-v1.git) PHP · 233 lines
1 <?php
2 /**
3 * Zend Framework
16 * @package Zend_Translate
17 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
18 * @version $Id: Tmx.php 23775 2011-03-01 17:25:24Z ralph $
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 */
23 /** Zend_Locale */
24 // // // // // // // // require_once 'Zend/Locale.php';
26 /** Zend_Translate_Adapter */
27 // // // // // // // // require_once 'Zend/Translate/Adapter.php';
func_skins.php (https://github.com/lewellyn/TrellisDesk.git) PHP · 976 lines
1 <?php
3 /**
77 $file = TD_SKIN .'s'. $id .'/templates/'. $file;
79 if ( ! is_readable( $file ) || ! is_file( $file ) ) return false;
81 return file_get_contents( $file );
90 $file = TD_SKIN .'s'. $id .'/css/'. $file;
92 if ( ! is_readable( $file ) || ! is_file( $file ) ) return false;
94 return file_get_contents( $file );
103 $file = TD_SKIN .'s'. $id .'/templates/wrapper.tpl';
105 if ( ! is_readable( $file ) || ! is_file( $file ) ) return false;
107 return file_get_contents( $file );
func_languages.php (https://github.com/lewellyn/TrellisDesk.git) PHP · 522 lines
1 <?php
3 /**
104 if ( ! $handle = fopen( $path, 'wb' ) ) return false;
106 $file_start = "<?php\n\n/*\n#======================================================\n";
107 $file_start .= "| | Trellis Desk Language File\n";
108 $file_start .= "| | ". $file ."\n";
343 while ( false !== ( $file = readdir( $handle ) ) )
344 {
345 if ( is_file( $dir .'/'. $file ) && is_readable( $dir .'/'. $file ) && ( strrchr( $file, "." ) == '.php' ) )
346 {
347 $files[] = $file;
436 while ( false !== ( $file = readdir( $handle ) ) )
437 {
438 if ( is_file( $dir .'/'. $file ) && ( strrchr( $file, "." ) == '.php' ) && $file != "lang_email_content.php" )
439 {
440 $files[] = $file;
sfLoader.class.php (https://github.com/richhl/kalturaCE.git) PHP · 375 lines
1 <?php
3 /*
15 * @subpackage util
16 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
17 * @version SVN: $Id: sfLoader.class.php 3313 2007-01-20 07:00:37Z fabien $
18 */
19 class sfLoader
107 foreach ($dirs as $dir)
108 {
109 if (is_readable($dir.'/'.$templateFile))
110 {
111 return $dir;
219 foreach ($dirs as $dir)
220 {
221 if (is_readable($dir.'/'.$path))
222 {
223 return $dir.'/'.$path;
vfsStreamWrapperTestCase.php (https://github.com/theosp/google_appengine.git) PHP · 783 lines
1 <?php
2 /**
3 * This file is part of vfsStream.
9 */
10 namespace org\bovigo\vfs;
11 require_once __DIR__ . '/vfsStreamWrapperBaseTestCase.php';
12 /**
13 * Test for org\bovigo\vfs\vfsStreamWrapper.
150 /**
151 * assert is_readable() works correct
152 *
153 * @test
154 */
155 public function is_readable()
156 {
157 $this->assertTrue(is_readable($this->fooURL));
Xliff.php (https://bitbucket.org/Dal-Papa/is-340-publish-base.git) PHP · 230 lines
1 <?php
2 /**
3 * Zend Framework
16 * @package Zend_Translate
17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
18 * @version $Id: Xliff.php 24649 2012-02-26 03:37:54Z adamlundrigan $
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 */
23 /** Zend_Locale */
24 require_once 'Zend/Locale.php';
26 /** Zend_Translate_Adapter */
27 require_once 'Zend/Translate/Adapter.php';
smarty_internal_testinstall.php (https://gitlab.com/team_fsn/fsn-php) PHP · 604 lines
1 <?php
2 /**
3 * Smarty Internal TestInstall
44 if (!$template_dir) {
45 if ($smarty->use_include_path && !preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_template_dir)) {
46 // try PHP include_path
47 if ($_stream_resolve_include_path) {
48 $template_dir = stream_resolve_include_path($_template_dir);
90 $errors[ 'template_dir' ] = $message;
91 }
92 } elseif (!is_readable($template_dir)) {
93 $status = false;
94 $message = "FAILED: $template_dir is not readable";
384 'smarty_internal_compile_include.php' => true,
385 'smarty_internal_compile_include_php.php' => true,
386 'smarty_internal_compile_insert.php' => true,
394 'smarty_internal_compile_private_object_function.php' => true,
395 'smarty_internal_compile_private_php.php' => true,
396 'smarty_internal_compile_private_print_expression.php' => true,
class-wp-filesystem-direct.php (https://gitlab.com/campus-academy/krowkaramel) PHP · 664 lines
1 <?php
2 /**
3 * WordPress Direct Filesystem.
9 /**
10 * WordPress Filesystem Class for direct PHP file and folder manipulation.
11 *
12 * @since 2.5.0
439 * @return bool Whether $file is readable.
440 */
441 public function is_readable( $file ) {
442 return @is_readable( $file );
532 */
533 public function mkdir( $path, $chmod = false, $chown = false, $chgrp = false ) {
534 // Safe mode fails with a trailing slash under certain PHP versions.
535 $path = untrailingslashit( $path );
Settings.php (https://gitlab.com/techniconline/kmc) PHP · 392 lines
22 * @package PHPExcel_Settings
23 * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
25 * @version ##VERSION##, ##DATE##
33 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../');
34 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
35 }
118 * @param string $zipClass The Zip handler class that PHPExcel should use for Zip file management
119 * e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive
120 * @return boolean Success or failure
121 */
138 * @return string Name of the Zip handler Class that PHPExcel is configured to use
139 * for Zip file management
140 * e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive
141 */
142 public static function getZipClass()
FileSystem.php (https://bitbucket.org/jonbiard/nucleus.git) PHP · 723 lines
1 <?php
2 /**
3 * Class FileSystem
18 * @subpackage FileSystem
19 *
20 * @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
21 */
22 class FileSystem
66 *
67 * @param string $path The file or directory path
68 * @param int $mode The file mode (see PHP's chmod())
69 *
70 * @throws IOException When the permissions cannot be changed
87 * @throws IOException Whenever an error occurs during copy
88 *
89 * @SuppressWarnings(PHPMD.CyclomaticComplexity)
90 * @SuppressWarnings(PHPMD.NPathComplexity)
zetro_manager.php (https://gitlab.com/zetrosoft/pos-accounting) PHP · 491 lines
ShapeFile.lib.php (https://bitbucket.org/markmoskalenko/svitor.git) PHP · 649 lines
1 <?php
2 function loadData($type, $data) {
3 if (!$data) return $data;
284 function _openDBFFile($toWrite = false) {
285 $checkFunction = $toWrite ? "is_writable" : "is_readable";
286 if (($toWrite) && (!file_exists(str_replace('.*', '.dbf', $this->FileName)))) {
287 if (!@dbase_create(str_replace('.*', '.dbf', $this->FileName), $this->DBFHeader)) {
CMB2_REST.php (https://github.com/livinglab/openlab.git) PHP · 794 lines
1 <?php
2 /**
3 * Handles hooking CMB2 objects/fields into the WordPres REST API
121 $show_value = $this->cmb->prop( 'show_in_rest' );
123 $this->rest_read = self::is_readable( $show_value );
124 $this->rest_edit = self::is_editable( $show_value );
125 }
285 // Else check if the value represents readable.
286 return self::is_readable( $show_in_rest );
287 }
746 * @return boolean Whether value is considered readable.
747 */
748 public static function is_readable( $value ) {
749 return ! empty( $value ) && ! in_array( $value, array(
750 WP_REST_Server::CREATABLE,
DoCoMoDisplayMap.php (https://github.com/usagi-project/mynets1.git) PHP · 826 lines
1 <?php
2 /* vim: set expandtab tabstop=4 shiftwidth=4: */
4 /**
5 * PHP versions 4 and 5
6 *
7 * LICENSE: This source file is subject to version 3.0 of the PHP license
15 * @author KUBO Atsuhiro <iteman@users.sourceforge.net>
16 * @copyright 2003-2006 KUBO Atsuhiro <iteman@users.sourceforge.net>
17 * @license http://www.php.net/license/3_0.txt PHP License 3.0
18 * @version CVS: $Id: DoCoMoDisplayMap.php,v 1.29 2006/11/07 09:25:14 kuboa Exp $
31 * @author KUBO Atsuhiro <iteman@users.sourceforge.net>
32 * @copyright 2003-2006 KUBO Atsuhiro <iteman@users.sourceforge.net>
33 * @license http://www.php.net/license/3_0.txt PHP License 3.0
34 * @version Release: @package_version@
35 * @link http://www.nttdocomo.co.jp/service/imode/make/content/spec/screen_area/index.html
OAuthProvider.php (https://bitbucket.org/csod/x-oauth-php.git) PHP · 680 lines
smarty_internal_testinstall.php (https://gitlab.com/Shenglian/SmartyProject) PHP · 595 lines
360 $source = SMARTY_SYSPLUGINS_DIR;
361 if (is_dir($source)) {
362 $expectedSysplugins = array('smartycompilerexception.php' => true, 'smartyexception.php' => true,
363 'smarty_cacheresource.php' => true, 'smarty_cacheresource_custom.php' => true,
364 'smarty_cacheresource_keyvaluestore.php' => true, 'smarty_data.php' => true,
365 'smarty_internal_block.php' => true,
383 'smarty_internal_compile_include.php' => true,
384 'smarty_internal_compile_include_php.php' => true,
385 'smarty_internal_compile_insert.php' => true,
394 'smarty_internal_compile_private_object_function.php' => true,
395 'smarty_internal_compile_private_php.php' => true,
396 'smarty_internal_compile_private_print_expression.php' => true,
407 'smarty_internal_config_file_compiler.php' => true,
408 'smarty_internal_data.php' => true, 'smarty_internal_debug.php' => true,
409 'smarty_internal_extension_clear.php' => true,
FileRepository_Backend_FileSystem.class.php (https://github.com/dbernar1/Project-Pier.git) PHP · 463 lines
1 <?php
3 /**
72 $file_path = $this->_getFilePath($file_id);
73 if (!is_file($file_path) || !is_readable($file_path)) {
74 throw new FileNotInRepositoryError($file_id);
75 } // if
91 $file_path = $this->_getFilePath($file_id);
92 if (!is_file($file_path) || !is_readable($file_path)) {
93 throw new FileNotInRepositoryError($file_id);
94 } // if
174 */
175 function addFile($source, $attributes = null) {
176 if (!is_readable($source)) {
177 throw new FileDnxError($source);
178 } // if
Assert.php (https://gitlab.com/rocs/Streaming-Safe-for-Kids) PHP · 948 lines
Xliff.php (https://gitlab.com/grayhamster/open-social-media-monitoring) PHP · 230 lines
1 <?php
2 /**
3 * Zend Framework
16 * @package Zend_Translate
17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
18 * @version $Id: Xliff.php 24652 2012-02-26 04:49:45Z adamlundrigan $
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 */
23 /** Zend_Locale */
24 require_once 'Zend/Locale.php';
26 /** Zend_Translate_Adapter */
27 require_once 'Zend/Translate/Adapter.php';
Cache.php (https://github.com/goldoraf/OBM.git) PHP · 201 lines
1 <?php
2 /**
3 * Zend Framework
17 * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id: Cache.php 10893 2008-08-12 08:05:14Z fab $
20 */
97 $frontendClass = 'Zend_Cache_' . ($frontend != 'Core' ? 'Frontend_' : '') . $frontend;
98 // security controls are explicit
99 require_once str_replace('_', DIRECTORY_SEPARATOR, $frontendClass) . '.php';
100 } else {
101 // we use a custom frontend
183 /**
184 * Returns TRUE if the $filename is readable, or FALSE otherwise.
185 * This function uses the PHP include_path, where PHP's is_readable()
186 * does not.
187 *
file.php (https://github.com/agallou/atoum.git) PHP · 586 lines
1 <?php
3 namespace mageekguy\atoum\tests\units\mock\streams\fs;
9 ;
11 require_once __DIR__ . '/../../../../runner.php';
13 class file extends atoum\test
27 ->string(file_get_contents($file))->isEmpty()
28 ->variable($fileResource = fopen($file, 'r'))->isNotEqualTo(false)
29 ->boolean(is_readable($file))->isTrue()
30 ->boolean(is_writable($file))->isTrue()
31 ->boolean(rename($file, testedClass::defaultProtocol . '://' . uniqid()))->isTrue()
38 ->string(file_get_contents($file))->isEmpty()
39 ->variable($fileResource = fopen($file, 'r'))->isNotEqualTo(false)
40 ->boolean(is_readable($file))->isTrue()
41 ->boolean(is_writable($file))->isTrue()
42 ->boolean(rename($file, testedClass::defaultProtocol . '://' . uniqid()))->isTrue()
MimeType.php (https://github.com/adrienne/Readability.git) PHP · 283 lines
1 <?php
2 /**
3 * Zend Framework
23 * @see Zend_Validate_Abstract
24 */
25 require_once 'Zend/Validate/Abstract.php';
27 /**
95 $mimetype = explode(',', $mimetype);
96 } elseif (!is_array($mimetype)) {
97 require_once 'Zend/Validate/Exception.php';
98 throw new Zend_Validate_Exception("Invalid options to validator provided");
99 }
118 /**
119 * Sets the magicfile to use
120 * if null, the MAGIC constant from php is used
121 *
122 * @param string $file
StandardConfiguration.php (https://bitbucket.org/paulscott56/c4-new.git) PHP · 680 lines
1 <?php
2 namespace C4\Library\Session\Configuration;
261 $cookiePath = (string) $cookiePath;
263 $test = parse_url($cookiePath, PHP_URL_PATH);
264 if ($test != $cookiePath || '/' != $test[0]) {
265 throw new Exception\InvalidArgumentException('Invalid cookie path');
411 public function setEntropyFile($entropyFile)
412 {
413 if (is_dir($entropyFile) || !is_readable($entropyFile)) {
414 throw new Exception\InvalidArgumentException('Invalid entropy_file provided');
415 }
vfsStreamWrapperTestCase.php (https://github.com/wiltave/vfsStream.git) PHP · 571 lines
1 <?php
2 /**
3 * Test for org::bovigo::vfs::vfsStreamWrapper.
8 require_once 'org/bovigo/vfs/vfsStream.php';
9 require_once 'PHPUnit/Framework.php';
10 require_once dirname(__FILE__) . '/vfsStreamWrapperBaseTestCase.php';
142 * @test
143 */
144 public function is_readable()
145 {
146 $this->assertTrue(is_readable($this->fooURL));
147 $this->assertTrue(is_readable($this->fooURL . '/.'));
148 $this->assertTrue(is_readable($this->barURL));
149 $this->assertTrue(is_readable($this->barURL . '/.'));
150 $this->assertTrue(is_readable($this->baz1URL));
151 $this->assertTrue(is_readable($this->baz2URL));
Xliff.php (https://github.com/komola/ZendFramework.git) PHP · 229 lines
System.php (https://github.com/grandison/budo16.git) PHP · 374 lines
1 <?php
2 /**
3 * SocialEngine
7 * @copyright Copyright 2006-2010 Webligo Developments
8 * @license http://www.socialengine.net/license/
9 * @version $Id: System.php 7614 2010-10-08 21:57:01Z john $
10 * @author John Boehr <j@webligo.com>
11 */
13 //require_once 'Engine/Vfs/Adapter/Abstract.php';
14 //require_once 'Engine/Vfs/Adapter/LocalAbstract.php';
15 //require_once 'Engine/Vfs/Adapter/Exception.php';
16 //require_once 'Engine/Vfs/Directory/Standard.php';
vfsStreamWrapperTestCase.php (https://github.com/acoulton/vfsStream.git) PHP · 564 lines
1 <?php
2 /**
3 * Test for org::bovigo::vfs::vfsStreamWrapper.
8 require_once 'org/bovigo/vfs/vfsStream.php';
9 require_once 'PHPUnit/Framework/TestCase.php';
10 require_once dirname(__FILE__) . '/vfsStreamWrapperBaseTestCase.php';
135 * @test
136 */
137 public function is_readable()
138 {
139 $this->assertTrue(is_readable($this->fooURL));
140 $this->assertTrue(is_readable($this->fooURL . '/.'));
141 $this->assertTrue(is_readable($this->barURL));
142 $this->assertTrue(is_readable($this->barURL . '/.'));
143 $this->assertTrue(is_readable($this->baz1URL));
144 $this->assertTrue(is_readable($this->baz2URL));
Local.php (https://gitlab.com/dzakiafif/cokelatklasik) PHP · 401 lines
DB.class.php (https://github.com/cj/Project-Pier.git) PHP · 328 lines
ZLocale.php (https://github.com/ThiloWitt/core.git) PHP · 428 lines
1 <?php
2 /**
3 * Copyright Zikula Foundation 2009 - Zikula Application Framework
83 $override = "config/locale/$lang/locale.ini";
84 $file = (file_exists($override) ? $override : "locale/$lang/locale.ini");
85 if (is_readable($file)) {
86 $array = parse_ini_file($file, false);
87 foreach ($array as $k => $v) {
AbstractReader.php (https://gitlab.com/unofficial-mirrors/moodle) PHP · 238 lines
1 <?php
3 namespace Box\Spout\Reader;
71 /**
72 * Sets whether date/time values should be returned as PHP objects or be formatted as strings.
73 *
74 * @api
147 /**
148 * Returns the scheme of the custom stream wrapper, if the path indicates a stream wrapper is used.
149 * For example, php://temp => php, s3://path/to/file => s3...
150 *
151 * @param string $filePath Path of the file to be read
191 /**
192 * Checks if a path is a PHP stream (like php://output, php://memory, ...)
193 *
194 * @param string $filePath Path of the file to be read
FileInfo.php (https://gitlab.com/Nenasith/IO) PHP · 373 lines
source_code_test.php (https://github.com/F5/zetacomponents.git) PHP · 452 lines
1 <?php
2 /**
3 *
34 public static function suite()
35 {
36 return new PHPUnit_Framework_TestSuite( "ezcTemplateSourceCodeTest" );
37 }
153 self::assertTrue( file_exists( $this->templatePath . "zhadum.ezt" ), 'Template file does not exist on filesystem' );
154 self::assertTrue( is_readable( $this->templatePath . "zhadum.ezt" ), 'Template file cannot be read' );
155 self::assertSame( true, $src->isReadable(), 'Template file is not available while the file exists' );
156 }
179 self::assertTrue( file_exists( $this->templateStorePath . "zhadum.ezt" ), 'Template file does not exist on filesystem' );
180 self::assertTrue( !is_readable( $this->templateStorePath . "zhadum.ezt" ), 'Template file is still readable' );
181 self::assertSame( false, $src->isReadable(), 'Unreadable template file is considered readable' );
182 }
Parser.class.php (https://github.com/macmade/WOOPS.git) PHP · 375 lines
1 <?php
2 ################################################################################
3 # #
22 {
23 /**
24 * The minimum version of PHP required to run this class (checked by the WOOPS class manager)
25 */
26 const PHP_COMPATIBLE = '5.2.0';
79 // Checks if the file is readable
80 if( !is_readable( $path ) ) {
82 // Error - The file is not readable
MoxesTemplate.php (https://github.com/max4o/MoxesTemplate.git) PHP · 335 lines
smarty_internal_testinstall.php (https://github.com/exponentcms/exponent-cms.git) PHP · 605 lines
1 <?php
2 /**
3 * Smarty Internal TestInstall
42 if (!$template_dir) {
43 if ($smarty->use_include_path && !preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_template_dir)) {
44 // try PHP include_path
45 if ($_stream_resolve_include_path) {
46 $template_dir = stream_resolve_include_path($_template_dir);
83 $errors[ 'template_dir' ] = $message;
84 }
85 } elseif (!is_readable($template_dir)) {
86 $status = false;
87 $message = "FAILED: $template_dir is not readable";
119 $errors[ 'compile_dir' ] = $message;
120 }
121 } elseif (!is_readable($_compile_dir)) {
122 $status = false;
123 $message = "FAILED: {$_compile_dir} is not readable";
smarty_internal_testinstall.php (https://github.com/usualoma/movabletype.git) PHP · 609 lines
1 <?php
2 /**
3 * Smarty Internal TestInstall
42 if (!$template_dir) {
43 if ($smarty->use_include_path && !preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_template_dir)) {
44 // try PHP include_path
45 if ($_stream_resolve_include_path) {
46 $template_dir = stream_resolve_include_path($_template_dir);
83 $errors[ 'template_dir' ] = $message;
84 }
85 } elseif (!is_readable($template_dir)) {
86 $status = false;
87 $message = "FAILED: $template_dir is not readable";
364 'smarty_internal_compile_include.php' => true,
365 'smarty_internal_compile_include_php.php' => true,
366 'smarty_internal_compile_insert.php' => true,
375 'smarty_internal_compile_private_object_function.php' => true,
376 'smarty_internal_compile_private_php.php' => true,
377 'smarty_internal_compile_private_print_expression.php' => true,
generator.php (https://github.com/Calak/atoum.git) PHP · 709 lines
1 <?php
3 namespace mageekguy\atoum\tests\units\scripts\phar;
9 ;
11 require_once(__DIR__ . '/../../../runner.php');
13 class generator extends atoum\test
24 $adapter = new atoum\test\adapter();
26 $adapter->php_sapi_name = function() { return uniqid(); };
28 $name = uniqid();
37 ;
39 $adapter->php_sapi_name = function() { return 'cli'; };
41 $name = uniqid();
generator.php (https://github.com/Hywan/atoum.git) PHP · 410 lines
1 <?php
3 namespace mageekguy\atoum\tests\units\scripts\phar;
9 use mageekguy\atoum\scripts\phar;
11 require_once __DIR__ . '/../../../runner.php';
13 class generator extends atoum\test
27 $this
28 ->if($adapter = new atoum\test\adapter())
29 ->and($adapter->php_sapi_name = function () {
30 return uniqid();
31 })
36 ->isInstanceOf(atoum\exceptions\logic::class)
37 ->hasMessage('\'' . $name . '\' must be used in CLI only')
38 ->if($adapter->php_sapi_name = function () {
39 return 'cli';
40 })
file.php (https://github.com/Hywan/atoum.git) PHP · 581 lines
1 <?php
3 namespace mageekguy\atoum\tests\units\mock\streams\fs;
6 use mageekguy\atoum\mock\streams\fs\file as testedClass;
8 require_once __DIR__ . '/../../../../runner.php';
10 class file extends atoum\test
24 ->string(file_get_contents($file))->isEmpty()
25 ->variable($fileResource = fopen($file, 'r'))->isNotEqualTo(false)
26 ->boolean(is_readable($file))->isTrue()
27 ->boolean(is_writable($file))->isTrue()
28 ->boolean(rename($file, testedClass::defaultProtocol . '://' . uniqid()))->isTrue()
35 ->string(file_get_contents($file))->isEmpty()
36 ->variable($fileResource = fopen($file, 'r'))->isNotEqualTo(false)
37 ->boolean(is_readable($file))->isTrue()
38 ->boolean(is_writable($file))->isTrue()
39 ->boolean(rename($file, testedClass::defaultProtocol . '://' . uniqid()))->isTrue()
Filesystem.php (https://github.com/ftaiolivista/Zend-Framework-Namespaced-.git) PHP · 237 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: Filesystem.php 23395 2010-11-19 15:30:47Z alexander $
21 */
29 /** Zend_Search_Lucene_Storage_File */
30 require_once 'Zend/Search/Lucene/Storage/File.php';
32 /**
55 public function __construct($filename, $mode='r+b')
56 {
57 global $php_errormsg;
59 if (strpos($mode, 'w') === false && !is_readable($filename)) {
format.php (https://bitbucket.org/ciceidev/cicei_moodle_conditional_activities.git) PHP · 432 lines
9 ////////////////////////////////////////////////////////////////////////////
11 // Based on default.php, included by ../import.php
12 /**
13 * @package questionbank
16 require_once ("$CFG->libdir/xmlize.php");
17 require_once ("$CFG->libdir/tcpdf/html_entity_decode_php4.php");
19 class qformat_blackboard extends qformat_default {
29 /// Returns complete file with an array, one item per line
31 if (is_readable($filename)) {
33 $zip = zip_open($filename);
141 // put questiontext in question object
142 if ($ishtml) {
143 $question->questiontext = html_entity_decode_php4(trim($thisquestion["#"]["BODY"][0]["#"]["TEXT"][0]["#"]));
144 }
145 $question->questiontext = addslashes($question->questiontext);
templateedit.php (https://github.com/GunioRobot/ezpublish.git) PHP · 237 lines
1 <?php
2 /**
3 * @copyright Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.
173 $fileName = $template;
175 if ( !is_readable( $fileName ) )
176 {
177 $tpl->setVariable( 'template', $template );
178 $tpl->setVariable( 'template_exists', true );
179 $tpl->setVariable( 'original_template', $originalTemplate );
180 $tpl->setVariable( 'is_readable', false );
181 $tpl->setVariable( 'site_access', $siteAccess );
196 $tpl->setVariable( 'template_exists', true );
197 $tpl->setVariable( 'original_template', $originalTemplate );
198 $tpl->setVariable( 'is_readable', true );
199 $tpl->setVariable( 'site_access', $siteAccess );
config.html (https://bitbucket.org/kudutest1/moodlegit.git) HTML · 144 lines
1 <?php
3 global $CFG;
5 // Set to defaults if undefined
6 if (!isset($config->auth_instructions) or empty($config->user_attribute)) {
7 $config->auth_instructions = get_string('auth_shib_instructions', 'auth_shibboleth', $CFG->wwwroot.'/auth/shibboleth/index.php');
8 }
9 if (!isset ($config->user_attribute)) {
22 <tr valign="top" class="required">
23 <td align="right"><label for="user_attribute"><?php print_string("username") ?>: </label></td>
24 <td>
25 <input id="user_attribute" name="user_attribute" type="text" size="30" value="<?php echo $config->user_attribute ?>" />
26 </td>
27 <td><?php print_string("auth_shib_username_description", "auth_shibboleth") ?></td>
28 </tr>
Settings.php (https://github.com/vadimonus/moodle.git) PHP · 387 lines
8 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../');
9 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
10 }
32 * @package PHPExcel_Settings
33 * @copyright Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
34 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
35 * @version ##VERSION##, ##DATE##
117 * @param string $zipClass The Zip handler class that PHPExcel should use for Zip file management
118 * e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive
119 * @return boolean Success or failure
120 */
136 * @return string Name of the Zip handler Class that PHPExcel is configured to use
137 * for Zip file management
138 * e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive
139 */
140 public static function getZipClass()
media_object.php (https://github.com/kamarulismail/kamarul-playground.git) PHP · 262 lines
Xliff.php (https://github.com/sidealice/zf2.git) PHP · 233 lines
AutoLoader.class.php (https://github.com/cj/Project-Pier.git) PHP · 300 lines
1 <?php
3 /**
27 * @var string
28 */
29 private $index_filename = 'autoloader_index.php';
31 /**
41 * @var string
42 */
43 private $scan_file_extension = 'class.php';
45 /**
83 /* Recreate the index file, if outdated */
84 if (!isset($GLOBALS[self::GLOBAL_VAR])) {
85 if ($retrying || !is_readable($this->getIndexFilename())) {
86 $this->createCache();
87 if (!is_readable($this->getIndexFilename())) {
Autoloader.php (https://gitlab.com/Erdrix/overviewCompanies) PHP · 234 lines
1 <?php
3 /**
11 {
12 if (substr($this->current(), -1 * strlen($this->_ext)) === $this->_ext) {
13 return is_readable($this->current());
14 }
130 public function addDirectory($pDirectory, $pRecursive = true)
131 {
132 if (!is_readable($pDirectory)) {
133 throw new Exception('Cannot read from [' . $pDirectory . ']');
134 }
217 $className = strtolower($pClassName);
218 if (count($this->_classes) === 0) {
219 if (is_readable($this->_cachePath . 'autoloader.php')) {
220 require $this->_cachePath . 'autoloader.php';
Size.php (https://github.com/rduenasf/ucursos-scrapper.git) PHP · 308 lines
1 <?php
2 /**
3 * Zend Framework
23 * @see Zend_Validate_Abstract
24 */
25 require_once 'Zend/Validate/Abstract.php';
27 /**
144 $min = (integer) $this->_fromByteString($min);
145 if (($this->_max !== null) && ($min > $this->_max)) {
146 require_once 'Zend/Validate/Exception.php';
147 throw new Zend_Validate_Exception("The minimum must be less than or equal to the maximum filesize, but $min >"
148 . " {$this->_max}");
180 $max = (integer) $this->_fromByteString($max);
181 if (($this->_min !== null) && ($max < $this->_min)) {
182 require_once 'Zend/Validate/Exception.php';
183 throw new Zend_Validate_Exception("The maximum must be greater than or equal to the minimum filesize, but "
184 . "$max < {$this->_min}");
Factory.php (https://gitlab.com/flyhope/Hiblog) PHP · 179 lines
Config.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 589 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
90 $this->setXml($sourceData);
91 } elseif (is_string($sourceData) && !empty($sourceData)) {
92 if (strlen($sourceData) < 1000 && is_readable($sourceData)) {
93 $this->loadFile($sourceData);
94 } else {
186 *
187 * @return boolean
188 * @SuppressWarnings(PHPMD.BooleanGetMethodName)
189 */
190 public function getCacheSaved()
570 * Destructor should be called explicitly in order to work around the PHP bug
571 * https://bugs.php.net/bug.php?id=62468
572 *
573 * @return void
Extension.php (https://github.com/rduenasf/ucursos-scrapper.git) PHP · 204 lines
Tmx.php (https://bitbucket.org/khuongduybui/openfisma.git) PHP · 233 lines
ClassPreloader.php (https://gitlab.com/ealexis.t/trends) PHP · 181 lines
17 use PhpParser\Parser;
18 use PhpParser\PrettyPrinter\Standard as PrettyPrinter;
19 use RuntimeException;
75 public function prepareOutput($output, $strict = false)
76 {
77 if ($strict && version_compare(PHP_VERSION, '7') < 1) {
78 throw new RuntimeException('Strict mode requires PHP 7 or greater.');
93 if ($strict) {
94 fwrite($handle, "<?php declare(strict_types=1);\n");
95 } else {
96 fwrite($handle, "<?php\n");
129 $pretty = $this->printer->prettyPrint($stmts);
131 if (substr($pretty, 30) === '<?php declare(strict_types=1);' || substr($pretty, 30) === "<?php\ndeclare(strict_types=1);") {
132 $pretty = substr($pretty, 32);
133 } elseif (substr($pretty, 31) === "<?php\r\ndeclare(strict_types=1);") {
tokenizer.php (https://github.com/kamarulismail/kamarul-playground.git) PHP · 261 lines
I18nLocale.class.php (https://github.com/dbernar1/Project-Pier.git) PHP · 323 lines
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";
125 return [];
126 }
127 if (is_readable($fileInfo["path"]) && ($cache = maybe_unserialize(file_get_contents($fileInfo["path"])))) {
128 return $cache;
129 }
Fileloader.php (https://github.com/quimateur/SIFO.git) PHP · 140 lines
3 * PHPUnit
4 *
5 * Copyright (c) 2002-2011, Sebastian Bergmann <sebastian@phpunit.de>.
6 * All rights reserved.
7 *
35 * POSSIBILITY OF SUCH DAMAGE.
36 *
37 * @package PHPUnit
38 * @subpackage Util
39 * @author Sebastian Bergmann <sebastian@phpunit.de>
49 * @package PHPUnit
50 * @subpackage Util
51 * @author Sebastian Bergmann <sebastian@phpunit.de>
52 * @copyright 2002-2011 Sebastian Bergmann <sebastian@phpunit.de>
125 protected static function syntaxCheck($filename)
126 {
127 $command = PHPUnit_Util_PHP::getPhpBinary();
129 if (DIRECTORY_SEPARATOR == '\\') {
ClosureCompiler.php (https://gitlab.com/flyhope/Hiblog) PHP · 139 lines
1 <?php
2 /**
3 * Class Minify_ClosureCompiler
125 throw new Minify_ClosureCompiler_Exception('Minify_ClosureCompiler : $jarFile('.self::$jarFile.') is not a valid file.');
126 }
127 if (! is_readable(self::$jarFile)) {
128 throw new Minify_ClosureCompiler_Exception('Minify_ClosureCompiler : $jarFile('.self::$jarFile.') is not readable.');
129 }
media.php (https://github.com/geekbuntu/Microweber.git) PHP · 465 lines
1 <?php
3 class Media extends Controller {
5 function __construct() {
6 parent::Controller ();
7 require_once (APPPATH . 'controllers/default_constructor.php');
8 require_once (APPPATH . 'controllers/admin/default_constructor.php');
90 $this->load->vars ( $this->template );
91 $layout = CI::view ( 'admin/media/fileUploadIframe.php', true, true );
92 //CI::library('output')->set_output ( $layout );
93 exit ( $layout );
109 $this->load->vars ( $this->template );
111 $layout = CI::view ( 'admin/media/picUploadIframe.php', true, true );
112 //CI::library('output')->set_output ( $layout );
113 exit ( $layout );
CmsException.php (https://gitlab.com/gideonmarked/yovelife) PHP · 236 lines
1 <?php namespace Cms\Classes;
3 use File;
28 100 => 'General',
29 200 => 'INI Settings',
30 300 => 'PHP Content',
31 400 => 'Twig Template'
32 ];
39 * Error 100: A general exception.
40 * Error 200: Mask the exception as INI content.
41 * Error 300: Mask the exception as PHP content.
42 * Error 400: Mask the exception as Twig content.
43 * @param \Exception $previous Previous exception.
75 case 300:
76 $result = $this->processPhp($exception);
77 break;
FileValidator.php (https://gitlab.com/Marwamimo/Crowdrise_Web) PHP · 215 lines
Runtime.php (https://gitlab.com/ealexis.t/trends) PHP · 192 lines
23 /**
24 * Returns true when Xdebug is supported or
25 * the runtime used is PHPDBG (PHP >= 7.0).
26 *
27 * @return bool
74 if (self::$binary === null) {
75 $possibleBinaryLocations = array(
76 PHP_BINDIR . '/php',
77 PHP_BINDIR . '/php-cli.exe',
183 * Returns true when the runtime used is PHP with the PHPDBG SAPI
184 * and the phpdbg_*_oplog() functions are available (PHP >= 7.0).
185 *
186 * @return bool
188 public function hasPHPDBGCodeCoverage()
189 {
190 return $this->isPHPDBG() && function_exists('phpdbg_start_oplog');
191 }
192 }
restore_cc.php (https://bitbucket.org/kudutest1/moodlegit.git) PHP · 141 lines
1 <?php
2 // This file is part of Moodle - http://moodle.org/
3 //
22 defined('MOODLE_INTERNAL') or die('Direct access to this script is forbidden.');
24 require_once($CFG->dirroot . '/backup/cc/includes/constants.php');
25 require_once($CFG->dirroot . '/backup/cc/cc2moodle.php');
31 $schema_file = 'cc' . DIRECTORY_SEPARATOR . '' . DIRECTORY_SEPARATOR . 'schemas' . DIRECTORY_SEPARATOR . 'cclibxml2validator.xsd';
33 if (is_readable($manifest_file) && !is_readable($moodle_file)) {
35 $is_cc = detect_cc_format($manifest_file);
39 $detected_requirements = detect_requirements();
41 if (!$detected_requirements["php5"]) {
42 notify(get_string('cc_import_req_php5', 'imscc'));
FileValidator.php (https://bitbucket.org/prauscher/att.git) PHP · 158 lines
PodsComponents.php (https://gitlab.com/najomie/ljm) PHP · 667 lines
1 <?php
2 /**
3 * Component managing class
328 if ( '.' == substr( $subfile, 0, 1 ) )
329 continue;
330 elseif ( '.php' == substr( $subfile, -4 ) )
331 $component_files[] = str_replace( '\\', '/', $file . '/' . $subfile );
332 }
335 }
336 }
337 elseif ( '.php' == substr( $file, -4 ) )
338 $component_files[] = $file;
339 }
383 $component = $this->components_dir . $component_file;
385 if ( !is_readable( $component ) )
386 continue;
FieldDefinitionIntegrityTest.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 191 lines
Payment.php (https://bitbucket.org/AntonTyutin/pretty-simpla.git) PHP · 149 lines
ysfApplicationConfiguration.class.php (https://github.com/remialvado/ysfDimensionPlugin.git) PHP · 618 lines
1 <?php
3 /**
18 * @author Dustin Whittle <dustin.whittle@symfony-project.com>
19 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
20 * @version SVN: $Id: sfApplicationConfiguration.class.php 7618 2008-02-27 00:02:41Z dwhittle $
21 */
22 abstract class ysfApplicationConfiguration extends sfApplicationConfiguration
70 $dirs = array();
72 if (is_readable(sfConfig::get('sf_app_module_dir').'/'.$moduleName.'/actions'))
73 {
74 foreach ($dimensions as $dimension)
75 {
76 if(is_readable(sfConfig::get('sf_app_module_dir').'/'.$moduleName.'/actions/'.$dimension))
77 {
78 $dirs[sfConfig::get('sf_app_module_dir').'/'.$moduleName.'/actions/'.$dimension] = false;
function.html_image.php (https://github.com/raphaelbastide/berta.git) PHP · 139 lines
1 <?php
2 /**
3 * Smarty plugin
17 * Output: <img src="/images/masthead.gif" width=400 height=23>
18 *
19 * @link http://smarty.php.net/manual/en/language.function.html.image.php {html_image}
20 (Smarty online manual)
21 * @author Monte Ohrt <monte at ohrt dot com>
37 function smarty_function_html_image($params, $smarty, $template)
38 {
39 require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');
40 //$smarty->loadPlugin('Smarty_shared_escape_special_chars');
101 trigger_error("html_image: unable to find '$_image_path'", E_USER_NOTICE);
102 return;
103 } else if (!is_readable($_image_path)) {
104 trigger_error("html_image: unable to read '$_image_path'", E_USER_NOTICE);
105 return;
Qt.php (https://github.com/MontmereLimited/ZendFramework-v1.git) PHP · 160 lines
1 <?php
2 /**
3 * Zend Framework
16 * @package Zend_Translate
17 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
18 * @version $Id: Qt.php 23775 2011-03-01 17:25:24Z ralph $
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 */
23 /** Zend_Locale */
24 // // // // // // // // require_once 'Zend/Locale.php';
26 /** Zend_Translate_Adapter */
27 // // // // // // // // require_once 'Zend/Translate/Adapter.php';
axModuleManager.class.php (https://github.com/bdelespierre/php-axiom.git) PHP · 271 lines
1 <?php
2 /**
3 * @brief Module manager class file
4 * @file axModuleManager.class.php
5 */
21 * @var string
22 */
23 const CACHE_FILE = "module.cache.php";
25 /**
79 public function getModules () {
80 if (empty($this->_modules)) {
81 if ($this->_options['cache_dir'] && is_readable($c = $this->_options['cache_dir'] . '/' . self::CACHE_FILE)) {
82 require $c;
83 $this->_modules = $modules;
class-wp-filesystem-ftpsockets.php (https://gitlab.com/endomorphosis/reservationtelco) PHP · 327 lines
1 <?php
2 /**
3 * WordPress FTP Sockets Filesystem.
26 //Check if possible to use ftp functions.
27 if ( ! @include_once ABSPATH . 'wp-admin/includes/class-ftp.php' )
28 return false;
29 $this->ftp = new ftp();
241 }
243 function is_readable($file) {
244 //Get dir list, Check if the file is writable by the current user??
245 return true;
ConfigData.php (https://gitlab.com/juanito.abelo/nlmobile) PHP · 176 lines
1 <?php
3 /**
21 /*
22 * Maps http key to options key.
23 * Fixes problem when php replaces 'my.super_option' to 'my_super_option'
24 * <http name> => <config name>
25 *
117 static function get_array_from_file($filename, $unserialize = false) {
119 if (file_exists($filename) && is_readable($filename)) {
120 // include errors not hidden by @ since they still terminate
121 // process (code not functional), but hides reason why
166 */
167 function write($filename, $serialize = false) {
168 w3_require_once(W3TC_INC_DIR . '/functions/file.php');
169 if ($serialize) {
170 $config = '<?php exit;?>' . serialize($this->data);
reconcile_files.class.php (https://github.com/sbourget/moodle.git) PHP · 124 lines
1 <?php
2 // This file is part of Moodle - https://moodle.org/
3 //
63 // Add link back to home.
64 $b = ' <p class="centerpara">';
65 $b .= ' <a href="index.php?action=main_view#lastused">[' . $this->str['backtomainview'] . ']</a>';
66 $b .= '</p>';
67 $this->output .= $b;
78 foreach ($XMLDB->dbdirs as $key => $dbdir) {
79 // Verify it exists.
80 if (!file_exists($key . '/install.xml') && !is_readable($key . '/install.xml')) {
81 continue;
82 }
Filesystem.php (https://github.com/outlawscumbag/symfony.git) PHP · 248 lines
File.class.php (https://bitbucket.org/stk2k/charcoalphp2.1.git) PHP · 446 lines
templateedit.php (https://github.com/Yannix/ezpublish.git) PHP · 237 lines
1 <?php
2 /**
3 * @copyright Copyright (C) 1999-2012 eZ Systems AS. All rights reserved.
173 $fileName = $template;
175 if ( !is_readable( $fileName ) )
176 {
177 $tpl->setVariable( 'template', $template );
178 $tpl->setVariable( 'template_exists', true );
179 $tpl->setVariable( 'original_template', $originalTemplate );
180 $tpl->setVariable( 'is_readable', false );
181 $tpl->setVariable( 'site_access', $siteAccess );
196 $tpl->setVariable( 'template_exists', true );
197 $tpl->setVariable( 'original_template', $originalTemplate );
198 $tpl->setVariable( 'is_readable', true );
199 $tpl->setVariable( 'site_access', $siteAccess );
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 */
112 }
114 if ($this->_isReadableMode($mode) && (!is_file($this->_filePath) || !is_readable($this->_filePath))) {
115 if (!is_file($this->_filePath)) {
116 throw new Mage_Exception('File ' . $this->_filePath . ' does not exist');
IniFileTask.php (https://gitlab.com/Isaki/le331.fr) PHP · 355 lines
1 <?php
2 /**
3 * INI file modification task for Phing, the PHP build tool.
5 * Based on http://ant-contrib.sourceforge.net/tasks/tasks/inifile.html
6 *
7 * PHP version 5
8 *
9 * @category Tasks
10 * @package phing.tasks.ext
11 * @author Ken Guest <kguest@php.net>
12 * @license LGPL v3 or later http://www.gnu.org/licenses/lgpl.html
13 * @link http://www.phing.info/
14 */
16 require_once 'IniFileSet.php';
17 require_once 'IniFileRemove.php';
XmlTm.php (https://github.com/kiranatama/sagalaya.git) PHP · 136 lines
Filesystem.php (https://github.com/viggof/moodle.git) PHP · 222 lines
1 <?php
2 /**
3 * Zend Framework
23 /** Zend_Search_Lucene_Storage_File */
24 require_once 'Zend/Search/Lucene/Storage/File.php';
26 /** Zend_Search_Lucene_Exception */
27 require_once 'Zend/Search/Lucene/Exception.php';
53 public function __construct($filename, $mode='r+b')
54 {
55 global $php_errormsg;
57 if (strpos($mode, 'w') === false && !is_readable($filename)) {