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


PHP Schema::setName方法代码示例

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


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

示例1: getTablePage

 public function getTablePage($tableId)
 {
     $entity = new Schema();
     $entity->setName($tableId);
     $entity->setCollation("latin1_bin");
     $entity->setEngine(Engine::MYISAM());
     $entity->setType(Type::TABLE());
     return $entity;
 }
开发者ID:addiks,项目名称:phpsql,代码行数:9,代码来源:Indicies.php

示例2: find

 function find($tag)
 {
     foreach ($this->objs as $index => $obj) {
         if ($this->lastfind && $index != $this->lastfind) {
             continue;
         }
         if ($this->lastfind) {
             if ($obj->multiple() && $this->lastfind == $index) {
                 if ($test = $obj->findTag($tag)) {
                     return $test;
                 }
             }
             $this->lastfind = false;
             continue;
         }
         if ($obj->type === 'any') {
             if (($tag & 0x80) === 0x80) {
                 // context-sensitive tag, do best guess
                 if (($tag & 0x20) == 0x20) {
                     $tag = Sequence::TAG;
                 } else {
                     $tag = OctetString::TAG;
                 }
             }
             if (!isset($this->tagMap[$tag])) {
                 throw new Exception('Unknown tag: ' . dechex($tag) . ' at ' . $this->path());
             }
             $type = $this->tagMap[$tag];
             $ret = new Schema($this->parent, $tag, $type);
             $ret->setName($obj->name);
             $this->lastfind = $index;
             return $ret;
         }
         if ($test = $obj->findTag($tag)) {
             $this->lastfind = $index;
             if ($test->name != $index) {
                 $test = clone $test;
                 $test->setName($index);
             }
             return $test;
         }
         if (!$obj->optional()) {
             if (isset($this->tagMap[$tag])) {
                 $tag = '"' . str_replace('Pyrus\\DER\\', '', $this->tagMap[$tag]) . '" (0x' . dechex($tag) . ')';
             } else {
                 $tag = dechex($tag);
             }
             throw new Exception('Invalid DER document, required tag ' . $index . ' not found, instead requested ' . 'tag value ' . $tag . ' at ' . $this->path());
         }
     }
     if (isset($this->tagMap[$tag])) {
         $tag = '"' . str_replace('Pyrus\\DER\\', '', $this->tagMap[$tag]) . '" (0x' . dechex($tag) . ')';
     } else {
         $tag = dechex($tag);
     }
     throw new Exception('Invalid DER document, no matching elements for tag ' . $tag . ' at ' . $this->path());
 }
开发者ID:helgi,项目名称:Pyrus,代码行数:57,代码来源:Schema.php

示例3: run_import_list


//.........这里部分代码省略.........
            if ('vocab' == $type) {
                // Get array of heading names found
                $headings = $reader->getHeadings();
                $fields   = VocabularyPeer::getFieldNames();

                try {
                    while ($row = $reader->getRow()) {
                        //        lookup the URI (or the OMR ID if available) for a match
                        if (empty($row["VES"])) {
                            //skip this one
                            break;
                        }

                        $uri        = $baseDomain . $row["VES"] . "#";
                        $vocab      = VocabularyPeer::getVocabularyByUri($uri);
                        $updateTime = time();

                        if (! $vocab) {
                            //          create a new concept or element
                            $vocab = new Vocabulary();
                            $vocab->setUri($uri);
                            $vocab->setCreatedAt($updateTime);
                            $vocab->setCreatedUserId($userId);
                            $vocab->setAgentId($agentID);
                            $vocab->setBaseDomain($baseDomain);
                            $vocab->setCommunity("Libraries, MARC21");
                            $vocab->setLanguage("en");
                            $vocab->setStatusId(1);
                        } else {
                            $vocab->setLastUpdated($updateTime);
                            $vocab->setUpdatedUserId($userId);
                        }

                        $vocab->setName(fixEncoding(rtrim($row['Name'])));
                        $vocab->setNote(fixEncoding(rtrim($row['Note'])));
                        $vocab->setToken($row['VES']);
                        $vocab->save();

                        //type
                        $args[0] = "vocab";
                        //vocabid
                        $args[2] = $vocab->getId();
                        //filepath
                        $args[1] = $GLOBALS['uploadPath'] . $row['VES'] . ".csv";
                        $args[3] = $batchId;
                        $args[4] = "-d";

                        run_import_vocabulary($importTask, $args);
                        $foo = $vocab->countConcepts();
                    }
                } catch(Exception $e) {
                    throw new Exception($e);
                }
            } else //it's a schema
            {
                try {
                    while ($row = $reader->getRow()) {

                        //NOTE: this is explicitly tuned to a particular import file
                        //TODO: generalize this import mapping

                        // lookup the URI (or the OMR ID if available) for a match
                        if (empty($row["URI"])) {
                            //skip this one
                            break;
                        }
开发者ID:jonphipps,项目名称:Metadata-Registry,代码行数:67,代码来源:importVocabulary.php

示例4: registerView

 public function registerView($viewName)
 {
     $schemaPage = new Schema();
     $schemaPage->setName($name);
     $schemaPage->setType(Type::VIEW());
     $indexFile = $this->getSchemaIndexFile();
     $indexFile->addData($schemaPage->getData());
 }
开发者ID:addiks,项目名称:phpsql,代码行数:8,代码来源:DatabaseSchema.php


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