Skip to content

Commit eda9043

Browse files
committed
Update examples with autoloading
1 parent 56940ca commit eda9043

36 files changed

+36
-44
lines changed

examples/coinbase_account_balance.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

examples/coinbase_spot_rate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

examples/deviant_art_rss.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

examples/download_file.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

examples/download_file_with_callback.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

examples/flickr_photo_search.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

examples/flickr_upload_photo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33
require 'flickr.class.php';
44

55
use \Curl\Curl;

examples/github_create_gist.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

examples/gmail_send_email.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

examples/google_maps_geocode_address.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

examples/google_plus_profile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

examples/gratipay_send_tip.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

examples/instagram_popular_media.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

examples/instagram_search_photos.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

examples/mailchimp_subscribe_email_address.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

examples/multi_curl_delete.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
3-
require '../src/Curl/MultiCurl.php';
2+
require __DIR__ . '/vendor/autoload.php';
43

54
use \Curl\Curl;
65
use \Curl\MultiCurl;

examples/multi_curl_download.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
3-
require '../src/Curl/MultiCurl.php';
2+
require __DIR__ . '/vendor/autoload.php';
43

54
use \Curl\Curl;
65
use \Curl\MultiCurl;

examples/multi_curl_download_with_callback.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
3-
require '../src/Curl/MultiCurl.php';
2+
require __DIR__ . '/vendor/autoload.php';
43

54
use \Curl\Curl;
65
use \Curl\MultiCurl;

examples/multi_curl_get.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
3-
require '../src/Curl/MultiCurl.php';
2+
require __DIR__ . '/vendor/autoload.php';
43

54
use \Curl\Curl;
65
use \Curl\MultiCurl;

examples/multi_curl_get_callbacks.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
3-
require '../src/Curl/MultiCurl.php';
2+
require __DIR__ . '/vendor/autoload.php';
43

54
use \Curl\Curl;
65
use \Curl\MultiCurl;

examples/multi_curl_patch.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
3-
require '../src/Curl/MultiCurl.php';
2+
require __DIR__ . '/vendor/autoload.php';
43

54
use \Curl\Curl;
65
use \Curl\MultiCurl;

examples/multi_curl_post.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
3-
require '../src/Curl/MultiCurl.php';
2+
require __DIR__ . '/vendor/autoload.php';
43

54
use \Curl\Curl;
65
use \Curl\MultiCurl;

examples/multi_curl_put.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
3-
require '../src/Curl/MultiCurl.php';
2+
require __DIR__ . '/vendor/autoload.php';
43

54
use \Curl\Curl;
65
use \Curl\MultiCurl;

examples/post.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

examples/post_json.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

examples/progress.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

examples/progress_advanced.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

examples/put.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

examples/reddit_top_pics.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

examples/set_url_1.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

examples/set_url_2.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

examples/twitter_post_tweet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

examples/twitter_trending_topics.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

examples/upload_file.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

examples/youtube_list_playlist_videos.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

examples/youtube_video_count.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require '../src/Curl/Curl.php';
2+
require __DIR__ . '/vendor/autoload.php';
33

44
use \Curl\Curl;
55

0 commit comments

Comments
 (0)