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


PHP self::cp方法代码示例

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


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

示例1: parse

 public static function parse($response)
 {
     if (!is_array($response)) {
         Tag::setof($response, $response, "hash");
     }
     $obj = new self();
     return $obj->cp($response);
 }
开发者ID:hisaboh,项目名称:w2t,代码行数:8,代码来源:TwitterLimitStatus.php

示例2: parse

 public static function parse($response)
 {
     if (!is_array($response)) {
         $response = Text::parse_json($response);
     }
     $obj = new self();
     return $obj->cp($response);
 }
开发者ID:hisaboh,项目名称:w2t,代码行数:8,代码来源:WassrUser.php

示例3: parse_list

 public static function parse_list($response)
 {
     $result = array();
     $res = Text::parse_json($response);
     foreach ($res as $re) {
         $obj = new self();
         $result[] = $obj->cp($re);
     }
     return $result;
 }
开发者ID:hisaboh,项目名称:w2t,代码行数:10,代码来源:WassrTodo.php

示例4: parse_update

 public static function parse_update($response)
 {
     $result = array();
     $re = Text::parse_json($response);
     if (isset($re["error"])) {
         throw new Exception($res["error"]);
     }
     $obj = new self();
     return $obj->cp($re);
 }
开发者ID:hisaboh,项目名称:w2t,代码行数:10,代码来源:WassrChannelMessage.php

示例5: parse

 public static function parse($response)
 {
     if (Tag::setof($tag, $response, "err")) {
         throw new Exception($tag->inParam("msg"));
     }
     if (Tag::setof($tag, $response, "rsp")) {
         $obj = new self();
         return $obj->cp($tag->hash());
     }
     throw new InvalidArgumentException();
 }
开发者ID:hisaboh,项目名称:w2t,代码行数:11,代码来源:TwitpicResponse.php

示例6: parse

 public static function parse($response)
 {
     if (!is_array($response)) {
         if (Tag::setof($tag, $response, "error")) {
             throw new Exception($tag->value());
         }
         Tag::setof($tag, $response, "user");
         $response = $tag->hash();
     }
     $obj = new self();
     return $obj->cp($response);
 }
开发者ID:hisaboh,项目名称:w2t,代码行数:12,代码来源:TwitterUser.php

示例7: parse_list

 public static function parse_list($response)
 {
     $result = array();
     if (Tag::setof($tag, $response, "info")) {
         foreach ($tag->in("photo") as $photo) {
             $obj = new self();
             $result[] = $obj->cp($photo->hash());
         }
     } else {
         throw new Exception("Invalid data");
     }
     return $result;
 }
开发者ID:hisaboh,项目名称:w2t,代码行数:13,代码来源:PhotozouSearchResult.php

示例8: parse

 public static function parse($response)
 {
     if (Tag::setof($tag, $response, "error")) {
         throw new Exception($tag->value());
     }
     if (Tag::setof($tag, $response, "status")) {
         $hash = $tag->hash();
         $obj = new self();
         $obj->user(TwitterUser::parse($hash["user"]));
         unset($hash["user"]);
         return $obj->cp($hash);
     }
     throw new Exception("invalid data");
 }
开发者ID:hisaboh,项目名称:w2t,代码行数:14,代码来源:TwitterMessage.php

示例9: parse_list

 public static function parse_list($response)
 {
     $result = array();
     if (Tag::setof($tag, $response, "error")) {
         throw new Exception($tag->f("message.value()"));
     }
     if (Tag::setof($tag, $response, "programs")) {
         foreach ($tag->in("program") as $program) {
             $obj = new self();
             $result[] = $obj->cp($program->hash());
         }
     }
     return $result;
 }
开发者ID:hisaboh,项目名称:w2t,代码行数:14,代码来源:NtvProgramResult.php

示例10: parse_list

 public static function parse_list($response)
 {
     $result = array();
     if (Tag::setof($tag, $response, "photos")) {
         foreach ($tag->in("photo") as $photo) {
             $obj = new self();
             $params = array();
             foreach ($photo->arParam() as $param) {
                 $params[$param[0]] = $param[1];
             }
             $result[] = $obj->cp($params);
         }
     }
     return $result;
 }
开发者ID:hisaboh,项目名称:w2t,代码行数:15,代码来源:FlickerSearchResult.php

示例11: parse_list

 public static function parse_list($response)
 {
     $result = array();
     $res = Text::parse_json($response);
     if (!isset($res)) {
         throw new Exception($response);
     }
     if (isset($res["channels"])) {
         foreach ($res["channels"] as $re) {
             $obj = new self();
             $result[] = $obj->cp($re);
         }
     }
     return $result;
 }
开发者ID:hisaboh,项目名称:w2t,代码行数:15,代码来源:WassrChannel.php

示例12: parse_list

 public static function parse_list($response)
 {
     $result = array();
     $res = Text::parse_json($response);
     if (!isset($res)) {
         throw new Exception($response);
     }
     foreach ($res as $re) {
         $obj = new self();
         $obj->user(WassrUser::parse($re["user"]));
         unset($re["user"]);
         $result[] = $obj->cp($re);
     }
     return $result;
 }
开发者ID:hisaboh,项目名称:w2t,代码行数:15,代码来源:WassrMessage.php

示例13: parse

 public static function parse($response)
 {
     if (Tag::setof($tag, $response, "error")) {
         throw new Exception($tag->value());
     }
     $result = array();
     if (Tag::setof($tag, $response, "direct_message")) {
         $re = $status->hash();
         $obj = new self();
         $obj->sender(TwitterUser::parse($re["sender"]));
         $obj->recipient(TwitterUser::parse($re["recipient"]));
         unset($re["recipient"], $re["sender"]);
         return $obj->cp($re);
     }
     throw new Exception("invalid data");
 }
开发者ID:hisaboh,项目名称:w2t,代码行数:16,代码来源:TwitterDirectMessage.php

示例14: request

 /**
  * RequestのPaginator
  * @param \ebi\Request $req
  * @param integer $default_paginate_by
  * @param integer $max_paginate_by
  * @return \ebi\Paginator
  */
 public static function request(\ebi\Request $req, $default_paginate_by = 20, $max_paginate_by = 100)
 {
     $paginate_by = $req->in_vars('paginate_by', $default_paginate_by);
     if ($paginate_by > $max_paginate_by) {
         $paginate_by = $max_paginate_by;
     }
     $self = new self($paginate_by, $req->in_vars('page', 1));
     if ($req->is_vars('order')) {
         $o = $req->in_vars('order');
         $p = $req->in_vars('porder');
         if ($o == $p) {
             if ($o[0] == '-') {
                 $o = substr($o, 1);
             } else {
                 $o = '-' . $o;
             }
             $req->vars('order', $o);
         }
         $self->order($o);
     }
     $self->cp($req->ar_vars());
     return $self;
 }
开发者ID:tokushima,项目名称:ebi,代码行数:30,代码来源:Paginator.php


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