Skip to content

Commit e87b973

Browse files
const-cloudinaryYomesInccloudinarazronronshaiko
committed
Version 2.0.0-beta2
Co-authored-by: RTLCoil <oleg@rtl.co.il> Co-authored-by: Raz Ziv <raz.ziv@cloudinary.com> Co-authored-by: Ron <ron@cloudinary.com>
1 parent 2cef7aa commit e87b973

File tree

306 files changed

+4090
-1788
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

306 files changed

+4090
-1788
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ phpdocs/
66
.idea
77
dbfile.db
88
*.bak
9+
sami.phar

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2+
2.0.0-beta2 / 2020-06-01
3+
========================
4+
5+
* The second public beta of Cloudinary PHP v2
6+
17
2.0.0-beta / 2020-03-24
28
===================
39

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cloudinary/cloudinary_php",
3-
"version": "2.0.0-beta",
3+
"version": "2.0.0-beta2",
44
"description": "Cloudinary PHP SDK v2",
55
"keywords": [
66
"cloudinary",
@@ -10,7 +10,7 @@
1010
"cdn"
1111
],
1212
"type": "library",
13-
"homepage": "https://github.com/cloudinary/cloudinary_php",
13+
"homepage": "https://github.com/cloudinary/cloudinary_php/tree/2.0.0-beta",
1414
"minimum-stability": "stable",
1515
"license": "MIT",
1616
"authors": [

docs/CloudinaryFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ public function acceptMethod(MethodReflection $method)
4747
*/
4848
public function acceptProperty(PropertyReflection $property)
4949
{
50-
return $property->isPublic()&& ! $property->getTags(self::INTERNAL);
50+
return $property->isPublic() && ! $property->getTags(self::INTERNAL);
5151
}
5252
}

docs/sami_config.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
'theme' => 'cloudinary',
1515
'template_dirs' => [$docsDir . 'themes'],
1616
'title' => 'Cloudinary PHP SDK v2',
17+
'version' => '2.0.0-beta2',
1718
'build_dir' => $docsDir . 'build',
1819
'cache_dir' => $docsDir . 'cache',
19-
'default_opened_level' => 2,
20+
'default_opened_level' => 1,
2021
'filter' => new CloudinaryFilter(),
2122
]
2223
);

docs/themes/cloudinary/css/cloudinary.css

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
html, body, #content {
22
height: 100%;
3-
font-family: "Montserrat", Helvetica, Arial, sans-serif;
3+
font-family: "Montserrat", Helvetica, Arial, sans-serif;
44
}
55

66
/* Cloudinary overrides of bootstrap styles*/
77
a {
88
color: #F96726;
99
text-decoration: none;
1010
}
11+
1112
a:hover, a:focus {
1213
color: #F96726;
1314
text-decoration: underline;
@@ -25,23 +26,23 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
2526
color: #5bc7ef;
2627
}
2728

