Compare commits

...

3 Commits

Author SHA1 Message Date
Fabien Potencier 475b92bd71 fixed CS (mainly method signatures) 2012-07-09 14:43:50 +02:00
Włodzimierz Gajda 6329e84c2d [2.0][Component][ClassLoader] cs 2012-04-23 07:37:21 +02:00
marc.weistroff 28bf7c891b Updated LICENSE files copyright 2012-02-22 10:10:37 +01:00
5 changed files with 12 additions and 10 deletions
+2
View File
@@ -84,6 +84,8 @@ class ApcUniversalClassLoader extends UniversalClassLoader
* Finds a file by class name while caching lookups to APC.
*
* @param string $class A class name to resolve to file
*
* @return string|null The path, if found
*/
public function findFile($class)
{
+6 -6
View File
@@ -18,7 +18,7 @@ namespace Symfony\Component\ClassLoader;
*/
class ClassCollectionLoader
{
static private $loaded;
private static $loaded;
/**
* Loads a list of classes and caches them in one big file.
@@ -32,7 +32,7 @@ class ClassCollectionLoader
*
* @throws \InvalidArgumentException When class can't be loaded
*/
static public function load($classes, $cacheDir, $name, $autoReload, $adaptive = false, $extension = '.php')
public static function load($classes, $cacheDir, $name, $autoReload, $adaptive = false, $extension = '.php')
{
// each $name can only be loaded once per PHP process
if (isset(self::$loaded[$name])) {
@@ -123,7 +123,7 @@ class ClassCollectionLoader
*
* @return string Namespaces with brackets
*/
static public function fixNamespaceDeclarations($source)
public static function fixNamespaceDeclarations($source)
{
if (!function_exists('token_get_all')) {
return $source;
@@ -172,12 +172,12 @@ class ClassCollectionLoader
/**
* Writes a cache file.
*
* @param string $file Filename
* @param string $file Filename
* @param string $content Temporary file content
*
* @throws \RuntimeException when a cache file cannot be written
*/
static private function writeCacheFile($file, $content)
private static function writeCacheFile($file, $content)
{
$tmpFile = tempnam(dirname($file), basename($file));
if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $file)) {
@@ -199,7 +199,7 @@ class ClassCollectionLoader
*
* @return string The PHP string with the comments removed
*/
static private function stripComments($source)
private static function stripComments($source)
{
if (!function_exists('token_get_all')) {
return $source;
+1 -1
View File
@@ -21,7 +21,7 @@ class DebugUniversalClassLoader extends UniversalClassLoader
/**
* Replaces all regular UniversalClassLoader instances by a DebugUniversalClassLoader ones.
*/
static public function enable()
public static function enable()
{
if (!is_array($functions = spl_autoload_functions())) {
return;
+1 -1
View File
@@ -1,4 +1,4 @@
Copyright (c) 2004-2011 Fabien Potencier
Copyright (c) 2004-2012 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+2 -2
View File
@@ -169,8 +169,8 @@ class UniversalClassLoader
/**
* Registers a set of classes using the PEAR naming convention.
*
* @param string $prefix The classes prefix
* @param array|string $paths The location(s) of the classes
* @param string $prefix The classes prefix
* @param array|string $paths The location(s) of the classes
*
* @api
*/