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


PHP Input::setName方法代码示例

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


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

示例1: testGetName

 /**
  * Test setting and getting the name
  */
 public function testGetName()
 {
     $ret = $this->input->setName('foo');
     $this->assertSame($this->input, $ret);
     $this->assertSame('foo', $this->input->getName());
     $this->assertSame('foo', $this->input->getAttr('name'));
 }
开发者ID:sachsy,项目名称:formbuilder,代码行数:10,代码来源:InputTest.php

示例2: __construct

 /**
  * Método construtor
  * @param string $name Nome do campo
  * @param string $value Valor do campo
  * @param string $label Legenda do campo
  */
 public function __construct($name, $value, $label)
 {
     parent::setName($name);
     parent::setValue($value);
     parent::setLabel($label);
     parent::setType('text');
 }
开发者ID:fernandopetry,项目名称:pwork,代码行数:13,代码来源:Text.php

示例3: testVerificaSeOsDadosForamInseridos

 public function testVerificaSeOsDadosForamInseridos()
 {
     $input = new Input();
     $input->setType("text");
     $input->setId("inputUsuario");
     $input->setName("usuario");
     $input->setClass("form-control");
     $input->setProtected("protected");
     $input->setLabel("Usuário");
     $input->setAlert("Erro no field.");
     $input->setValue("valor");
     $this->assertEquals("text", $input->getType());
     $this->assertEquals("inputUsuario", $input->getId());
     $this->assertEquals("usuario", $input->getName());
     $this->assertEquals("form-control", $input->getClass());
     $this->assertEquals("protected", $input->getProtected());
     $this->assertEquals("Usuário", $input->getLabel());
     $this->assertEquals("Erro no field.", $input->getAlert());
     $this->assertEquals("valor", $input->getValue());
 }
开发者ID:joohnsro,项目名称:TestesAutomatizadosProjFinal,代码行数:20,代码来源:InputTest.php

示例4: Input

/**
 * [type] file
 * [name] form_base.php
 * [package] psa
 * [since] 2010.09.22 -ok
 */
$inp_dir = new Input();
$inp_dir->setName('directory');
$inp_dir->setSize(50);
$inp_dir->setValue($result->directory);
$inp_ext = new Input();
$inp_ext->setName('extension');
$inp_ext->setSize(10);
$inp_ext->setValue($result->extension);
$inp_lines = new Input();
$inp_lines->setName('nr_rows');
$inp_lines->setSize(7);
$inp_lines->setValue($result->nr_rows);
$form = new Form();
$form->setAction('controller.php');
$form->build();
$table = new Table();
$table->build();
$tr = new Tr();
$tr->add('Directory : ');
$tr->add($inp_dir->dump());
$tr->add($cmd->dump());
$tr->build();
$tr = new Tr();
$tr->add('Extension : ');
$tr->add($inp_ext->dump());
开发者ID:broozer,项目名称:psa,代码行数:31,代码来源:form_base.php

示例5: Input

$tr->build();
foreach ($res as $item) {
    $colname = $col[$i];
    if ($colname == 'id') {
        ++$i;
        continue;
    }
    // $length = strlen($item);
    $size = 50;
    /*
    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();
开发者ID:broozer,项目名称:psa,代码行数:31,代码来源:edit_record.php

示例6: setcookie

    }
} else {
    setcookie('testcookie', 'gone', time() - 3600);
    header('location: login.php');
    exit;
}
$sessie = new Session();
$valgeld = $sessie->getS('psa-valid');
if ($valgeld !== 'jaja') {
    header('location: login.php');
    exit;
}
$psa = new LitePDO('sqlite:./data/base.sqlite');
$q = "SELECT * FROM base";
$psa->qo($q);
$result = $psa->fo_one();
if (!$sessie->isS('psa-ext')) {
    $sessie->setS('psa-ext', $result->extension);
}
if (!$sessie->isS('psa-dir')) {
    $sessie->setS('psa-dir', $result->directory);
}
define('LIMIT', $result->nr_rows);
unset($psa);
$req = new Request();
$submit = new Input();
$submit->setName('submit');
$submit->setType('submit');
$cmd = new Input();
$cmd->setName('cmd');
$cmd->setType('hidden');
开发者ID:broozer,项目名称:psa,代码行数:31,代码来源:autoload.php

示例7: setcookie

        // echo 'haai';
        $sessie->setS('psa-valid', 'jaja');
        /**/
        setcookie('testcookie', time(), time() + 300);
        header('location: controller.php');
        exit;
        /**/
    }
}
$submit->setValue('Let\'s go');
$inp_naam = new Input();
$inp_naam->setName('name');
$inp_naam->setSize(20);
$inp_naam->setAutofocus(true);
$inp_pass = new Input();
$inp_pass->setName('geheim');
$inp_pass->setType('password');
$inp_pass->setSize(20);
$html = new Page();
$html->setLanguage('nl-nl');
$html->build();
$head = new Head();
$head->setTitle('PSA - login');
$head->setCss('./css/psa.css');
$head->setJs('./js/PSA.js');
$head->build();
$body = new Body();
$body->build();
$body->line('<h3>PHP SQLite Admin tool - log in</h3>');
$form = new Form();
$form->setAction('login.php');
开发者ID:broozer,项目名称:psa,代码行数:31,代码来源:login.php

