本文整理汇总了PHP中Prado::getFrameworkPath方法的典型用法代码示例。如果您正苦于以下问题:PHP Prado::getFrameworkPath方法的具体用法?PHP Prado::getFrameworkPath怎么用?PHP Prado::getFrameworkPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Prado
的用法示例。
在下文中一共展示了Prado::getFrameworkPath方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getErrorMessageFile
/**
* @return string path to the error message file
*/
protected function getErrorMessageFile()
{
$lang = Prado::getPreferredLanguage();
$msgFile = Prado::getFrameworkPath() . '/Exceptions/messages/messages-' . $lang . '.txt';
if (!is_file($msgFile)) {
$msgFile = Prado::getFrameworkPath() . '/Exceptions/messages/messages.txt';
}
return $msgFile;
}
示例2: fileUploaded
public function fileUploaded($sender, $param)
{
if ($sender->getHasFile()) {
$tempUserFile = Prado::getFrameworkPath() . "/../rliq/assets/" . $this->user->Name . "Dimport.tmp";
if (is_file($tempUserFile)) {
unlink($tempUserFile);
}
$sender->saveAs($tempUserFile, true);
$this->loadCSVFile($sender, $param);
}
$this->UploadFileError->Text = $sender->ErrorCode;
}
示例3: fileUploaded
public function fileUploaded($sender, $param)
{
if ($sender->getHasFile()) {
$filename = $sender->FileName;
$tempUserFileName = date('Ymd_Hi_');
$compFile = $tempUserFileName . $this->DMSAufTabelle->Text . "_" . $this->DMSAufId->Text . "_" . $filename;
$tempUserFile = Prado::getFrameworkPath() . "/../rliq/assets/dms/" . $compFile;
if (is_file($tempUserFile)) {
unlink($tempUserFile);
}
$sender->saveAs($tempUserFile, true);
}
$this->UploadFileError->Text = $sender->ErrorCode;
$this->loadDirectory();
$this->UploadDialog->setDisplay("None");
}
示例4: getPradoScriptAssetUrl
public function getPradoScriptAssetUrl()
{
$base = Prado::getFrameworkPath() . DIRECTORY_SEPARATOR . self::SCRIPT_PATH;
$assets = Prado::getApplication()->getAssetManager();
return $assets->getPublishedUrl($base);
}
示例5: registerJavascriptPackages
/**
* Publishes a javascript library path and register packages to be loaded.
* See TClientScriptLoader for component that enables users to register custom javascript libraries.
* @param string javascript library base path
* @param array list of packages or javascript files (without .js extension) to be loaded.
* @param boolean true to enable keep comments in javascript files loaded, null to use application configuration.
* @param boolean true to gzip the javascript code if browsers and php supports it.
* @return string javascript src url
* @since 3.1
*/
public function registerJavascriptPackages($base, $packages, $debug = null, $gzip = true)
{
list($path, $url) = $this->getPackagePathUrl($base);
$scriptLoaderPath = $path . '/' . basename(self::SCRIPT_LOADER);
$scriptLoaderSrc = Prado::getFrameworkPath() . DIRECTORY_SEPARATOR . self::SCRIPT_LOADER;
if (!is_file($scriptLoaderPath)) {
copy($scriptLoaderSrc, $scriptLoaderPath);
chmod($scriptLoaderPath, PRADO_CHMOD);
}
$url .= '/' . basename(self::SCRIPT_LOADER) . '?js=' . implode(',', $packages);
if ($debug !== false && $this->getApplication()->getMode() === TApplicationMode::Debug) {
$this->verifyJavascriptPackages($base, $path, $packages);
$url .= '&mode=debug';
}
if ($gzip === false) {
$url .= '&gzip=false';
}
return $url;
}
示例6: getExceptionTemplate
/**
* Retrieves the template used for displaying internal exceptions.
* Internal exceptions will be displayed with source code causing the exception.
* This occurs when the application is in debug mode.
* @param Exception the exception to be displayed
* @return string the template content
*/
protected function getExceptionTemplate($exception)
{
$lang = Prado::getPreferredLanguage();
$exceptionFile = Prado::getFrameworkPath() . '/Exceptions/templates/' . self::EXCEPTION_FILE_NAME . '-' . $lang . '.html';
if (!is_file($exceptionFile)) {
$exceptionFile = Prado::getFrameworkPath() . '/Exceptions/templates/' . self::EXCEPTION_FILE_NAME . '.html';
}
if (($content = @file_get_contents($exceptionFile)) === false) {
die("Unable to open exception template file '{$exceptionFile}'.");
}
return $content;
}
示例7: fileUploaded
public function fileUploaded($sender, $param)
{
if ($sender->HasFile) {
$this->UploadFileName->Text = $sender->FileName;
$this->UploadFileLocalName->Text = $sender->LocalName;
$this->UploadFileSize->Text = $sender->FileSize;
$this->UploadFileType->Text = $sender->FileType;
$tempUserFile = Prado::getFrameworkPath() . "/../rliq/assets/" . $this->user->Name . ".tmp";
if (is_file($tempUserFile)) {
unlink($tempUserFile);
}
$sender->saveAs($tempUserFile, true);
$this->loadCSVFile();
$this->bindList_FilePreview();
$this->bindList_MappingPreview();
}
}
示例8: onPreInit
public function onPreInit($param)
{
$myPDF = new HTML2FPDF();
$myPDF->setBasePath(Prado::getFrameworkPath());
$url = "http://" . $this->Application->Parameters['PDFHost'] . "/rliq/index.php?page=reports.protokoll.a_Protokoll&idtm_protokoll=2&idtm_termin=0";
$html = "";
$html = file_get_contents($url);
$myPDF->WriteHTML($html);
$myPDF->Output();
$this->getResponse()->appendHeader("Content-Type:" . $this->header);
$this->getResponse()->appendHeader("Content-Disposition:inline;filename=" . $this->docName . '.' . $this->ext);
$writer->save('php://output');
exit;
}