100+ results for 'php class_exists'
Not the results you expected?
ValidatorBuilder.php (https://bitbucket.org/prauscher/att.git) PHP · 296 lines
1 <?php
3 /*
190 if (null === $annotationReader) {
191 if (!class_exists('Doctrine\Common\Annotations\AnnotationReader')) {
192 throw new \RuntimeException('Requested a ValidatorFactory with an AnnotationLoader, but the AnnotationReader was not found. You should add Doctrine Common to your project.');
193 }
X25519.php (https://gitlab.com/VTTE/sitios-vtte) PHP · 345 lines
FileValidatorTest.php (https://github.com/Yrwein/symfony.git) PHP · 324 lines
1 <?php
3 /*
17 use Symfony\Component\HttpFoundation\File\UploadedFile;
19 abstract class FileValidatorTest extends \PHPUnit_Framework_TestCase
20 {
21 protected $context;
26 protected function setUp()
27 {
28 if (!class_exists('Symfony\Component\HttpFoundation\File\UploadedFile')) {
29 $this->markTestSkipped('The "HttpFoundation" component is not available');
30 }
314 );
316 if (class_exists('Symfony\Component\HttpFoundation\File\UploadedFile')) {
317 $tests[] = array(UPLOAD_ERR_INI_SIZE, 'uploadIniSizeErrorMessage', array('{{ limit }}' => UploadedFile::getMaxFilesize() . ' bytes'));
318 }
Validate.php (https://bitbucket.org/sauron07/friend_social.git) PHP · 290 lines
1 <?php
2 /**
3 * Zend Framework
17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id: Validate.php 24594 2012-01-05 21:27:01Z matthew $
20 */
23 * @see Zend_Validate_Interface
24 */
25 //require_once 'Zend/Validate/Interface.php';
27 /**
198 $className = ucfirst($classBaseName);
199 try {
200 if (!class_exists($className, false)) {
201 //require_once 'Zend/Loader.php';
Netdna.php (https://gitlab.com/juanito.abelo/nlmobile) PHP · 282 lines
1 <?php
3 /**
8 }
10 w3_require_once(W3TC_LIB_W3_DIR . '/Cdn/Mirror.php');
12 define('W3TC_CDN_NETDNA_URL', 'netdna-cdn.com');
17 class W3_Cdn_Mirror_Netdna extends W3_Cdn_Mirror {
18 /**
19 * PHP5 Constructor
20 *
21 * @param array $config
58 if (!class_exists('NetDNA')) {
59 w3_require_once(W3TC_LIB_NETDNA_DIR . '/NetDNA.php');
Validate.php (https://github.com/timglabisch/pimcore.git) PHP · 290 lines
1 <?php
2 /**
3 * Zend Framework
17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id: Validate.php 24593 2012-01-05 20:35:02Z matthew $
20 */
23 * @see Zend_Validate_Interface
24 */
25 // require_once 'Zend/Validate/Interface.php';
27 /**
198 $className = ucfirst($classBaseName);
199 try {
200 if (!class_exists($className, false)) {
201 // require_once 'Zend/Loader.php';
sqlvalidator.class.php (https://bitbucket.org/graaaf/garant.git) PHP · 439 lines
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * PHP interface to MimerSQL Validator
5 *
6 * Copyright 2002, 2003 Robin Johnson <robbat2@users.sourceforge.net>
8 *
9 * All data is transported over HTTP-SOAP
10 * And uses either the PEAR SOAP Module or PHP SOAP extension
11 *
12 * Install instructions for PEAR SOAP:
13 * Make sure you have a really recent PHP with PEAR support
14 * run this: "pear install Mail_Mime Net_DIME SOAP"
15 *
RouteCollectionTest.php (https://github.com/societies/SOCIETIES-Platform.git) PHP · 291 lines
1 <?php
3 /*
16 use Symfony\Component\Config\Resource\FileResource;
18 class RouteCollectionTest extends \PHPUnit_Framework_TestCase
19 {
20 public function testRoute()
104 public function testAddCollection()
105 {
106 if (!class_exists('Symfony\Component\Config\Resource\FileResource')) {
107 $this->markTestSkipped('The "Config" component is not available');
108 }
187 public function testResource()
188 {
189 if (!class_exists('Symfony\Component\Config\Resource\FileResource')) {
190 $this->markTestSkipped('The "Config" component is not available');
191 }
systematics-sp.inc.php (https://gitlab.com/Gashler/dp) PHP · 135 lines
1 <?php
2 /**
3 * Systematics *(for a specific page)*.
18 exit("Do not access this file directly.");
20 if (!class_exists ("c_ws_plugin__s2member_systematics_sp"))
21 {
22 /**
43 $uri = ($uri && is_string ($uri) && ($uri = c_ws_plugin__s2member_utils_urls::parse_uri ($uri))) ? $uri : false;
45 if ($uri && ($_q = c_ws_plugin__s2member_utils_urls::parse_url ($uri, PHP_URL_QUERY)) && preg_match ("/[\?&]s2member/", $_q) && c_ws_plugin__s2member_utils_conds::is_site_root ($uri))
46 {
47 return ($is_s2_systematic = apply_filters ("ws_plugin__s2member_is_s2_systematic_use_specific_page", true, get_defined_vars ()));
69 return ($is_wp_systematic = apply_filters ("ws_plugin__s2member_is_wp_systematic_use_specific_page", true, get_defined_vars ()));
70 }
71 else if ($uri && preg_match ("/^\/(?:wp-.+?|xmlrpc)\.php$/", c_ws_plugin__s2member_utils_urls::parse_url ($uri, PHP_URL_PATH)))
72 {
73 return ($is_wp_systematic = apply_filters ("ws_plugin__s2member_is_wp_systematic_use_specific_page", true, get_defined_vars ()));
FunctionCommentThrowTagSniff.php (https://bitbucket.org/lordgnu/php_codesniffer.git) PHP · 215 lines
16 */
18 if (class_exists('PHP_CodeSniffer_Standards_AbstractScopeSniff', true) === false) {
19 $error = 'Class PHP_CodeSniffer_Standards_AbstractScopeSniff not found';
52 * Processes the function tokens within the class.
53 *
54 * @param PHP_CodeSniffer_File $phpcsFile The file where this token was found.
55 * @param int $stackPtr The position where the token was found.
56 * @param int $currScope The current scope opener token.
58 * @return void
59 */
60 protected function processTokenWithinScope(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $currScope)
61 {
62 // Is this the first throw token within the current function scope?
93 try {
94 $this->commentParser = new PHP_CodeSniffer_CommentParser_FunctionCommentParser($comment, $phpcsFile);
95 $this->commentParser->parse();
96 } catch (PHP_CodeSniffer_CommentParser_ParserException $e) {
Factory.php (https://github.com/kiranatama/sagalaya.git) PHP · 297 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
112 if (isset($inputSpecification['type'])) {
113 $class = $inputSpecification['type'];
114 if (!class_exists($class)) {
115 throw new Exception\RuntimeException(sprintf(
116 'Input factory expects the "type" to be a valid class; received "%s"',
208 if (isset($inputFilterSpecification['type'])) {
209 $class = $inputFilterSpecification['type'];
210 if (!class_exists($class)) {
211 throw new Exception\RuntimeException(sprintf(
212 'Input factory expects the "type" to be a valid class; received "%s"',
DbStatement.php (https://bitbucket.org/Ebozavrik/test-application.git) PHP · 426 lines
1 <?php
2 /**
3 * Zend Framework
15 * @category Zend
16 * @package Zend_Test
17 * @subpackage PHPUnit
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: DbStatement.php 25024 2012-07-30 15:08:15Z rob $
21 */
24 * @see Zend_Db_Statement_Interface
25 */
26 require_once "Zend/Db/Statement/Interface.php";
28 /**
Pptx.php (https://github.com/kervin/kyzstudio.git) PHP · 200 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: Pptx.php 20096 2010-01-06 02:05:09Z bkarwin $
21 */
24 /** Zend_Search_Lucene_Document_OpenXml */
25 #require_once 'Zend/Search/Lucene/Document/OpenXml.php';
27 /**
73 private function __construct($fileName, $storeContent)
74 {
75 if (!class_exists('ZipArchive', false)) {
76 #require_once 'Zend/Search/Lucene/Exception.php';
Input.php (https://gitlab.com/dleonov/my-framework-two) PHP · 419 lines
Barcode.php (https://gitlab.com/devtoannh/cafe) PHP · 352 lines
1 <?php
2 /**
3 * Zend Framework
17 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id: Barcode.php 23775 2011-03-01 17:25:24Z ralph $
20 */
140 * @see Zend_Barcode_Exception
141 */
142 require_once 'Zend/Barcode/Exception.php';
143 throw new Zend_Barcode_Exception(
144 'Barcode parameters must be in an array or a Zend_Config object'
153 * @see Zend_Barcode_Exception
154 */
155 require_once 'Zend/Barcode/Exception.php';
156 throw new Zend_Barcode_Exception(
157 'Barcode name must be specified in a string'
AclManager.php (https://gitlab.com/johanlindberg/irvato-crm) PHP · 239 lines
1 <?php
2 /************************************************************************
3 * This file is part of EspoCRM.
71 $className = '\\Espo\\Custom\\Acl\\' . $normalizedName;
72 if (!class_exists($className)) {
73 $moduleName = $this->metadata->getScopeModuleName($scope);
74 if ($moduleName) {
77 $className = '\\Espo\\Acl\\' . $normalizedName;
78 }
79 if (!class_exists($className)) {
80 $className = '\\Espo\\Core\\Acl\\Base';
81 }
82 }
84 if (class_exists($className)) {
85 $acl = new $className($scope);
86 $dependencies = $acl->getDependencyList();
Mongodb.php (https://github.com/back2arie/Panada.git) PHP · 338 lines
class.wpcom-json-api-sharing-buttons-endpoint.php (https://gitlab.com/juanito.abelo/nlmobile) PHP · 385 lines
1 <?php
3 abstract class WPCOM_JSON_API_Sharing_Button_Endpoint extends WPCOM_JSON_API_Endpoint {
12 if ( ! current_user_can( 'manage_options' ) ) {
13 return new WP_Error( 'forbidden', 'You do not have the capability to manage sharing buttons for this site', 403 );
14 } else if ( ! class_exists( 'Sharing_Service' ) || ! class_exists( 'Sharing_Source' ) ||
15 ( method_exists( 'Jetpack', 'is_module_active' ) && ! Jetpack::is_module_active( 'sharedaddy' ) ) ) {
16 return new WP_Error( 'missing_jetpack_module', 'The Sharing module must be activated in order to use this endpoint', 400 );
ValidClassNamePass.php (https://gitlab.com/judielsm/Handora) PHP · 323 lines
1 <?php
3 /*
12 namespace Psy\CodeCleaner;
14 use PhpParser\Node;
15 use PhpParser\Node\Expr;
16 use PhpParser\Node\Expr\ClassConstFetch;
17 use PhpParser\Node\Expr\New_ as NewExpr;
18 use PhpParser\Node\Expr\StaticCall;
19 use PhpParser\Node\Stmt;
20 use PhpParser\Node\Stmt\Class_ as ClassStmt;
21 use PhpParser\Node\Stmt\Interface_ as InterfaceStmt;
class_image_gmagick.php (https://gitlab.com/ptisky/API_prestashop) PHP · 325 lines
Storage.php (https://github.com/jmarien/phpBayeux.git) PHP · 316 lines
DbStatement.php (https://github.com/grandison/budo16.git) PHP · 381 lines
1 <?php
2 /**
3 * Zend Framework
15 * @category Zend
16 * @package Test
17 * @subpackage PHPUnit
18 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: DbStatement.php 16911 2009-07-21 11:54:03Z matthew $
21 */
23 // require_once "Zend/Db/Statement/Interface.php";
25 /**
Validate.php (https://github.com/eryx/labs.git) PHP · 290 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: Validate.php 21340 2010-03-05 15:33:49Z thomas $
20 */
23 * @see Zend_Validate_Interface
24 */
25 // require_once 'Zend/Validate/Interface.php';
27 /**
198 $className = ucfirst($classBaseName);
199 try {
200 if (!class_exists($className, false)) {
201 // require_once 'Zend/Loader.php';
Assert.class.php (https://github.com/bassta/onphp-framework.git) PHP · 325 lines
1 <?php
2 /***************************************************************************
3 * Copyright (C) 2005-2008 by Konstantin V. Arkhipov *
259 public static function classExists($className, $message = null)
260 {
261 if (!class_exists($className, true))
262 throw new WrongArgumentException(
263 $message.', class "'.$className.'" does not exists'
Barcode.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 352 lines
1 <?php
2 /**
3 * Zend Framework
140 * @see Zend_Barcode_Exception
141 */
142 #require_once 'Zend/Barcode/Exception.php';
143 throw new Zend_Barcode_Exception(
144 'Barcode parameters must be in an array or a Zend_Config object'
153 * @see Zend_Barcode_Exception
154 */
155 #require_once 'Zend/Barcode/Exception.php';
156 throw new Zend_Barcode_Exception(
157 'Barcode name must be specified in a string'
175 * if the specified class cannot be loaded.
176 */
177 if (!class_exists($barcodeName)) {
178 #require_once 'Zend/Loader.php';
JUnit.php (https://gitlab.com/Georgiy.Zhegusov/museum_documents) PHP · 458 lines
16 * @since Class available since Release 2.1.0
17 */
18 class PHPUnit_Util_Log_JUnit extends PHPUnit_Util_Printer implements PHPUnit_Framework_TestListener
19 {
20 /**
136 * @since Method available since Release 5.1.0
137 */
138 public function addWarning(PHPUnit_Framework_Test $test, PHPUnit_Framework_Warning $e, $time)
139 {
140 $this->doAddFault($test, $e, $time, 'warning');
149 * @param float $time
150 */
151 public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time)
152 {
153 $this->doAddFault($test, $e, $time, 'failure');
streams.php (https://gitlab.com/campus-academy/krowkaramel) PHP · 357 lines
20 public function __construct() {
21 if ( function_exists( 'mb_substr' )
22 && ( (int) ini_get( 'mbstring.func_overload' ) & 2 ) // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated
23 ) {
24 $this->is_overloaded = true;
163 /**
164 * PHP4 constructor.
165 *
166 * @deprecated 5.4.0 Use __construct() instead.
238 /**
239 * PHP5 constructor.
240 */
241 public function __construct( $str = '' ) {
class_image_imagick.php (https://gitlab.com/ptisky/API_prestashop) PHP · 328 lines
HtmlLorem.php (https://gitlab.com/madwanz64/laravel) PHP · 307 lines
Pptx.php (https://github.com/Martin1982/IBMessagingWorkshopServer.git) PHP · 200 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: Pptx.php 20096 2010-01-06 02:05:09Z bkarwin $
21 */
24 /** Zend_Search_Lucene_Document_OpenXml */
25 // require_once 'Zend/Search/Lucene/Document/OpenXml.php';
27 /**
73 private function __construct($fileName, $storeContent)
74 {
75 if (!class_exists('ZipArchive', false)) {
76 // require_once 'Zend/Search/Lucene/Exception.php';
block.php (https://github.com/jasonweng/forkcms.git) PHP · 537 lines
1 <?php
3 /*
105 // require the config file, we know it is there because we validated it before (possible actions are defined by existance off the file).
106 require_once FRONTEND_MODULES_PATH . '/' . $this->getModule() . '/actions/' . $this->getAction() . '.php';
108 // validate if class exists (aka has correct name)
109 if(!class_exists($actionClassName)) throw new FrontendException('The actionfile is present, but the classname should be: ' . $actionClassName . '.');
111 // create action-object
255 // check if the config is present? If it isn't present there is a huge problem, so we will stop our code by throwing an error
256 if(!SpoonFile::exists($frontendModulePath . '/config.php')) throw new FrontendException('The configfile for the module (' . $this->getModule() . ') can\'t be found.');
258 // build config-object-name
ChaCha20.php (https://gitlab.com/VTTE/sitios-vtte) PHP · 400 lines
test-kirki.php (https://gitlab.com/aristath/mdl) PHP · 320 lines
Base.php (https://github.com/finger2000/horde.git) PHP · 325 lines
1 <?php
2 /**
3 * Adds a set of uncached queries to the list handlers.
4 *
5 * PHP version 5
6 *
7 * @category Kolab
9 * @author Gunnar Wrobel <wrobel@pardus.de>
10 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
11 * @link http://pear.horde.org/index.php?package=Kolab_Storage
12 */
24 * @author Gunnar Wrobel <wrobel@pardus.de>
25 * @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
26 * @link http://pear.horde.org/index.php?package=Kolab_Storage
27 */
28 abstract class Horde_Kolab_Storage_QuerySet_Base
Abstract.php (https://bitbucket.org/Sinfin/pawtucket.git) PHP · 424 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: Abstract.php 22616 2010-07-17 15:53:16Z ramon $
21 */
112 $this->_rowClass = $config['rowClass'];
113 }
114 if (!class_exists($this->_rowClass)) {
115 require_once 'Zend/Loader.php';
222 /**
223 * Rewind the Iterator to the first element.
224 * Similar to the reset() function for arrays in PHP.
225 * Required by interface Iterator.
226 *
wrapper.php (https://gitlab.com/webkod3r/tripolis) PHP · 213 lines
Pptx.php (https://bitbucket.org/haichau59/manga.git) PHP · 200 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: Pptx.php 24594 2012-01-05 21:27:01Z matthew $
21 */
24 /** Zend_Search_Lucene_Document_OpenXml */
25 //require_once 'Zend/Search/Lucene/Document/OpenXml.php';
27 /**
73 private function __construct($fileName, $storeContent)
74 {
75 if (!class_exists('ZipArchive', false)) {
76 //require_once 'Zend/Search/Lucene/Exception.php';
Db.php (https://gitlab.com/juanito.abelo/nlmobile) PHP · 496 lines
ezmark.php (https://github.com/GunioRobot/ezpublish.git) PHP · 301 lines
1 #!/usr/bin/env php
2 <?php
237 {
238 $markPath = 'benchmarks/' . $markName;
239 $markDefinitionPath = $markPath . '/benchmark.php';
240 if ( file_exists( $markDefinitionPath ) )
241 {
254 $markTestClass = $markDefinition['class'];
255 $markTestName = $markDefinition['name'];
256 if ( class_exists( $markTestClass ) )
257 {
258 $markTest = new $markTestClass( $markTestName );
sqlite_3.class.php (https://bitbucket.org/webinfopro/sqlitemanager.git) PHP · 311 lines
1 <?php
2 if( !defined('PDO_ATTR_TIMEOUT') ) define('PDO_ATTR_TIMEOUT', PDO::ATTR_TIMEOUT);
3 if( !defined('PDO_FETCH_ASSOC') ) define('PDO_FETCH_ASSOC', PDO::FETCH_ASSOC);
27 }
28 parent::__construct($dbPath);
29 if(class_exists('PDO') && $this->connect($dbPath)) {
30 return $this->connId;
31 } else {
ext_std_classobj.php (https://gitlab.com/Blueprint-Marketing/hhvm) PHP · 275 lines
1 <?hh
2 // @generated by docskel.php
4 /**
58 */
59 <<__Native>>
60 function class_exists(string $class_name,
61 bool $autoload = true): bool;
122 * @return array - Returns an array of the names of the declared classes
123 * in the current script. Note that depending on what extensions you
124 * have compiled or loaded into PHP, additional classes could be present.
125 * This means that you will not be able to define your own classes using
126 * these names. There is a list of predefined classes in the Predefined
class-Shoestrap_Color.php (https://gitlab.com/aristath/shoestrap-3) PHP · 481 lines
MessageCatalogueTest.php (https://bitbucket.org/laborautonomo/laborautonomo-site.git) PHP · 212 lines
1 <?php
3 /*
14 use Symfony\Component\Translation\MessageCatalogue;
16 class MessageCatalogueTest extends \PHPUnit_Framework_TestCase
17 {
18 public function testGetLocale()
83 public function testAddCatalogue()
84 {
85 if (!class_exists('Symfony\Component\Config\Loader\Loader')) {
86 $this->markTestSkipped('The "Config" component is not available');
87 }
109 public function testAddFallbackCatalogue()
110 {
111 if (!class_exists('Symfony\Component\Config\Loader\Loader')) {
112 $this->markTestSkipped('The "Config" component is not available');
113 }
toolbar.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 302 lines
1 <?php
2 /**
3 * @package Joomla.Libraries
213 }
215 if (!class_exists('JToolbarButton'))
216 {
217 JLog::add(JText::_('JLIB_HTML_BUTTON_BASE_CLASS'), JLog::WARNING, 'jerror');
223 // @deprecated 12.3 Remove the acceptance of legacy classes starting with JButton.
224 $buttonClassOld = 'JButton' . ucfirst($type);
225 if (!class_exists($buttonClass))
226 {
227 if (!class_exists($buttonClassOld))
251 }
253 if (!class_exists($buttonClass) && !class_exists($buttonClassOld))
254 {
255 // @todo remove code: return JError::raiseError('SOME_ERROR_CODE', "Module file $buttonFile does not contain class $buttonClass.");
Pptx.php (https://bitbucket.org/Ebozavrik/test-application.git) PHP · 200 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: Pptx.php 24593 2012-01-05 20:35:02Z matthew $
21 */
24 /** Zend_Search_Lucene_Document_OpenXml */
25 require_once 'Zend/Search/Lucene/Document/OpenXml.php';
27 /**
74 private function __construct ($fileName, $storeContent)
75 {
76 if (!class_exists('ZipArchive', false)) {
77 require_once 'Zend/Search/Lucene/Exception.php';
ClassRegistry.php (https://github.com/masihnewbie/cakephp.git) PHP · 341 lines
1 <?php
2 /**
3 * Class collections.
7 * PHP 5
8 *
9 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
10 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
11 *
14 *
15 * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
16 * @link http://cakephp.org CakePHP(tm) Project
17 * @package Cake.Utility
18 * @since CakePHP(tm) v 0.9.2
19 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
20 */
exceptions.php (https://github.com/masihnewbie/cakephp.git) PHP · 449 lines
1 <?php
2 /**
3 * Exceptions file. Contains the various exceptions CakePHP will throw until they are
6 * PHP 5
7 *
8 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
9 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
10 *
13 *
14 * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
15 * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests
16 * @package Cake.Error
17 * @since CakePHP(tm) v 2.0
18 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
19 */
reflection_php5.php (https://github.com/limb-php-framework/limb-app-buildman.git) PHP · 275 lines
1 <?php
2 /**
3 * base include file for SimpleTest
4 * @package SimpleTest
5 * @subpackage UnitTester
6 * @version $Id: reflection_php5.php 4378 2006-10-27 10:04:53Z pachanga $
7 */
26 /**
27 * Checks that a class has been declared. Versions
28 * before PHP5.0.2 need a check that it's not really
29 * an interface.
30 * @return boolean True if defined.
32 */
33 function classExists() {
34 if (! class_exists($this->_interface)) {
35 return false;
36 }
db_helper.php (https://github.com/mrbmc/erector.git) PHP · 338 lines
1 <?php
2 /**
3 * This file houses the MpmDbHelper class.
4 *
5 * @package mysql_php_migrations
6 * @subpackage Helpers
7 * @license http://www.opensource.org/licenses/bsd-license.php The New BSD License
8 * @link http://code.google.com/p/mysql-php-migrations/
9 */
12 * The MpmDbHelper class is used to fetch database objects (PDO or Mysqli right now) and perform basic database actions.
13 *
14 * @package mysql_php_migrations
15 * @subpackage Helpers
16 */
PhpDocExtractor.php (https://github.com/deviantintegral/symfony.git) PHP · 231 lines
14 use phpDocumentor\Reflection\DocBlock;
15 use phpDocumentor\Reflection\DocBlockFactory;
16 use phpDocumentor\Reflection\DocBlockFactoryInterface;
17 use phpDocumentor\Reflection\Types\ContextFactory;
18 use Symfony\Component\PropertyInfo\PropertyDescriptionExtractorInterface;
19 use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface;
23 /**
24 * Extracts data using a PHPDoc parser.
25 *
26 * @author Kévin Dunglas <dunglas@gmail.com>
60 $this->docBlockFactory = $docBlockFactory ?: DocBlockFactory::createInstance();
61 $this->contextFactory = new ContextFactory();
62 $this->phpDocTypeHelper = new PhpDocTypeHelper();
63 $this->mutatorPrefixes = null !== $mutatorPrefixes ? $mutatorPrefixes : ReflectionExtractor::$defaultMutatorPrefixes;
64 $this->accessorPrefixes = null !== $accessorPrefixes ? $accessorPrefixes : ReflectionExtractor::$defaultAccessorPrefixes;
CurrencyServerWebService.php (https://github.com/pedrocadena/Prueba.git) PHP · 447 lines
aq_resizer.class.php (https://gitlab.com/rubengrb/ws.vidrialum) PHP · 214 lines
reflection_php5.php (https://github.com/viggof/moodle.git) PHP · 380 lines
1 <?php
2 /**
3 * base include file for SimpleTest
26 /**
27 * Checks that a class has been declared. Versions
28 * before PHP5.0.2 need a check that it's not really
29 * an interface.
30 * @return boolean True if defined.
32 */
33 function classExists() {
34 if (! class_exists($this->_interface)) {
35 return false;
36 }
41 /**
42 * Needed to kill the autoload feature in PHP5
43 * for classes created dynamically.
44 * @return boolean True if defined.
update_course.php (https://github.com/markn86/moodle.git) PHP · 152 lines
1 <?php
2 // This file is part of Moodle - http://moodle.org/
3 //
21 global $CFG;
22 require_once($CFG->libdir . '/externallib.php');
24 use external_api;
94 global $CFG;
96 require_once($CFG->dirroot . '/course/lib.php');
98 $params = external_api::validate_parameters(self::execute_parameters(), [
116 $defaultupdatesclass = 'core_courseformat\\stateupdates';
117 $updatesclass = 'format_' . $courseformat->get_format() . '\\courseformat\\stateupdates';
118 if (!class_exists($updatesclass)) {
119 $updatesclass = $defaultupdatesclass;
120 }
ResizeFormListenerTest.php (https://github.com/nattaphat/hgis.git) PHP · 255 lines
1 <?php
3 /*
16 use Symfony\Component\Form\FormEvent;
18 class ResizeFormListenerTest extends \PHPUnit_Framework_TestCase
19 {
20 private $dispatcher;
24 protected function setUp()
25 {
26 if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
27 $this->markTestSkipped('The "EventDispatcher" component is not available');
28 }
55 /**
56 * @return \PHPUnit_Framework_MockObject_MockObject
57 */
58 private function getDataMapper()
AbstractEvent.php (https://github.com/joomla/joomla-cms.git) PHP · 178 lines
1 <?php
3 /**
68 * the onTableBeforeLoad event name.
69 */
70 if (empty($eventClassName) || !class_exists($eventClassName, true)) {
71 $bareName = strpos($eventName, 'on') === 0 ? substr($eventName, 2) : $eventName;
72 $parts = Normalise::fromCamelCase($bareName, true);
83 // Create and return the event object
84 if (class_exists($eventClassName, true)) {
85 return new $eventClassName($eventName, $arguments);
86 }
Pptx.php (https://github.com/tedkulp/cmsmadesimple-2-0.git) PHP · 200 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: Pptx.php 19631 2009-12-14 11:43:11Z alexander $
21 */
24 /** Zend_Search_Lucene_Document_OpenXml */
25 require_once 'Zend/Search/Lucene/Document/OpenXml.php';
27 /**
73 private function __construct($fileName, $storeContent)
74 {
75 if (!class_exists('ZipArchive', false)) {
76 require_once 'Zend/Search/Lucene/Exception.php';
generator.php (https://github.com/Hywan/atoum.git) PHP · 297 lines
1 <?php
3 namespace mageekguy\atoum\test;
174 {
175 $this->testedClassPathExtractor = $extractor ?: function ($generator, $fullyQualifiedTestedClassName) {
176 return $generator->getTestedClassesDirectory() . substr(str_replace('\\', DIRECTORY_SEPARATOR, $fullyQualifiedTestedClassName), strlen($generator->getTestedClassNamespace())) . '.php';
177 };
221 $fullyQualifiedTestClassName = call_user_func_array($this->fullyQualifiedTestClassNameExtractor, [$this, $realTestClassRelativePath]);
223 $testClassTemplate = $this->templateParser->parseFile($this->templatesDirectory . DIRECTORY_SEPARATOR . 'testClass.php');
225 $testClassTemplate->fullyQualifiedTestClassName = $fullyQualifiedTestClassName;
237 $fullyQualifiedTestedClassName = call_user_func_array($this->fullyQualifiedTestedClassNameExtractor, [$this, $fullyQualifiedTestClassName]);
239 if ($this->adapter->class_exists($fullyQualifiedTestedClassName) === false) {
240 $testClassTemplate->testMethods->testMethod->methodName = '__construct';
241 $testClassTemplate->testMethods->testMethod->methodName->build();
autoloader.php (https://github.com/Keilaron/TweetBeagle.git) PHP · 324 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 */
221 elseif ( ! $namespaced and $class_name = static::is_core_class($class))
222 {
223 ! class_exists($class_name, false) and include str_replace('/', DS, static::$classes[$class_name]);
224 static::alias_to_namespace($class_name);
225 static::_init_class($class);
234 {
235 require $file_path;
236 if ( ! class_exists($class, false) and class_exists($class_name = 'Fuel\\Core\\'.$class, false))
237 {
238 static::alias_to_namespace($class_name);
Session.php (https://github.com/Faianca/symfony.git) PHP · 405 lines
1 <?php
3 /*
46 $this->oldFlashes = array();
47 $this->attributes = array();
48 $this->setPhpDefaultLocale($this->defaultLocale);
49 $this->started = false;
50 $this->closed = false;
70 $this->flashes = $attributes['flashes'];
71 $this->locale = $attributes['locale'];
72 $this->setPhpDefaultLocale($this->locale);
74 // flag current flash messages to be removed at shutdown
184 $this->attributes = array();
185 $this->flashes = array();
186 $this->setPhpDefaultLocale($this->locale = $this->defaultLocale);
187 }
TypeLoader.php (https://github.com/intellix/zf2.git) PHP · 197 lines
1 <?php
2 /**
3 * Zend Framework
30 * Loads a local class and executes the instantiation of that class.
31 *
32 * @todo PHP 5.3 can drastically change this class w/ namespace and the new call_user_func w/ namespace
33 * @uses Zend\Amf\Exception
34 * @uses Zend\Amf\Value\Messaging\AcknowledgeMessage
91 $class = str_replace('.', '\\', $className);
92 }
93 if (!class_exists($class)) {
94 return "stdClass";
95 }
122 /**
123 * Map PHP class names to ActionScript class names
124 *
125 * Allows users to map the class names of there action script classes
field.php (https://gitlab.com/gregtyka/lfmawordpress) PHP · 319 lines
OutletConfig.php (https://github.com/thenobody/mkLogic.git) PHP · 433 lines
class-SS_Updater.php (https://gitlab.com/aristath/shoestrap-updater) PHP · 273 lines
1 <?php
3 class SS_Updater {
10 // This class is provided by Easy Digital Downloads Software Licensing.
11 // More info can be found here: https://easydigitaldownloads.com/extensions/software-licensing/
12 if( ! class_exists( 'EDD_SL_Plugin_Updater' ) ) {
13 include_once( dirname( __FILE__ ) . '/EDD_SL_Plugin_Updater.php' );
17 // This class is provided by Easy Digital Downloads Software Licensing.
18 // More info can be found here: https://easydigitaldownloads.com/extensions/software-licensing/
19 if( ! class_exists( 'EDD_SL_Theme_Updater' ) ) {
20 include_once( dirname( __FILE__ ) . '/EDD_SL_Theme_Updater.php' );
92 if ( ! function_exists( 'get_plugins' ) ) {
94 require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
96 }
Env.class.php (https://gitlab.com/x33n/ProjectPier-Core) PHP · 325 lines
1 <?php
3 class Env {
46 // Call init library file if it exists
47 $library_init_file = $library_path . $library . '.php';
48 if (is_file($library_init_file)) {
49 include_once $library_init_file;
62 */
63 static function useLibraryError($error_class, $library) {
64 if (class_exists($error_class)) {
65 return true;
66 } // if
68 $expected_path = ENVIRONMENT_PATH . "/library/$library/errors/$error_class.class.php";
69 if (is_file($expected_path)) {
70 include_once $expected_path;
connection_manager.test.php (https://github.com/mcgrue/pingpawn.git) PHP · 279 lines
4 *
5 *
6 * PHP versions 4 and 5
7 *
8 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
12 *
13 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
14 * @link http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests
15 * @package cake
16 * @subpackage cake.tests.cases.libs
17 * @since CakePHP(tm) v 1.2.0.5550
18 * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
130 $connection = ConnectionManager::create($name, $config);
132 $this->assertTrue(class_exists('TestSource'));
133 $this->assertTrue(class_exists('TestDriver'));
Pptx.php (https://gitlab.com/tjaafar/SuiteCRM) PHP · 200 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: Pptx.php 24593 2012-01-05 20:35:02Z matthew $
21 */
24 /** Zend_Search_Lucene_Document_OpenXml */
25 require_once 'Zend/Search/Lucene/Document/OpenXml.php';
27 /**
73 private function __construct($fileName, $storeContent)
74 {
75 if (!class_exists('ZipArchive', false)) {
76 require_once 'Zend/Search/Lucene/Exception.php';
FormBuilderTest.php (https://bitbucket.org/laborautonomo/laborautonomo-site.git) PHP · 271 lines
1 <?php
3 /*
14 use Symfony\Component\Form\FormBuilder;
16 class FormBuilderTest extends \PHPUnit_Framework_TestCase
17 {
18 private $dispatcher;
24 protected function setUp()
25 {
26 if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
27 $this->markTestSkipped('The "EventDispatcher" component is not available');
28 }
Base.php (https://github.com/sgtcarneiro/horde.git) PHP · 325 lines
1 <?php
2 /**
3 * Adds a set of uncached queries to the list handlers.
4 *
5 * PHP version 5
6 *
7 * @category Kolab
9 * @author Gunnar Wrobel <wrobel@pardus.de>
10 * @license http://www.fsf.org/copyleft/lgpl.html LGPL
11 * @link http://pear.horde.org/index.php?package=Kolab_Storage
12 */
24 * @author Gunnar Wrobel <wrobel@pardus.de>
25 * @license http://www.fsf.org/copyleft/lgpl.html LGPL
26 * @link http://pear.horde.org/index.php?package=Kolab_Storage
27 */
28 abstract class Horde_Kolab_Storage_QuerySet_Base
Pptx.php (https://github.com/timglabisch/pimcore.git) PHP · 200 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: Pptx.php 24593 2012-01-05 20:35:02Z matthew $
21 */
24 /** Zend_Search_Lucene_Document_OpenXml */
25 // require_once 'Zend/Search/Lucene/Document/OpenXml.php';
27 /**
73 private function __construct($fileName, $storeContent)
74 {
75 if (!class_exists('ZipArchive', false)) {
76 // require_once 'Zend/Search/Lucene/Exception.php';
Validate.php (https://github.com/cpatrick/Midas3.git) PHP · 290 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: Validate.php 21339 2010-03-05 15:32:25Z thomas $
20 */
23 * @see Zend_Validate_Interface
24 */
25 // require_once 'Zend/Validate/Interface.php';
27 /**
198 $className = ucfirst($classBaseName);
199 try {
200 if (!class_exists($className, false)) {
201 // require_once 'Zend/Loader.php';
class-wc-email-customer-invoice.php (https://gitlab.com/webkod3r/tripolis) PHP · 204 lines
1 <?php
3 if ( ! defined( 'ABSPATH' ) ) {
5 }
7 if ( ! class_exists( 'WC_Email_Customer_Invoice' ) ) :
9 /**
43 $this->description = __( 'Customer invoice emails can be sent to customers containing their order information and payment links.', 'woocommerce' );
45 $this->template_html = 'emails/customer-invoice.php';
46 $this->template_plain = 'emails/plain/customer-invoice.php';
session.php (https://github.com/tiwasaki/hero.git) PHP · 315 lines
1 <?php
2 /* SVN FILE: $Id: session.php,v 1.1 2011/09/20 08:32:28 iwasaki Exp $ */
8 * PHP versions 4 and 5
9 *
10 * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
11 * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
12 *
16 * @filesource
17 * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
18 * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
19 * @package cake
20 * @subpackage cake.cake.libs.controller.components
21 * @since CakePHP(tm) v 0.10.0.1232
22 * @version $Revision: 1.1 $
23 * @modifiedby $LastChangedBy: gwoo $
S3.php (https://github.com/sharpmachine/wakeupmedia.com.git) PHP · 410 lines
ValidatorBuilder.php (https://github.com/gimler/symfony.git) PHP · 348 lines
1 <?php
3 /*
193 if (null === $annotationReader) {
194 if (!class_exists('Doctrine\Common\Annotations\AnnotationReader') || !class_exists('Doctrine\Common\Cache\ArrayCache')) {
195 throw new \RuntimeException('Enabling annotation based constraint mapping requires the packages doctrine/annotations and doctrine/cache to be installed.');
196 }
Annotation.php (https://bitbucket.org/cryofrost/portal.git) PHP · 267 lines
1 <?php
3 namespace Gedmo\Tree\Mapping\Driver;
17 * @subpackage Annotation
18 * @link http://www.gediminasm.org
19 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
20 */
21 class Annotation implements AnnotationDriverInterface
126 }
127 if ($annot = $this->reader->getClassAnnotation($class, self::CLOSURE)) {
128 if (!class_exists($annot->class)) {
129 throw new InvalidMappingException("Tree closure class: {$annot->class} does not exist.");
130 }
banner.php (https://gitlab.com/campus-academy/krowkaramel) PHP · 252 lines
1 <?php
2 namespace Wpmet\Libs;
4 defined( 'ABSPATH' ) || exit;
6 if(!class_exists('\Wpmet\Libs\Banner')):
8 class Banner {
54 if($content->start <= time() && time() <= $content->end) {
55 $screen = get_current_screen();
56 if($this->is_correct_screen_to_show($content->screen, $screen->id) && class_exists('\Oxaim\Libs\Notice')) {
58 $inline_css = '';
plugin.php (https://gitlab.com/wormen/client.mastodont-engine) PHP · 298 lines
Barcode.php (https://github.com/basdog22/Qool.git) PHP · 352 lines
1 <?php
2 /**
3 * Zend Framework
17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license http://framework.zend.com/license/new-bsd New BSD License
19 * @version $Id: Barcode.php 24594 2012-01-05 21:27:01Z matthew $
20 */
140 * @see Zend_Barcode_Exception
141 */
142 require_once 'Zend/Barcode/Exception.php';
143 throw new Zend_Barcode_Exception(
144 'Barcode parameters must be in an array or a Zend_Config object'
153 * @see Zend_Barcode_Exception
154 */
155 require_once 'Zend/Barcode/Exception.php';
156 throw new Zend_Barcode_Exception(
157 'Barcode name must be specified in a string'
NodeTypeDefinition.php (https://github.com/bergie/phpcr-midgard2.git) PHP · 286 lines
1 <?php
2 namespace Midgard\PHPCR\NodeType;
4 use Midgard\PHPCR\Utils\NodeMapper;
5 use PHPCR\NodeType\NodeTypeDefinitionInterface;
161 continue;
162 }
163 $propertyPHPCR = NodeMapper::getPHPCRProperty($property);
164 if (!$propertyPHPCR) {
165 continue;
166 }
167 $this->propertyDefinitions[$propertyPHPCR] = $this->createPropertyDefinition($property, $propertyPHPCR, $reflector);
168 }
169 return $this->propertyDefinitions;
workflow.php (https://github.com/kamarulismail/kamarul-playground.git) PHP · 425 lines
TraceableEventDispatcherTest.php (https://bitbucket.org/larryg/powerhut.git) PHP · 241 lines
1 <?php
3 /*
24 use Symfony\Component\Stopwatch\Stopwatch;
26 class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase
27 {
28 protected function setUp()
29 {
30 if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
31 $this->markTestSkipped('The "EventDispatcher" component is not available');
32 }
34 if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
35 $this->markTestSkipped('The "HttpFoundation" component is not available');
36 }
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)) {
PropertyPathMapperTest.php (https://github.com/nattaphat/hgis.git) PHP · 384 lines
1 <?php
3 /*
16 use Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper;
18 class PropertyPathMapperTest extends \PHPUnit_Framework_TestCase
19 {
20 /**
25 /**
26 * @var \PHPUnit_Framework_MockObject_MockObject
27 */
28 private $dispatcher;
30 /**
31 * @var \PHPUnit_Framework_MockObject_MockObject
32 */
33 private $propertyAccessor;
reflection_php5.php (https://github.com/hatone/moodle.git) PHP · 380 lines
1 <?php
2 /**
3 * base include file for SimpleTest
4 * @package SimpleTest
5 * @subpackage UnitTester
6 * @version $Id: reflection_php5.php,v 1.4 2010/12/14 17:35:46 moodlerobot Exp $
7 */
26 /**
27 * Checks that a class has been declared. Versions
28 * before PHP5.0.2 need a check that it's not really
29 * an interface.
30 * @return boolean True if defined.
32 */
33 function classExists() {
34 if (! class_exists($this->_interface)) {
35 return false;
36 }
PlatformJobQueue.php (https://bitbucket.org/Ebozavrik/test-application.git) PHP · 354 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: PlatformJobQueue.php 24593 2012-01-05 20:35:02Z matthew $
21 */
24 * @see Zend_Queue_Adapter_AdapterAbstract
25 */
26 require_once 'Zend/Queue/Adapter/AdapterAbstract.php';
28 /**
56 if (!extension_loaded("jobqueue_client")) {
57 require_once 'Zend/Queue/Exception.php';
58 throw new Zend_Queue_Exception( 'Platform Job Queue extension does not appear to be loaded' );
59 }
fpdi_bridge.php (https://github.com/pauln/moodle.git) PHP · 208 lines
fpdi_pdf_parser.php (https://github.com/pauln/moodle.git) PHP · 347 lines
Compress.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 210 lines
field_link_color.php (https://gitlab.com/eita/agencia-consumo-responsavel) PHP · 207 lines
PluginClassLoader.php (https://github.com/bruisedlee/zf2.git) PHP · 226 lines
Barcode.php (https://github.com/Martin1982/IBMessagingWorkshopServer.git) PHP · 352 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: Barcode.php 20096 2010-01-06 02:05:09Z bkarwin $
20 */
140 * @see Zend_Barcode_Exception
141 */
142 // require_once 'Zend/Barcode/Exception.php';
143 throw new Zend_Barcode_Exception(
144 'Barcode parameters must be in an array or a Zend_Config object'
153 * @see Zend_Barcode_Exception
154 */
155 // require_once 'Zend/Barcode/Exception.php';
156 throw new Zend_Barcode_Exception(
157 'Barcode name must be specified in a string'
RedisEngine.php (https://github.com/shama/cakephp.git) PHP · 222 lines
1 <?php
2 /**
3 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
4 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
5 *
9 *
10 * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
11 * @link http://cakephp.org CakePHP(tm) Project
12 * @since CakePHP(tm) v 2.2
13 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
14 */
54 */
55 public function init($settings = array()) {
56 if (!class_exists('Redis')) {
57 return false;
58 }
class-wc-admin-profile.php (https://gitlab.com/campus-academy/krowkaramel) PHP · 252 lines
178 <?php if ( ! empty( $field['type'] ) && 'select' === $field['type'] ) : ?>
179 <select name="<?php echo esc_attr( $key ); ?>" id="<?php echo esc_attr( $key ); ?>" class="<?php echo esc_attr( $field['class'] ); ?>" style="width: 25em;">
180 <?php
182 foreach ( $field['options'] as $option_key => $option_value ) :
183 ?>
184 <option value="<?php echo esc_attr( $option_key ); ?>" <?php selected( $selected, $option_key, true ); ?>><?php echo esc_html( $option_value ); ?></option>
185 <?php endforeach; ?>
187 <?php elseif ( ! empty( $field['type'] ) && 'checkbox' === $field['type'] ) : ?>
188 <input type="checkbox" name="<?php echo esc_attr( $key ); ?>" id="<?php echo esc_attr( $key ); ?>" value="1" class="<?php echo esc_attr( $field['class'] ); ?>" <?php checked( (int) get_user_meta( $user->ID, $key, true ), 1, true ); ?> />
189 <?php elseif ( ! empty( $field['type'] ) && 'button' === $field['type'] ) : ?>
190 <button type="button" id="<?php echo esc_attr( $key ); ?>" class="button <?php echo esc_attr( $field['class'] ); ?>"><?php echo esc_html( $field['text'] ); ?></button>
191 <?php else : ?>
192 <input type="text" name="<?php echo esc_attr( $key ); ?>" id="<?php echo esc_attr( $key ); ?>" value="<?php echo esc_attr( $this->get_user_meta( $user->ID, $key ) ); ?>" class="<?php echo ( ! empty( $field['class'] ) ? esc_attr( $field['class'] ) : 'regular-text' ); ?>" />
193 <?php endif; ?>
product.php (https://gitlab.com/alexprowars/bitrix) PHP · 266 lines
FunctionDeclarationSniff.php (https://bitbucket.org/4NN3CK/myeclipse4php.git) PHP · 224 lines
24 * @license http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
25 * @version Release: 1.3.2
26 * @link http://pear.php.net/package/PHP_CodeSniffer
27 */
28 class PEAR_Sniffs_Functions_FunctionDeclarationSniff implements PHP_CodeSniffer_Sniff
95 * Processes mutli-line declarations.
96 *
97 * @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
98 * @param int $stackPtr The position of the current token
99 * in the stack passed in $tokens.
103 * @return void
104 */
105 public function processMultiLineDeclaration(PHP_CodeSniffer_File $phpcsFile, $stackPtr, $tokens)
106 {
107 // We need to work out how far indented the function
TarTest.php (https://bitbucket.org/Dal-Papa/is-340-publish-base.git) PHP · 271 lines
1 <?php
2 /**
3 * Zend Framework
21 */
23 if (!defined('PHPUnit_MAIN_METHOD')) {
24 define('PHPUnit_MAIN_METHOD', 'Zend_Filter_Compress_TarTest::main');
28 * @see Zend_Filter_Compress_Tar
29 */
30 require_once 'Zend/Filter/Compress/Tar.php';
32 /**
38 * @license http://framework.zend.com/license/new-bsd New BSD License
39 */
40 class Zend_Filter_Compress_TarTest extends PHPUnit_Framework_TestCase
41 {
42 /**
MemcachedResourceManagerTest.php (https://github.com/cgmartin/zf2.git) PHP · 253 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
14 /**
15 * PHPUnit test case
16 */
19 * @group Zend_Cache
20 */
21 class MemcachedResourceManagerTest extends \PHPUnit_Framework_TestCase
22 {
176 '',
177 array(),
178 class_exists('Memcached', false) ? array(
179 \Memcached::OPT_COMPRESSION => false,
180 \Memcached::OPT_PREFIX_KEY => 'test_',
Smtp.php (https://github.com/shin2/concrete5.git) PHP · 243 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: Smtp.php 23775 2011-03-01 17:25:24Z ralph $
21 */
25 * @see Zend_Mime
26 */
27 require_once 'Zend/Mime.php';
29 /**
30 * @see Zend_Mail_Protocol_Smtp
31 */
32 require_once 'Zend/Mail/Protocol/Smtp.php';
34 /**
tests.php
(https://swig.svn.sourceforge.net/svnroot/swig)
PHP · 233 lines
✨ Summary
This PHP code is a comprehensive set of functions for validating and checking various aspects of PHP code, including classes, functions, globals, resources, and variables. It provides a robust framework for detecting errors, warnings, and potential issues in PHP code, making it useful for developers to ensure their code is correct and reliable.
This PHP code is a comprehensive set of functions for validating and checking various aspects of PHP code, including classes, functions, globals, resources, and variables. It provides a robust framework for detecting errors, warnings, and potential issues in PHP code, making it useful for developers to ensure their code is correct and reliable.