當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Prado::getPathOfAlias方法代碼示例

本文整理匯總了PHP中Prado::getPathOfAlias方法的典型用法代碼示例。如果您正苦於以下問題:PHP Prado::getPathOfAlias方法的具體用法?PHP Prado::getPathOfAlias怎麽用?PHP Prado::getPathOfAlias使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Prado的用法示例。


在下文中一共展示了Prado::getPathOfAlias方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: editRow

 public function editRow($sender, $param)
 {
     if ($this->IsValid) {
         $finder = CatalogueRecord::finder();
         $finder->DbConnection->Active = true;
         $transaction = $finder->DbConnection->beginTransaction();
         try {
             $rows = $finder->findBycat_id($this->getRequest()->itemAt("id"));
             $rows->MasterName = TPropertyValue::ensureString($this->Name->getSafeText());
             $rows->ShortName = TPropertyValue::ensureString($this->ShortName->getSafeText());
             $baseMethod = new BaseFunction();
             $d = dir($baseMethod->UploadFilePath);
             while ($entry = $d->read()) {
                 if (strlen($entry) > 2 && is_file($d->path . '/' . $entry) && $entry != '.htaccess') {
                     copy($baseMethod->UploadFilePath . $entry, Prado::getPathOfAlias('UserFiles') . '/Language/' . $this->getRequest()->itemAt("id") . '/' . $entry) or die("Błąd przy kopiowaniu");
                     $rows->Photo = $entry;
                 }
             }
             $d->close();
             $rows->save();
             $transaction->commit();
             $this->Response->redirect($this->Service->constructUrl("Language.Index", array("id" => $this->getRequest()->itemAt("id"))));
         } catch (Exception $e) {
             $transaction->rollBack();
         }
     }
 }
開發者ID:venomproject,項目名稱:defaultCMS,代碼行數:27,代碼來源:Index.php

示例2: fileDelete

 public function fileDelete($sender, $param)
 {
     if ($this->pathName[1] == 'Index') {
         FilesRecord::finder()->deleteByID($param->CommandName);
         unlink(Prado::getPathOfAlias('UserFiles') . '/' . $this->pathName[0] . '/' . $this->getRequest()->itemAt("id") . '/' . $param->CommandParameter);
     }
     $this->Response->redirect($this->Service->constructUrl($this->pathName[0] . ".Index", array("id" => $this->getRequest()->itemAt("id"))));
 }
開發者ID:venomproject,項目名稱:defaultCMS,代碼行數:8,代碼來源:GalleryAdminBox.php

示例3: importZendNamespace

 protected function importZendNamespace()
 {
     if (is_null(Prado::getPathOfAlias('Zend'))) {
         $zendBase = !is_null($this->_ZF) ? $this->_ZF . '.*' : 'Application.index.*';
         $path = !is_null($this->_ZF) ? $this->_ZF . '.Zend.*' : 'Application.index.Zend.*';
         Prado::using($zendBase);
         Prado::setPathOfAlias('Zend', Prado::getPathOfNamespace($path));
     }
 }
開發者ID:Nurudeen,項目名稱:prado,代碼行數:9,代碼來源:ZendSearch.php

示例4: editRow

 public function editRow($sender, $param)
 {
     if ($this->IsValid) {
         $short = strtolower($this->ShortName->getSafeText());
         $rows = new CatalogueRecord();
         $rows->name = 'messages.' . $short;
         $rows->MasterName = TPropertyValue::ensureString($this->Name->getSafeText());
         $rows->ShortName = TPropertyValue::ensureString($short);
         $rows->save();
         if (!is_dir(Prado::getPathOfAlias('UserFiles') . '/Language/' . $rows->cat_id)) {
             $dirun = dir(Prado::getPathOfAlias('UserFiles'));
             mkdir($dirun->path . '/Language/' . $rows->cat_id, 0775);
             $dirun->close();
         }
         $baseMethod = new BaseFunction();
         $d = dir($baseMethod->UploadFilePath);
         while ($entry = $d->read()) {
             if (strlen($entry) > 2 && is_file($d->path . '/' . $entry) && $entry != '.htaccess') {
                 copy($baseMethod->UploadFilePath . $entry, Prado::getPathOfAlias('UserFiles') . '/Language/' . $rows->cat_id . '/' . $entry) or die("Błąd przy kopiowaniu");
                 $row = CatalogueRecord::finder()->findBycat_id($rows->cat_id);
                 $row->Photo = $entry;
                 $row->save();
             }
         }
         $statyczne = PagesRecord::finder()->findAll('PageID IS NULL AND LanguageID = 1');
         foreach ($statyczne as $page) {
             $new = new PagesRecord();
             $new->Name = $rows->ShortName . ' : ' . $page->Name;
             $new->LanguageID = $rows->cat_id;
             $new->LangCode = $short;
             $new->PageID = $page->PageID;
             $new->Protected = $page->Protected;
             $new->Position = $page->Position;
             $new->ShowMenu = $page->ShowMenu;
             $new->save();
         }
         $translation = TransUnitRecord::finder()->findAll('cat_id = 1');
         foreach ($translation as $page) {
             $new = new TransUnitRecord();
             $new->id = $page->id;
             $new->cat_id = $rows->cat_id;
             $new->source = $page->source;
             $new->save();
         }
         $settings = SettingsRecord::finder()->findAll('LanguageID = 1');
         foreach ($settings as $set) {
             $newS = new SettingsRecord();
             $newS->Key = $set->Key;
             $newS->Value = $rows->ShortName . ' : ' . $set->Value;
             $newS->LanguageID = $rows->cat_id;
             $newS->LangCode = $short;
             $newS->save();
         }
         $this->Response->redirect($this->Service->constructUrl("Language.Index", array('id' => $rows->cat_id)));
     }
 }
開發者ID:venomproject,項目名稱:defaultCMS,代碼行數:56,代碼來源:Add.php

示例5: testSetTransformPathAsNamespace

 public function testSetTransformPathAsNamespace()
 {
     if (Prado::getPathOfAlias('UnitTest') === null) {
         Prado::setPathOfAlias('UnitTest', dirname(__FILE__) . '/data');
     }
     $expected = $this->transformPath;
     $transform = new TXmlTransform();
     $transform->setTransformPath('UnitTest.hello');
     $this->assertEquals($expected, $transform->getTransformPath());
 }
開發者ID:bklein01,項目名稱:prado,代碼行數:10,代碼來源:TXmlTransformTest.php

示例6: clearTempFile

 public function clearTempFile()
 {
     $d = dir(Prado::getPathOfAlias('UserFiles'));
     while ($entry = $d->read()) {
         if (strlen($entry) > 2 && is_file($d->path . '/' . $entry)) {
             unlink(Prado::getPathOfAlias('UserFiles') . '/' . $entry);
         }
     }
     $d->close();
     $f = dir('themes/Admin/jQuery-File-Upload/server/php/files/');
     while ($entry = $f->read()) {
         if (strlen($entry) > 2 && is_file($f->path . '/' . $entry) && $entry != '.htaccess') {
             unlink($f->path . '/' . $entry);
         }
     }
     $f->close();
     $g = dir('themes/Admin/jQuery-File-Upload/server/php/files/thumb/');
     while ($entry = $g->read()) {
         if (strlen($entry) > 2 && is_file($g->path . '/' . $entry) && $entry != '.htaccess') {
             unlink($g->path . '/' . $entry);
         }
     }
     $g->close();
 }
開發者ID:venomproject,項目名稱:defaultCMS,代碼行數:24,代碼來源:UploadFileAdminBox.php


注:本文中的Prado::getPathOfAlias方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。