當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。