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


PHP Field::setName方法代码示例

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


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

示例1: setName

 public function setName($name)
 {
     parent::setName($name);
     $this->mainSelectionList->setId($name . "_main");
     $this->subSelectionList->setName($name);
     return $this;
 }
开发者ID:9naQuame,项目名称:wyf,代码行数:7,代码来源:RelationsField.php

示例2: _parseFields

 private function _parseFields($results)
 {
     $response = array();
     foreach ($results as $result) {
         $field = new Field();
         $field->setName($result["Field"]);
         $field->setType($result["Type"]);
         $field->setPk($result["Key"] == 'PRI');
         $response[] = $field;
     }
     return $response;
 }
开发者ID:jeanlopes,项目名称:mostra-ifrs-poa,代码行数:12,代码来源:mysql.php

示例3: _parseFields

 private function _parseFields($results, $pk)
 {
     $response = array();
     foreach ($results as $result) {
         $field = new Field();
         $field->setName($result["field"]);
         $field->setType($result["type"]);
         $field->setPk($result["field"] == $pk["col"]);
         $response[] = $field;
     }
     return $response;
 }
开发者ID:jeanlopes,项目名称:mostra-ifrs-poa,代码行数:12,代码来源:postgre.php

示例4: getTableFields

 /**
  * Generate random table fields to test
  **/
 private function getTableFields()
 {
     require_once APPPATH . "libraries/scaffolder/drivers/field.php";
     $id = new Field();
     $id->setName("id");
     $id->setPk(true);
     $nome = new Field();
     $nome->setName("nome");
     $alias = new Field();
     $alias->setName("alias");
     $estado = new Field();
     $estado->setName("estado_id");
     return array($id, $nome, $alias, $estado);
 }
开发者ID:jeanlopes,项目名称:mostra-ifrs-poa,代码行数:17,代码来源:tests.php

示例5: Field

 /**
  * Get a field, creating it if necessary.
  * @param $fieldName string
  * @param $schemaPlugin string
  * @return object Field
  */
 function &buildField($fieldName, $schemaPluginName)
 {
     $field =& $this->getFieldByName($fieldName, $schemaPluginName);
     if (!$field) {
         $schemaDao = DAORegistry::getDAO('SchemaDAO');
         $schema =& $schemaDao->buildSchema($schemaPluginName);
         $field = new Field();
         $field->setName($fieldName);
         $field->setSchemaId($schema->getSchemaId());
         $plugin =& $field->getSchemaPlugin();
         if (!$plugin) {
             fatalError('Unknown schema plugin "' . $schemaPlugin . '"!');
         }
         if (!in_array($fieldName, $plugin->getFieldList())) {
             // This field doesn't actually exist -- return null.
             unset($field);
             $field = null;
             return $field;
         }
         $this->insertField($field);
     }
     return $field;
 }
开发者ID:Rygbee,项目名称:harvester,代码行数:29,代码来源:FieldDAO.inc.php

示例6: isField

 /**
  * 
  * @param array $rows
  * @param integer $index
  */
 public static function isField($rows, $index)
 {
     if (strstr($rows[$index], "@var")) {
         $field = new Field(self::removeComments($rows[$index], "@var"));
         $index++;
         while (!strstr($rows[$index], "*/")) {
             $row = $rows[$index];
             foreach (self::$types as $type => $method) {
                 if (strstr($row, $type)) {
                     $field->{$method}(self::removeComments($row, $type));
                 }
             }
             $index++;
         }
         $field->setName(trim(str_replace("protected \$", "", str_replace(";", "", $rows[$index + 1]))));
         return $field;
     } else {
         return false;
     }
 }
开发者ID:Zanej,项目名称:cms,代码行数:25,代码来源:Field.php

示例7: setName

 /**
  * Sets name for fields, applies mask to dbName creation
  * @param string $name
  */
 public function setName($name)
 {
     parent::setName($name);
     $this->dbName = null;
 }
开发者ID:Edke,项目名称:PerfORM,代码行数:9,代码来源:ForeignKeyField.php

示例8: field

 /**
  * @param $name
  * @return Field
  */
 public function field($name)
 {
     $field = new Field();
     $field->setName($name)->setGroup($this->group);
     $this->setField($field);
     return $field;
 }
开发者ID:theshadow,项目名称:sliq,代码行数:11,代码来源:Conditional.php

示例9: setFields

 public function setFields(Field $field)
 {
     $this->addItem($field->setName(self::FIELD_KEY));
     return $this;
 }
开发者ID:RichardAnthonyLee,项目名称:cms-gen,代码行数:5,代码来源:Section.php

示例10: createValidation

 /**
  * Descricao : Metodo responsavel por mapear os nodos fields de cada acao. 
  * Este metodo retorna um array de objetos fields que serao validados posteriormente.
  * 
  * @param  Um nodo <field>
  * @return Um array de objetos Field
  */
 private function createValidation($node)
 {
     $fieldArray = array();
     if ($node->hasChildNodes()) {
         $fields = $node->childNodes;
         foreach ($fields as $field) {
             $fieldObject = new Field();
             if ($field->nodeName == "field") {
                 if ($field->hasAttribute("name")) {
                     $name = $field->getAttribute("name");
                     $fieldObject->setName($name);
                 }
                 if ($field->hasAttribute("method")) {
                     $method = $field->getAttribute("method");
                     $fieldObject->setMethod($method);
                 }
                 if ($field->hasAttribute("validationType")) {
                     $validationType = $field->getAttribute("validationType");
                     $fieldObject->setValidationType($validationType);
                 }
                 $fieldArray[] = $fieldObject;
             }
         }
     }
     return $fieldArray;
 }
开发者ID:rodrigoprestesmachado,项目名称:whiteboard,代码行数:33,代码来源:ActionDom.php


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