PHP 클래스 Cake\Upgrade\Shell\Task\AppUsesTask

Updates App::uses() calls.
상속: extends BaseTask, use trait ChangeTrait
파일 보기 프로젝트 열기: cakephp/upgrade

공개 프로퍼티들

프로퍼티 타입 설명
$implicitMap array A map of old => new for use statements that are missing
$rename mixed A list of classes which have had the Cake prefix removed
$tasks

보호된 메소드들

메소드 설명
_addImplicitUses ( string $contents ) : string Add implicit uses
_mapClassName ( array $matches ) : array Convert old classnames to new ones.
_orderUses ( string $contents ) : string Order use statements
_process ( $path ) : void Convert App::uses() to normal use statements.
_removeDynamicAppUses ( string $contents ) : string _removeDynamicAppUses
_replaceAppUses ( string $contents ) : string Replace App::uses with use ;
_replaceReferences ( string $contents ) : string Replace references to old classes
_shouldProcess ( string $path ) : boolean _shouldProcess

메소드 상세

_addImplicitUses() 보호된 메소드

Account for: + parent classes and interfaces are frequently just assumed to exist in useland code + also in function arguments + static class calls for basic Cake classes
protected _addImplicitUses ( string $contents ) : string
$contents string
리턴 string

_mapClassName() 보호된 메소드

Strips the Cake prefix off of classes that no longer have it.
protected _mapClassName ( array $matches ) : array
$matches array
리턴 array

_orderUses() 보호된 메소드

For code standards, use statements should be alphabetical but in addition, this Moves all use statements to the top of the class
protected _orderUses ( string $contents ) : string
$contents string
리턴 string

_process() 보호된 메소드

Order App::uses statements and replace the class in the source if it appears
protected _process ( $path ) : void
리턴 void

_removeDynamicAppUses() 보호된 메소드

_removeDynamicAppUses
protected _removeDynamicAppUses ( string $contents ) : string
$contents string
리턴 string

_replaceAppUses() 보호된 메소드

Replace App::uses with use ;
protected _replaceAppUses ( string $contents ) : string
$contents string
리턴 string

_replaceReferences() 보호된 메소드

Replace references to old classes
protected _replaceReferences ( string $contents ) : string
$contents string
리턴 string

_shouldProcess() 보호된 메소드

If App::uses is nowhere - bail, otherwise use the default (php files only)
protected _shouldProcess ( string $path ) : boolean
$path string
리턴 boolean

프로퍼티 상세

$implicitMap 공개적으로 프로퍼티

A map of old => new for use statements that are missing
public array $implicitMap
리턴 array

$rename 공개적으로 프로퍼티

A list of classes which have had the Cake prefix removed
public mixed $rename
리턴 mixed

$tasks 공개적으로 프로퍼티

public $tasks