original_string: public static function exists($package)
  	{
  		if (array_key_exists($package, static::$packages))
  		{
  			return static::$packages[$package];
  		}
  		else
  		{
  			$paths = \Config::get('package_paths', array());
  			empty($paths) and $paths = array(PKGPATH);
  
  			foreach ($paths as $path)
  			{
  				if (is_dir($path.$package))
  				{
  					return $path.$package.DS;
  				}
  			}
  		}
  
  		return false;
  	}
code: public static function exists($package)
  	{
  		if (array_key_exists($package, static::$packages))
  		{
  			return static::$packages[$package];
  		}
  		else
  		{
  			$paths = \Config::get('package_paths', array());
  			empty($paths) and $paths = array(PKGPATH);
  
  			foreach ($paths as $path)
  			{
  				if (is_dir($path.$package))
  				{
  					return $path.$package.DS;
  				}
  			}
  		}
  
  		return false;
  	}
code_tokens: public static function exists ( $ package ) { if ( array_key_exists ( $ package , static :: $ packages ) ) { return static :: $ packages [ $ package ] ; } else { $ paths = \ Config :: get ( 'package_paths' , array ( ) ) ; empty ( $ paths ) and $ paths = array ( PKGPATH ) ; foreach ( $ paths as $ path ) { if ( is_dir ( $ path . $ package ) ) { return $ path . $ package . DS ; } } } return false ; }
docstring: Checks if the given package exists.
  
  @param   string  $package  The package name
  @return  bool|string  Path to the package found, or false if not found
docstring_tokens: Checks if the given package exists .