当前位置: 首页>>代码示例>>PHP>>正文


PHP Link::setName方法代码示例

本文整理汇总了PHP中Link::setName方法的典型用法代码示例。如果您正苦于以下问题:PHP Link::setName方法的具体用法?PHP Link::setName怎么用?PHP Link::setName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Link的用法示例。


在下文中一共展示了Link::setName方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Init

 public static function Init($data)
 {
     $component = new Component();
     $links = array();
     $link = new Link();
     $link->setName('fileDb');
     $link->setAddress('http://localhost/' . $data['path'] . '/fileDb');
     $link->setPrefix('file');
     $links[] = $link;
     $link = new Link();
     $link->setName('file');
     $link->setAddress('http://localhost/' . $data['path'] . '/file');
     $link->setPrefix('file');
     $links[] = $link;
     $component->setLinks($links);
     chdir(dirname(__FILE__));
     CConfig::saveConfigGlobal('', Component::encodeComponent($component));
 }
开发者ID:sawh,项目名称:ostepu-system,代码行数:18,代码来源:LFileTest.php

示例2: Input

    if($length < 10) {
    	$size = 10;
    }
    */
    $inp = new Input();
    $inp->setName($colname);
    $inp->setValue($item);
    $inp->setSize(50);
    $inp->setMaxlength(128);
    /**/
    $tr = new Tr();
    $tr->add($colname);
    $tr->add($inp->dump());
    $tr->build();
    ++$i;
    /**/
}
$tr = new Tr();
$tr->add('&nbsp;');
$tr->add($submit->dump());
$tr->build();
unset($table);
unset($form);
$body->line('<hr />');
$backlink = new Link();
$backlink->setHref('controller.php?cmd=table_browse&table=' . $req->get('table'));
$backlink->setName('Back to list');
$backlink->build();
include_once './inc/footer.php';
unset($body);
unset($html);
开发者ID:broozer,项目名称:psa,代码行数:31,代码来源:edit_record.php

示例3: edit

 /**
  * @param Link $link
  * @param $values
  * @return Link
  */
 protected function edit(Link $link, $values)
 {
     $link->setName($values->name)->setDescription($values->description)->setUrl($this->treatUrl($values->url))->setPublic($values->public);
     $this->linkFacade->save($link);
     return $link;
 }
开发者ID:flame-cms,项目名称:link-bundle,代码行数:11,代码来源:LinkManager.php

示例4: Th

 $table->build();
 $th = new Th();
 $th->add('Name');
 $th->add('Unique ?');
 $th->add('Columns');
 $th->add('&nbsp;');
 $th->build();
 foreach ($res as $item) {
     if ($item->unique == 1) {
         $uniq = 'Y';
     } else {
         $uniq = 'N';
     }
     $drop = new Link();
     $drop->setHref('controller.php?cmd=drop_idx&idxname=' . $item->name . '&table=' . $req->get('table'));
     $drop->setName('[ drop ]');
     $drop->setJs(' onclick="return PSA.really_drop(\' index [' . $item->name . ']\');" ');
     $tr = new Tr();
     if ($odd) {
         $tr->setGlobalClass('even');
         $odd = FALSE;
     } else {
         $tr->setGlobalClass('odd');
         $odd = TRUE;
     }
     $tr->add($item->name);
     $tr->setClas('center');
     $tr->add($uniq);
     $q = "PRAGMA index_info(" . $item->name . ")";
     $sql->qo($q);
     $rescol = $sql->fo();
开发者ID:broozer,项目名称:psa,代码行数:31,代码来源:tableinfo.php

示例5: foreach

    $table->build();
    foreach ($res as $item) {
        if ($item->name == 'sqlite_sequence') {
            continue;
        }
        $struct = new Link();
        $struct->setHref('controller.php?cmd=tableinfo&table=' . $item->name . '&view=true');
        $struct->setName('Structure');
        $browse = new Link();
        $browse->setHref('controller.php?cmd=table_browse&table=' . $item->name . '&view=true');
        $browse->setName('Browse');
        $dump = new Link();
        $dump->setHref('controller.php?cmd=table_dump&table=' . $item->name . '&view=true');
        $dump->setName('Dump');
        $drop = new Link();
        $drop->setHref('controller.php?cmd=drop_view&table=' . $item->name . '&view==true');
        $drop->setName('Drop');
        $drop->setJs(' onclick="return PSA.really_drop(\'view\');" ');
        $tr = new Tr();
        $tr->add($item->name);
        $tr->add($struct->dump());
        $tr->add($browse->dump());
        $tr->add($dump->dump());
        $tr->add($drop->dump());
        $tr->build();
    }
    unset($table);
}
include_once './inc/footer.php';
unset($body);
unset($html);
开发者ID:broozer,项目名称:psa,代码行数:31,代码来源:table.php

