本文整理汇总了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));
}
示例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(' ');
$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);
示例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;
}
示例4: Th
$table->build();
$th = new Th();
$th->add('Name');
$th->add('Unique ?');
$th->add('Columns');
$th->add(' ');
$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();
示例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);
示例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&table=' . $req->get('table') . '&id=' . $item->id);
$edit->setName('[edit]');
// $edit->setTarget('edit_del');
$del = new Link();
$del->setHref('controller.php?cmd=drop_record&table=' . $req->get('table') . '&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);
示例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();
示例8: Link
$table->setId('listing');
$table->build();
for ($i = 0; $i < sizeof($files); ++$i) {
$link = new Link();
$link->setHref('controller.php?cmd=table&db=' . urlencode($files[$i]));
$link->setName('[' . $files[$i] . ']');
$vacuum = new Link();
$vacuum->setHref('controller.php?cmd=vacuum_db&db=' . urlencode($files[$i]));
$vacuum->setName('[vacuum]');
$drop = new Link();
$drop->setHref('controller.php?cmd=drop_db&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&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);