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


PHP Type::String方法代码示例

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


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

示例1: build

 public static function build()
 {
     $ValueType = new ObjectType(['name' => 'Value', 'description' => 'Value', 'fields' => ['id' => ['type' => new NonNull(Type::int()), 'description' => 'The id of the value.'], 'atri_id' => ['type' => Type::int(), 'description' => 'The attribute ... //#注:代码行过长, 已省略后续字符...
     $RelationType = new ObjectType(['name' => 'Relation', 'description' => 'Relation Instance', 'fields' => ['id' => ['type' => new NonNull(Type::int()), 'description' => 'The id of the relation.'], 'tag' => ['type' => new NonNull(Type::string()) ... //#注:代码行过长, 已省略后续字符...
         return Type::listOf($InstanceType);
     }, 'description' => 'The related children or parents of this relation.', 'args' => ['filter' => ['name' => 'filter', 'description' => 'filter some fields all|detail|resume default all', 'type' => Type::String()], 'lang' => ['name' => 'lang',  ... //#注:代码行过长, 已省略后续字符...
         //echo "ARGS ABANS DEL GETRELATED\n";
         //print_r($relation['args']);
         //echo "PARENT ARGS ABANS DEL GETRELATED\n";
         $insts = EditoraData::getRelated($relation['direction'], $relation['id'], $relation['inst_id'], $relation['args'], null);
         //echo "Instancies despres del GetRelated\n";
         //print_r($insts);
         if ($insts && !empty($insts[0])) {
             return $insts;
         }
         return null;
     }]]]);
     $InstanceListType = new ObjectType(['name' => 'instance_list', 'description' => 'Instance List', 'fields' => ['ids' => ['type' => new NonNull(Type::string()), 'description' => 'The ids of the instances.'], 'language' => ['type' => Type::strin ... //#注:代码行过长, 已省略后续字符...
         return Type::listOf($InstanceType);
     }, 'description' => 'The instances list', 'args' => ['filter' => ['name' => 'filter', 'description' => 'filter some fields all|detail|resume default all', 'type' => Type::String()], 'lang' => ['name' => 'lang', 'description' => 'Language of t ... //#注:代码行过长, 已省略后续字符...
         //echo "instance resolve\n";
         //print_r($class);
         $insts = EditoraData::getInstancesList($args, $instance_list['args']);
         //echo "attrs\n";
         //print_r($insts);
         if ($insts) {
             return $insts;
         }
         return null;
     }]]]);
     $ClassType = new ObjectType(['name' => 'class', 'description' => 'Class', 'fields' => ['class_id' => ['type' => new NonNull(Type::int()), 'description' => 'The id of the class.'], 'tag' => ['type' => new NonNull(Type::string()), 'description' ... //#注:代码行过长, 已省略后续字符...
         return Type::listOf($InstanceType);
     }, 'description' => 'The instances of this class.', 'args' => ['filter' => ['name' => 'filter', 'description' => 'filter some fields all|detail|resume default all', 'type' => Type::String()], 'lang' => ['name' => 'lang', 'description' => 'Lan ... //#注:代码行过长, 已省略后续字符...
         //echo "instance resolve\n";
         //print_r($class);
         $insts = EditoraData::getInstacesOfClass($class['class_id'], $class, $args, $class['args']);
         //echo "attrs\n";
         //print_r($insts);
         if ($insts) {
             return $insts;
         }
         return null;
     }]]]);
     $SearchType = new ObjectType(['name' => 'search', 'description' => 'Search', 'fields' => ['query' => ['type' => new NonNull(Type::string()), 'description' => 'search query'], 'class_id' => ['type' => Type::int(), 'description' => 'The id of t ... //#注:代码行过长, 已省略后续字符...
         return Type::listOf($InstanceType);
     }, 'description' => 'The instances of this class.', 'args' => ['filter' => ['name' => 'filter', 'description' => 'filter some fields all|detail|resume default all', 'type' => Type::String()], 'lang' => ['name' => 'lang', 'description' => 'Lan ... //#注:代码行过长, 已省略后续字符...
         //echo "instance resolve\n";
         //print_r($search);
         $insts = EditoraData::getInstacesOfSearch($search['query'], $search, $args, $search['args']);
         //echo "attrs\n";
         //print_r($insts);
         if ($insts) {
             return $insts;
         }
         return null;
     }]]]);
     $InstanceType = new ObjectType(['name' => 'Instance', 'description' => 'Instance of any class', 'fields' => ['id' => ['type' => new NonNull(Type::int()), 'description' => 'The id of instance.'], 'class_id' => ['type' => Type::int(), 'descript ... //#注:代码行过长, 已省略后续字符...
         //print_r($args);
         //echo "Instance in EditoraSchema vaig a treure els values\n";
         //print_r($instance);
         if (isset($instance) && isset($instance['id']) && isset($instance['update_timestamp']) && isset($instance['args'])) {
             $attrs = EditoraData::getValues($instance['id'], $instance['update_timestamp'], $args, $instance['args']);
             //print_r($attrs);
             if ($attrs) {
                 return $attrs;
             }
         }
         return null;
     }], 'relation1' => ['type' => Type::listOf($RelationType), 'description' => 'The children of the instance.', 'args' => ['tag' => ['name' => 'tag', 'description' => 'tag of the relation', 'type' => new NonNull(Type::String())], 'alias' => ['na ... //#注:代码行过长, 已省略后续字符...
         //echo "aqui tinc aquests args\n";
         //print_r($args);
         if (isset($instance) && isset($instance['id']) && isset($instance['class_id']) && isset($instance['args'])) {
             $related = EditoraData::getRelations($instance['id'], $instance['class_id'], $args, $instance['args']);
             //print_r($related);
             if ($related) {
                 return $related;
             }
         }
         return null;
     }], 'relation2' => ['type' => Type::listOf($RelationType), 'description' => 'The children of the instance.', 'args' => ['tag' => ['name' => 'tag', 'description' => 'tag of the relation', 'type' => new NonNull(Type::String())], 'alias' => ['na ... //#注:代码行过长, 已省略后续字符...
         if (isset($instance) && isset($instance['id']) && isset($instance['class_id']) && isset($instance['args'])) {
             $related = EditoraData::getRelations($instance['id'], $instance['class_id'], $args, $instance['args']);
             //print_r($related);
             if ($related) {
                 return $related;
             }
         }
         return null;
     }], 'relation3' => ['type' => Type::listOf($RelationType), 'description' => 'The children of the instance.', 'args' => ['tag' => ['name' => 'tag', 'description' => 'tag of the relation', 'type' => new NonNull(Type::String())], 'alias' => ['na ... //#注:代码行过长, 已省略后续字符...
         if (isset($instance) && isset($instance['id']) && isset($instance['class_id']) && isset($instance['args'])) {
             $related = EditoraData::getRelations($instance['id'], $instance['class_id'], $args, $instance['args']);
             //print_r($related);
             if ($related) {
                 return $related;
             }
         }
         return null;
     }], 'relation4' => ['type' => Type::listOf($RelationType), 'description' => 'The children of the instance.', 'args' => ['tag' => ['name' => 'tag', 'description' => 'tag of the relation', 'type' => new NonNull(Type::String())], 'alias' => ['na ... //#注:代码行过长, 已省略后续字符...
         if (isset($instance) && isset($instance['id']) && isset($instance['class_id']) && isset($instance['args'])) {
             $related = EditoraData::getRelations($instance['id'], $instance['class_id'], $args, $instance['args']);
//.........这里部分代码省略.........
开发者ID:omatech,项目名称:editora-extractor,代码行数:101,代码来源:EditoraSchema.php


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