Overview

Packages

  • Auth
  • Config
  • Controller
  • Date
  • Db
  • Feed
    • Abstract
    • Writers
  • File
    • Decorator
  • Form
    • Element
  • Image
  • Log
    • Writer
  • Net
    • Exception
    • REST
  • None
  • PHP
  • PHPMailer
  • Session
  • Util
  • Validate
    • Validator
  • Zend
    • Db
      • Adapter
      • Expr
      • Profiler
      • Select
      • Statement
      • Table
    • Loader
      • Autoloader
      • PluginLoader
    • Registry

Classes

  • Zend_Loader

Exceptions

  • Zend_Loader_Exception
  • Overview
  • Package
  • Class
  • Tree

Class Zend_Loader

Static methods for loading classes and files.

Package: Zend\Loader
Category: Zend
Copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
License: New BSD License
Located at Zend/Loader.php
Methods summary
public static
# loadClass( string $class, string|array $dirs = null )

Loads a class from a PHP file. The filename must be formatted as "$class.php".

Loads a class from a PHP file. The filename must be formatted as "$class.php".

If $dirs is a string or an array, it will search the directories in the order supplied, and attempt to load the first matching file.

If $dirs is null, it will split the class name at underscores to generate a path hierarchy (e.g., "Zend_Example_Class" will map to "Zend/Example/Class.php").

If the file was not found in the $dirs, or if no $dirs were specified, it will attempt to load it from PHP's include_path.

Parameters

$class
string
- The full class name of a Zend component.
$dirs
string|array
- OPTIONAL Either a path or an array of paths to search.

Throws

Zend_Exception
public static boolean
# loadFile( string $filename, string|array $dirs = null, boolean $once = false )

Loads a PHP file. This is a wrapper for PHP's include() function.

Loads a PHP file. This is a wrapper for PHP's include() function.

$filename must be the complete filename, including any extension such as ".php". Note that a security check is performed that does not permit extended characters in the filename. This method is intended for loading Zend Framework files.

If $dirs is a string or an array, it will search the directories in the order supplied, and attempt to load the first matching file.

If the file was not found in the $dirs, or if no $dirs were specified, it will attempt to load it from PHP's include_path.

If $once is TRUE, it will use include_once() instead of include().

Parameters

$filename
string
$dirs
string|array
- OPTIONAL either a path or array of paths to search.
$once
boolean

Returns

boolean

Throws

Zend_Exception
public static boolean
# isReadable( string $filename )

Returns TRUE if the $filename is readable, or FALSE otherwise. This function uses the PHP include_path, where PHP's is_readable() does not.

Returns TRUE if the $filename is readable, or FALSE otherwise. This function uses the PHP include_path, where PHP's is_readable() does not.

Note from ZF-2900: If you use custom error handler, please check whether return value from error_reporting() is zero or not. At mark of fopen() can not suppress warning if the handler is used.

Parameters

$filename
string

Returns

boolean
public static array
# explodeIncludePath( string|null $path = null )

Explode an include path into an array

Explode an include path into an array

If no path provided, uses current include_path. Works around issues that occur when the path includes stream schemas.

Parameters

$path
string|null

Returns

array
protected static
# _securityCheck( string $filename )

Ensure that filename does not contain exploits

Ensure that filename does not contain exploits

Parameters

$filename
string

Throws

Zend_Exception
Pry Framework API documentation generated by ApiGen 2.6.1