PageRenderTime 29ms CodeModel.GetById 21ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 1ms

/plugin/PBAPI/PBAPI/Methods/media.php

https://bitbucket.org/chamilo/chamilo-ext-repo-photobucket-dev/
PHP | 133 lines | 54 code | 12 blank | 67 comment | 3 complexity | 5f5b1f5a8b6e55a4f8eac113981254c0 MD5 | raw file
  1<?php
  2use common\libraries\Path;
  3/**
  4 * Photobucket API 
  5 * Fluent interface for PHP5
  6 * Media methods
  7 * 
  8 * @author Photobucket
  9 * @package PBAPI
 10 * @subpackage Methods
 11 * 
 12 * @copyright Copyright Copyright (c) 2008, Photobucket, Inc.
 13 * @license http://www.opensource.org/licenses/mit-license.php The MIT License
 14 */
 15
 16/**
 17 * Load Methods parent
 18 */
 19require_once dirname(__FILE__) . '/../Methods.php';
 20
 21/**
 22 * Media methods
 23 *
 24 * @package PBAPI
 25 * @subpackage Methods
 26 */
 27class PBAPI_Methods_media extends PBAPI_Methods
 28{
 29
 30    /**
 31     * description
 32     *
 33     * @param array $params
 34     */
 35    public function description($params = null)
 36    {
 37        $this->core->_setParamList($params);
 38        $this->core->_appendUri('/description');
 39    }
 40
 41    /**
 42     * Title
 43     *
 44     * @param array $params
 45     */
 46    public function title($params = null)
 47    {
 48        $this->core->_setParamList($params);
 49        $this->core->_appendUri('/title');
 50    }
 51
 52    /**
 53     * Tag
 54     *
 55     * @param int $tagid [optional, default=all] tag id, '' for all tags
 56     * @param array $params array(...)
 57     */
 58    public function tag($tagid = '', $params = null)
 59    {
 60        if (is_array($tagid) && $params == null)
 61        {
 62            $params = $tagid;
 63            $tagid = '';
 64        }
 65        $this->core->_appendUri('/tag/%s', $tagid);
 66        $this->core->_setParamList($params);
 67    }
 68
 69    /**
 70     * resize
 71     *
 72     * @param array $params
 73     */
 74    public function resize($params)
 75    {
 76        $this->core->_setParamList($params);
 77        $this->core->_appendUri('/resize');
 78    }
 79
 80    /**
 81     * Rotate
 82     *
 83     * @param array $params
 84     */
 85    public function rotate($params)
 86    {
 87        $this->core->_setParamList($params);
 88        $this->core->_appendUri('/rotate');
 89    }
 90
 91    /**
 92     * Metadata
 93     *
 94     * @param array $params
 95     */
 96    public function meta($params = null)
 97    {
 98        $this->core->_appendUri('/meta');
 99    }
100
101    /**
102     * Links
103     *
104     * @param array $params
105     */
106    public function links($params = null)
107    {
108        $this->core->_appendUri('/link');
109    }
110
111    /**
112     * related search
113     *
114     * @param array $params
115     */
116    public function related($params = null)
117    {
118        $this->core->_setParamList($params);
119        $this->core->_appendUri('/related');
120    }
121
122    /**
123     * Share
124     *
125     * @param array $params
126     */
127    public function share($params)
128    {
129        $this->core->_setParamList($params);
130        $this->core->_appendUri('/share');
131    }
132
133}