示例8: Input

$form->setJs(' onsubmit="return PSA.indexcol();" ');
$form->build();
// TODO: check if table name already exists
$name = new Input();
$name->setName('idxname');
$name->setSize(50);
$name->setMaxlength(128);
$name->setId('idxname');
$body->line('Name : ' . $name->dump() . ' ' . $cmd->dump() . '<br>');
for ($i = 0; $i < sizeof($fields); ++$i) {
    $select = new Select();
    $select->setName('col' . $i);
    $select->setSize(1);
    $select->add('', '-');
    for ($j = 0; $j < sizeof($fields); ++$j) {
        $select->add($fields[$j], $fields[$j]);
    }
    $body->line('index on : ' . $select->dump() . '<br>');
}
$submit->build();
$tblname = new Input();
$tblname->setName('tblname');
$tblname->setSize(128);
$tblname->setValue($req->get('table'));
$tblname->setType('hidden');
$tblname->build();
unset($form);
$body->line('</div>');
include_once './inc/footer.php';
unset($body);
unset($html);
开发者ID:broozer,项目名称:psa,代码行数:31,代码来源:index_add.php

示例9: Input

$colsize->setSize(7);
$colsize->setMaxlength(7);
$colsize->setId('colsize');
$colsize->setJs(' onblur="PSA.checknumeric();" ');
$colnull = new Input();
$colnull->setName('colnull');
$colnull->setType('checkbox');
$colnull->setId('colnull');
$coldefault = new Input();
$coldefault->setName('coldefault');
$coldefault->setSize(25);
$coldefault->setMaxlength(128);
$coldefault->setId('coldefault');
$fieldadd = new Input();
$fieldadd->setType('button');
$fieldadd->setName('fieldadd');
$fieldadd->setValue('add');
$fieldadd->setJs(' onclick="PSA.addField();" ');
$tr = new Tr();
$tr->add($colname->dump());
$tr->add($coltype->dump());
$tr->setClas('center');
$tr->add($colprime->dump());
$tr->setClas('center');
$tr->add($colsize->dump());
$tr->setClas('center');
$tr->add($colnull->dump());
$tr->add($coldefault->dump());
$tr->add($fieldadd->dump());
$tr->build();
unset($table);
开发者ID:broozer,项目名称:psa,代码行数:31,代码来源:table_add.php

示例10: Page

    exit;
}
$html = new Page();
$html->setLanguage('nl_NL');
$html->build();
$head = new Head();
$head->setCharset('UTF-8');
$head->setTitle('PSA - connection');
$head->setCss('./css/psa.css');
$head->setJs('./js/PSA.js');
$head->build();
$body = new Body();
$body->build();
include_once './inc/menubar.php';
$inp_db = new Input();
$inp_db->setName('newdb');
$inp_db->setSize(25);
$inp_db->setMaxlength(128);
$submit->setValue('Create');
$submit->setClas('button');
$cmd->setValue('create_db');
$form = new Form();
$form->setAction('controller.php');
$form->build();
$table = new Table();
$table->build();
$tr = new Tr();
$tr->add('New database : ');
$tr->add($inp_db->dump());
$tr->add($submit->dump());
$tr->add($cmd->dump());
开发者ID:broozer,项目名称:psa,代码行数:31,代码来源:base.php

示例11: Input

$tr->add($cmd->dump());
$tr->build();
foreach ($col as $item) {
    if ($item == 'id') {
        ++$i;
        continue;
    }
    // $length = strlen($item);
    $size = 50;
    /*
    if($length < 10) {
    	$size = 10;
    }
    */
    $inp = new Input();
    $inp->setName($item);
    // $inp->setValue($item);
    $inp->setSize(50);
    $inp->setMaxlength(128);
    /**/
    $tr = new Tr();
    $tr->add($item);
    $tr->add($inp->dump());
    $tr->build();
    ++$i;
    /**/
}
$tr = new Tr();
$tr->add('&nbsp;');
$tr->add($submit->dump());
$tr->build();
开发者ID:broozer,项目名称:psa,代码行数:31,代码来源:record_add.php


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