示例6: Tr

        $tr = new Tr();
        if ($odd) {
            $tr->setGlobalClass('even');
            $odd = FALSE;
        } else {
            $tr->setGlobalClass('odd');
            $odd = TRUE;
        }
        if (!$is_view) {
            $edit = new Link();
            $edit->setHref('controller.php?cmd=edit_record&amp;table=' . $req->get('table') . '&amp;id=' . $item->id);
            $edit->setName('[edit]');
            // $edit->setTarget('edit_del');
            $del = new Link();
            $del->setHref('controller.php?cmd=drop_record&amp;table=' . $req->get('table') . '&amp;id=' . $item->id);
            $del->setName('[del]');
            $del->setJs(' onclick="return PSA.really_drop(\'record\');" ');
            $tr->add($edit->dump());
            $tr->add($del->dump());
        }
        foreach ($item as $data) {
            $tr->add(htmlentities($data));
        }
        $tr->build();
    }
    unset($table);
}
$body->line('</div>');
include_once './inc/footer.php';
unset($body);
unset($html);
开发者ID:broozer,项目名称:psa,代码行数:31,代码来源:table_browse.php

示例7: Body

$head->setJs('./js/PSA.js');
$head->build();
$body = new Body();
$body->build();
include_once './inc/menubar.php';
// TODO: check if table name already exists
$name = new Input();
$name->setName('tblname');
$name->setSize(50);
$name->setMaxlength(128);
$name->setId('tblname');
$body->line('<span class="vet">Table name</span><br /> ');
$body->line($name->dump());
$create = new Link();
$create->setHref('controller.php?cmd=table_add_action');
$create->setName('<button>Create</button>');
$body->line($create->dump());
$body->line('<hr />');
$body->line('<span class="vet">Fields</span><br /> ');
$table = new Table();
$table->setClas('result');
$table->build();
$th = new Th();
$th->add('name');
$th->add('type');
$th->add('primary');
$th->add('size');
$th->add('null');
$th->add('default');
$th->build();
$colname = new Input();
开发者ID:broozer,项目名称:psa,代码行数:31,代码来源:table_add.php

示例8: Link

 $table->setId('listing');
 $table->build();
 for ($i = 0; $i < sizeof($files); ++$i) {
     $link = new Link();
     $link->setHref('controller.php?cmd=table&amp;db=' . urlencode($files[$i]));
     $link->setName('[' . $files[$i] . ']');
     $vacuum = new Link();
     $vacuum->setHref('controller.php?cmd=vacuum_db&amp;db=' . urlencode($files[$i]));
     $vacuum->setName('[vacuum]');
     $drop = new Link();
     $drop->setHref('controller.php?cmd=drop_db&amp;db=' . urlencode($files[$i]));
     $drop->setName('[drop]');
     $drop->setJs(' onclick="return PSA.really_drop(\'database\');" ');
     $schema = new Link();
     $schema->setHref('controller.php?cmd=schema_db&amp;db=' . urlencode($files[$i]));
     $schema->setName('[schema]');
     $tr = new Tr();
     if ($odd) {
         $tr->setGlobalClass('even');
         $odd = FALSE;
     } else {
         $tr->setGlobalClass('odd');
         $odd = TRUE;
     }
     $tr->add($link->dump());
     $tr->add($vacuum->dump());
     $tr->add($drop->dump());
     $tr->add($schema->dump());
     $tr->build();
 }
 unset($table);
开发者ID:broozer,项目名称:psa,代码行数:31,代码来源:base.php


注:本文中的Link::setName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。