PHP Class AdminPageFrameworkLoader_AdminPage_Tool_Generator_Generator

Since: 3.5.4
Inheritance: extends AdminPageFrameworkLoader_AdminPage_Section_Base
Show file Open project: michaeluno/admin-page-framework

Public Properties

Property Type Description
$oFactory Stores the admin page factory object.

Public Methods

Method Description
_replyToModifyFileContents ( $sFileContents, $sPathInArchive ) : string Modifies the file contents of the archive.
_replyToModifyPathInArchive ( string $sPathInArchive ) : string Modifies the path in the archive which include the file name.
_replyToModifyPathName ( $aMatches ) Modifies the regex-matched string.
addFields ( $oFactory, $sSectionID ) : void Adds form fields.
replyToDownloadFramework ( $aSavedData, $sSubmittedFieldID, $sSubmittedInputID, $oAdminPage ) Lets the user download their own version of Admin Page Framework.
replyToFilterFileName ( $sFileName, $sFieldID, $sInputID, $vExportingData, $oAdminPage ) : string Filters the exporting file name.
replyToModifyExportHTTPHeader ( $aHeader, $sFieldID, $sInputID, $mData, $sFileName, $oFactory ) Modifies the HTTP header of the export field.
validate ( $aInput, $aOldInput, $oAdminPage, $aSubmitInfo ) Validates the submitted form data.

Protected Methods

Method Description
construct ( $oFactory ) : void A user constructor.

Private Methods

Method Description
_getCheckedComponents ( ) : array Returns an array holding elements that the user has selected in the form.
_getComponentLabels ( ) : array Returns component labels as an array.
_getDisallowedArchiveDirectoryPaths ( ) : array Returns an array holding allowed paths set to the archive.
_getDownloadFileName ( ) : string Returns the user-set file name.
_getDownloadFrameworkZipFile ( $sFrameworkDirPath, $sDestinationPath ) : string Generates the framework zip data.
_getFormSubmitValueByFieldIDAsString ( $sFieldID ) : string Retrieves the value from the $_POST array by the given field ID.
_isAllowedArchivePath ( $sPath ) : boolean Checks whether the passed archive path is allowed.
_modifyClassName ( $sSubject ) : string Modifies the given class name.
_modifyClassNameByPath ( $sFileContents, $sPathInArchive ) : string Modifies the given file contents.
_modifyClassNameOfInclusionList ( $sFileContents ) : string Modifies the class inclusion list.
_modifyFileDockblock ( $sFileContents ) : string Inserts additional information such as an included component list and a date to the file doc-block (the header comment part).
_modifyTextDomain ( $sFileContents ) : string Modifies the text domain in the given file contents.
_sanitizeFieldValues ( array $aInput, $oAdminPage ) : array Sanitizes user-submitted form field values.

Method Details

_replyToModifyFileContents() public method

Modifies the file contents of the archive.
Since: 3.5.4
public _replyToModifyFileContents ( $sFileContents, $sPathInArchive ) : string
return string The modified file contents.

_replyToModifyPathInArchive() public method

Return an empty string to drop the item.
Since: 3.5.4
public _replyToModifyPathInArchive ( string $sPathInArchive ) : string
$sPathInArchive string The internal path of the archive including the parsing file name.
return string

_replyToModifyPathName() public method

Modifies the regex-matched string.
Since: 3.5.4
public _replyToModifyPathName ( $aMatches )

addFields() public method

Adds form fields.
Since: 3.5.4
public addFields ( $oFactory, $sSectionID ) : void
return void

construct() protected method

A user constructor.
Since: 3.5.4
protected construct ( $oFactory ) : void
return void

replyToDownloadFramework() public method

Lets the user download their own version of Admin Page Framework.
Since: 3.5.4
public replyToDownloadFramework ( $aSavedData, $sSubmittedFieldID, $sSubmittedInputID, $oAdminPage )

replyToFilterFileName() public method

Filters the exporting file name.
public replyToFilterFileName ( $sFileName, $sFieldID, $sInputID, $vExportingData, $oAdminPage ) : string
return string

replyToModifyExportHTTPHeader() public method

Modifies the HTTP header of the export field.
Since: 3.5.4 #return array
public replyToModifyExportHTTPHeader ( $aHeader, $sFieldID, $sInputID, $mData, $sFileName, $oFactory )

validate() public method

Validates the submitted form data.
Since: 3.5.4
public validate ( $aInput, $aOldInput, $oAdminPage, $aSubmitInfo )

Property Details

$oFactory public property

Stores the admin page factory object.
public $oFactory