PHP 클래스 PathFinder, atk4

.. Reference: http://agiletoolkit.org/doc/ref *ATK4***************************************************** This file is part of Agile Toolkit 4 http://agiletoolkit.org (c) 2008-2011 Agile Technologies Ireland Limited Distributed under Affero General Public License v3 If you are using this file in YOUR web software, you must make your make source code for YOUR web software public. See LICENSE.txt for more information You can obtain non-public copy of Agile Toolkit 4 at http://agiletoolkit.org/commercial ****************************************************ATK4*
상속: extends AbstractController
파일 보기 프로젝트 열기: atk4/atk4 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$atk_location Agile Toolkit comes with some assets: lib, template. This location describes those resources. It's not publicly available.
$atk_public public/atk4 -> /vendor/atk4/atk4/public/atk4 If that folder is not there, PathFinder will point directly to vendor folder (such as if on development environment), if that is also unavailable, this can fall back to Agile Toolkit CDN.
$base_location Base location is where your interface files are located. Normally this location is added first and all the requests are checked here before elsewhere. Example: /my/path/agiletoolkit/admin/.
$default_exception
$public_location This is location where images, javascript files and some other public resources are located. Ex: /my/path/agiletoolkit/public.

보호된 프로퍼티들

프로퍼티 타입 설명
$report_autoload_errors boolean By default Agile Toolkit will report autoloading errors if the file couldn't be found by any of the autoloaders. To prevent this, you should pass ['report_autoload_errors'=>false] as second argument to initialization of this class.

공개 메소드들

메소드 설명
_searchDirFiles ( $dir, &$files, $prefix = '' )
addDefaultLocations ( ) Agile Toolkit-based application comes with a predefined resource structure. For new users it's easier if they use a consistest structure, for example having all the PHP classes inside "lib" folder.
addLocation ( array $contents = [], mixed $old_contents = null ) : PathFinder_Location Cretes new PathFinder_Location object and specifies it's contents.
addSandbox ( )
init ( )
loadClass ( $className ) : string Provided with a class name, this will attempt to find and load it.
locate ( string $type, string $filename = '', string $return = 'relative', $throws_exception = true ) : string | object | array Search for a $filename inside multiple locations, associated with resource $type. By default will return relative path, but 3rd argument can change that.
search ( string $type, string $filename = '', string $return = 'relative' ) : string | object Search is similar to locate, but will return array of all matching files.
searchDir ( $type, $directory = '' ) Specify type and directory and it will return array of all files of a matching type inside that directory. This will work even if specified directory exists inside multiple locations.

메소드 상세

_searchDirFiles() 공개 메소드

public _searchDirFiles ( $dir, &$files, $prefix = '' )

addDefaultLocations() 공개 메소드

A more advanced developer might be willing to add additional locations of resources to suit your own preferences. You might want to do this if you are integrating with your existing application or another framework or building multi-tiered project with extensive structure. To extend the default structure which this method defines - you should look into :php:class:App_CLI::addDefaultLocations and :php:class:App_CLI::addSharedLocations
public addDefaultLocations ( )

addLocation() 공개 메소드

You can subsequentially add more contents by calling: :php:meth:PathFinder_Location::defineContents.
public addLocation ( array $contents = [], mixed $old_contents = null ) : PathFinder_Location
$contents array
$old_contents mixed
리턴 PathFinder_Location

addSandbox() 공개 메소드

public addSandbox ( )

init() 공개 메소드

public init ( )

loadClass() 공개 메소드

Provided with a class name, this will attempt to find and load it.
public loadClass ( $className ) : string
리턴 string path from where the class was loaded

locate() 공개 메소드

The third argument can also be 'location', in which case a :php:class:PathFinder_Location object will be returned. If file is not found anywhere, then :php:class:Exception_PathFinder is thrown unless you set $throws_exception to false, and then method would return null.
public locate ( string $type, string $filename = '', string $return = 'relative', $throws_exception = true ) : string | object | array
$type string Type of resource to search surch as "php"
$filename string Name of the file to search for
$return string 'relative','url','path' or 'location'
리턴 string | object | array

searchDir() 공개 메소드

Specify type and directory and it will return array of all files of a matching type inside that directory. This will work even if specified directory exists inside multiple locations.
public searchDir ( $type, $directory = '' )

프로퍼티 상세

$atk_location 공개적으로 프로퍼티

Agile Toolkit comes with some assets: lib, template. This location describes those resources. It's not publicly available.
public $atk_location

$atk_public 공개적으로 프로퍼티

public/atk4 -> /vendor/atk4/atk4/public/atk4 If that folder is not there, PathFinder will point directly to vendor folder (such as if on development environment), if that is also unavailable, this can fall back to Agile Toolkit CDN.
public $atk_public

$base_location 공개적으로 프로퍼티

Base location is where your interface files are located. Normally this location is added first and all the requests are checked here before elsewhere. Example: /my/path/agiletoolkit/admin/.
public $base_location

$default_exception 공개적으로 프로퍼티

public $default_exception

$public_location 공개적으로 프로퍼티

This is location where images, javascript files and some other public resources are located. Ex: /my/path/agiletoolkit/public.
public $public_location

$report_autoload_errors 보호되어 있는 프로퍼티

By default Agile Toolkit will report autoloading errors if the file couldn't be found by any of the autoloaders. To prevent this, you should pass ['report_autoload_errors'=>false] as second argument to initialization of this class.
protected bool $report_autoload_errors
리턴 boolean