当前位置: 首页>>代码示例>>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;未经允许,请勿转载。