28-
.navbar-default .navbar-nav>li>a:hover, .navbar-default .navbar-nav>li>a:focus {
29+
.navbar-default .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus {
2930
color: #d44e12;
3031
}
3132

32-
.navbar-inverse .navbar-nav>li>a:hover, .navbar-inverse .navbar-nav>li>a:focus {
33+
.navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:focus {
3334
color: #F96726;
3435
}
3536

36-
.pagination>li>a, .pagination>li>span {
37+
.pagination > li > a, .pagination > li > span {
3738
color: #F96726;
3839
}
3940

40-
.pagination>li>a:hover, .pagination>li>span:hover, .pagination>li>a:focus, .pagination>li>span:focus {
41+
.pagination > li > a:hover, .pagination > li > span:hover, .pagination > li > a:focus, .pagination > li > span:focus {
4142
color: #d44e12;
4243
}
4344

44-
.pagination>.active>a, .pagination>.active>span, .pagination>.active>a:hover, .pagination>.active>span:hover, .pagination>.active>a:focus, .pagination>.active>span:focus {
45+
.pagination > .active > a, .pagination > .active > span, .pagination > .active > a:hover, .pagination > .active > span:hover, .pagination > .active > a:focus, .pagination > .active > span:focus {
4546
background-color: #F96726;
4647
border-color: #F96726;
4748
}
@@ -61,6 +62,13 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
6162
color: #000;
6263
}
6364

65+
.navbar-brand {
66+
background-image: url("https://res.cloudinary.com/cloudinary/image/upload/c_scale,w_30/v1/logo/for_blue_bg/cloudinary_icon_for_blue_bg.png");
67+
background-repeat: no-repeat;
68+
background-position: left center;
69+
padding-left: 40px;
70+
}
71+
6472
#site-nav.navbar-default .navbar-nav > li > a:hover {
6573
text-decoration: underline;
6674
color: #F96726;
@@ -87,6 +95,7 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
8795
.namespace-breadcrumbs .breadcrumb > li + li:before {
8896
content: "";
8997
}
98+
9099
.namespace-breadcrumbs .breadcrumb > .backslash {
91100
color: #ccc;
92101
}
@@ -116,6 +125,7 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
116125
#left-column {
117126
display: none;
118127
}
128+
119129
#right-column {
120130
width: 100%;
121131
margin-left: 0;
@@ -126,11 +136,11 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
126136

127137
#api-tree {
128138
background: linear-gradient(
129-
to bottom,
130-
#FFF,
131-
#FFF 50%,
132-
#f0f2f5 50%,
133-
#f0f2f5
139+
to bottom,
140+
#FFF,
141+
#FFF 50%,
142+
#f0f2f5 50%,
143+
#f0f2f5
134144
);
135145
background-size: 100% 56px;
136146
overflow: auto;
@@ -248,7 +258,7 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
248258
background-color: #fff;
249259
border: 1px solid #ccc;
250260
border-radius: 8px;
251-
box-shadow: 0 5px 10px rgba(0,0,0,.2);
261+
box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
252262
padding: 8px;
253263
}
254264

@@ -415,7 +425,7 @@ code {
415425
padding-bottom: 0.2em;
416426
margin: 0;
417427
font-size: 85%;
418-
background-color: rgba(0,0,0,0.04);
428+
background-color: rgba(0, 0, 0, 0.04);
419429
border-radius: 3px;
420430
color: #333;
421431
}

docs/themes/cloudinary/layout/base.twig

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
2020
{% endblock %}
2121

22-
{% if project.config('favicon') %}
23-
<link rel="shortcut icon" href="{{ project.config('favicon') }}" />
24-
{% endif %}
22+
<link rel="shortcut icon" href="https://cloudinary.com/favicon.png" />
2523

2624
{% if project.config('base_url') %}
2725
{%- for version in project.versions -%}
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{% extends "layout/base.twig" %}
2+
3+
{% block content %}
4+
<div id="content">
5+
<div id="left-column">
6+
{{ block('control_panel') }}
7+
{{ block('leftnav') }}
8+
</div>
9+
<div id="right-column">
10+
{{ block('menu') }}
11+
{% block below_menu '' %}
12+
<div id="page-content">
13+
{% block page_content '' %}
14+
</div>
15+
{{ block('footer') }}
16+
</div>
17+
</div>
18+
{% endblock %}
19+
20+
{% block menu %}
21+
<nav id="site-nav" class="navbar navbar-default" role="navigation">
22+
<div class="container-fluid">
23+
<div class="navbar-header">
24+
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-elements">
25+
<span class="sr-only">Toggle navigation</span>
26+
<span class="icon-bar"></span>
27+
<span class="icon-bar"></span>
28+
<span class="icon-bar"></span>
29+
</button>
30+
<a class="navbar-brand" href="{{ path('index.html') }}">{{ project.config('title') }}</a>
31+
</div>
32+
<div class="collapse navbar-collapse" id="navbar-elements">
33+
<ul class="nav navbar-nav">
34+
<li><a href="{{ path('classes.html') }}">Classes</a></li>
35+
{% if has_namespaces %}
36+
<li><a href="{{ path('namespaces.html') }}">Namespaces</a></li>
37+
{% endif %}
38+
<!--li><a href="{{ path('interfaces.html') }}">Interfaces</a></li--CLD_MOD-->
39+
<!--li><a href="{{ path('traits.html') }}">Traits</a></li--CLD_MOD-->
40+
<li><a href="{{ path('doc-index.html') }}">Index</a></li>
41+
<li><a href="{{ path('search.html') }}">Search</a></li>
42+
<li><a href="https://cloudinary.com/documentation/php2_integration" target="_blank">SDK User Guide</a></li>
43+
</ul>
44+
</div>
45+
</div>
46+
</nav>
47+
{% endblock %}
48+
49+
{% block leftnav %}
50+
<div id="api-tree"></div>
51+
{% endblock %}
52+
53+
{% block control_panel %}
54+
<div id="control-panel">
55+
{% if project.versions|length > 1 %}
56+
<form action="#" method="GET">
57+
<select id="version-switcher" name="version">
58+
{% for version in project.versions %}
59+
<option value="{{ path('../' ~ version ~ '/index.html') }}" data-version="{{ version }}">{{ version.longname }}</option>
60+
{% endfor %}
61+
</select>
62+
</form>
63+
{% endif %}
64+
<script>
65+
$('option[data-version="'+window.projectVersion+'"]').prop('selected', true);
66+
</script>
67+
<form id="search-form" action="{{ path('search.html') }}" method="GET">
68+
<span class="glyphicon glyphicon-search"></span>
69+
<input name="search"
70+
class="typeahead form-control"
71+
type="search"
72+
placeholder="Search">
73+
</form>
74+
</div>
75+
{% endblock %}
76+
77+
{% block footer %}
78+
<div id="footer">
79+
© 2020 Cloudinary. All rights reserved<br>
80+
Generated by <a href="http://sami.sensiolabs.org/">Sami, the API Documentation Generator</a>.
81+
</div>
82+
{% endblock %}

docs/themes/cloudinary/sami.js.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ $(function() {
237237
</div>
238238
</li>
239239
{% else %}
240-
{% if not (element[1].name ends with 'Trait') %}
240+
{% if (not (element[1].name ends with 'Trait')) and (not ('Base' in element[1].name)) and (not ('Interface' in element[1].name)) %}
241241
<li data-name="class:{{ (element[1].name)|replace({'\\': '_'}) }}" {% if depth < opened %}class="opened"{% endif %}>
242242
<div style="padding-left:{{ 8 + (depth * 18) }}px" class="hd leaf">
243243
<a href="{{ class_path(element[1]) }}">{{ element[0] }}</a>

samples/edit-me.php

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
use Cloudinary\Transformation\Argument\Text\FontWeight;
2121
use Cloudinary\Transformation\Argument\Text\TextStyle;
2222
use Cloudinary\Transformation\Effect;
23-
use Cloudinary\Transformation\ImageLayer;
23+
use Cloudinary\Transformation\Source;
2424
use Cloudinary\Transformation\Position;
2525
use Cloudinary\Transformation\Resize;
2626
use Cloudinary\Transformation\Transformation;
@@ -39,48 +39,48 @@
3939
->resize(
4040
Resize::fill(220, 140)
4141
)->overlay(
42-
ImageLayer::image('brown_sheep')->resize(Resize::fill(220, 140)),
43-
Position::absolute(220)
42+
Source::image('brown_sheep')->resize(Resize::fill(220, 140)),
43+
Position::center(220)
4444
)->overlay(
45-
ImageLayer::image('horses')->resize(Resize::fill(220, 140)),
46-
Position::absolute(-110, 140)
45+
Source::image('horses')->resize(Resize::fill(220, 140)),
46+
Position::center(-110, 140)
4747
)->overlay(
48-
ImageLayer::image('white_chicken')->resize(Resize::fill(220, 140)),
49-
Position::absolute(110, 70)
48+
Source::image('white_chicken')->resize(Resize::fill(220, 140)),
49+
Position::center(110, 70)
5050
)->overlay(
51-
ImageLayer::image('butterfly')->resize(Resize::scale()->height(200))->rotate(10),
52-
Position::absolute(-10)
51+
Source::image('butterfly')->resize(Resize::scale()->height(200))->rotate(10),
52+
Position::center(-10)
5353
)->resize(Resize::crop(400, 260))
5454
->roundCorners(20)
5555
->overlay(
56-
ImageLayer::text('Memories from our trip')
56+
Source::text('Memories from our trip')
5757
->style((new TextStyle(FontFamily::PARISIENNE, 35))->fontWeight(FontWeight::BOLD))
5858
->color('#990C47'),
59-
Position::absolute()->y(155)
59+
Position::center()->y(155)
6060
)->effect(Effect::shadow())
6161
,
6262
'(new Transformation())
6363
->resize(
6464
Resize::fill(220, 140)
6565
)->overlay(
66-
ImageLayer::image(\'brown_sheep\')->resize(Resize::fill(220, 140)),
67-
Position::absolute(220)
66+
Source::image(\'brown_sheep\')->resize(Resize::fill(220, 140)),
67+
Position::center(220)
6868
)->overlay(
69-
ImageLayer::image(\'horses\')->resize(Resize::fill(220, 140)),
70-
Position::absolute(-110, 140)
69+
Source::image(\'horses\')->resize(Resize::fill(220, 140)),
70+
Position::center(-110, 140)
7171
)->overlay(
72-
ImageLayer::image(\'white_chicken\')->resize(Resize::fill(220, 140)),
73-
Position::absolute(110, 70)
72+
Source::image(\'white_chicken\')->resize(Resize::fill(220, 140)),
73+
Position::center(110, 70)
7474
)->overlay(
75-
ImageLayer::image(\'butterfly\')->resize(Resize::scale()->height(200))->rotate(10),
76-
Position::absolute(-10)
75+
Source::image(\'butterfly\')->resize(Resize::scale()->height(200))->rotate(10),
76+
Position::center(-10)
7777
)->resize(Resize::crop(400, 260))
7878
->roundCorners(20)
7979
->overlay(
80-
ImageLayer::text(\'Memories from our trip\')
80+
Source::text(\'Memories from our trip\')
8181
->style((new TextStyle(FontFamily::PARISIENNE, 35))->fontWeight(FontWeight::BOLD))
8282
->color(\'#990C47\'),
83-
Position::absolute()->y(155)
83+
Position::center()->y(155)
8484
)->effect(Effect::shadow())',
8585
],
8686
],

0 commit comments

Comments
 (0)