AmCharts.php
8 years ago
Animatron.php
8 years ago
Animoto.php
8 years ago
AolOn.php
8 years ago
AppNet.php
8 years ago
AudioSnaps.php
8 years ago
Bambuser.php
8 years ago
BlipTV.php
8 years ago
Cacoo.php
8 years ago
Chartblocks.php
8 years ago
Chirbit.php
8 years ago
CircuitLab.php
8 years ago
Clipland.php
8 years ago
Clyp.php
8 years ago
Codepoints.php
8 years ago
CollegeHumor.php
8 years ago
Coub.php
8 years ago
CrowdRanking.php
8 years ago
DailyMile.php
8 years ago
DailyMotion.php
8 years ago
Deviantart.php
8 years ago
Didacte.php
8 years ago
Dipity.php
8 years ago
DotSub.php
8 years ago
Edocr.php
8 years ago
EgliseInfo.php
8 years ago
Facebook.php
8 years ago
Flickr.php
8 years ago
FunnyOrDie.php
8 years ago
GeographCI.php
8 years ago
GeographDe.php
8 years ago
GeographUk.php
8 years ago
GettyImages.php
8 years ago
Gfycat.php
8 years ago
GithubGist.php
8 years ago
Gmep.php
8 years ago
Hq23.php
8 years ago
Huffduffer.php
8 years ago
Hulu.php
8 years ago
IFTTT.php
8 years ago
IFixIt.php
8 years ago
Infogram.php
8 years ago
Instagram.php
8 years ago
Issuu.php
8 years ago
Kickstarter.php
8 years ago
LearningApps.php
8 years ago
Meetup.php
8 years ago
MixCloud.php
8 years ago
MobyPicture.php
8 years ago
NFB.php
8 years ago
Officemix.php
8 years ago
OfficialFM.php
8 years ago
Oumy.php
8 years ago
Pastery.php
8 years ago
PollDaddy.php
8 years ago
PollEveryWhere.php
8 years ago
Portfolium.php
8 years ago
Rapidengage.php
8 years ago
Rdio.php
8 years ago
ReleaseWire.php
8 years ago
RepubHub.php
8 years ago
Reverbnation.php
8 years ago
Revision3.php
8 years ago
Roomshare.php
8 years ago
Rutube.php
8 years ago
Sapo.php
8 years ago
Screenr.php
8 years ago
Scribd.php
8 years ago
ShortNote.php
8 years ago
Shoudio.php
8 years ago
Showtheway.php
8 years ago
Silk.php
8 years ago
Sketchfab.php
8 years ago
SlideShare.php
8 years ago
SoundCloud.php
8 years ago
Speakerdeck.php
8 years ago
Spotify.php
8 years ago
StreamOneCloud.php
8 years ago
Streamable.php
8 years ago
Sway.php
8 years ago
Ted.php
8 years ago
TheySaidSo.php
8 years ago
Twitter.php
8 years ago
Ustream.php
8 years ago
Verse.php
8 years ago
Vevo.php
8 years ago
Viddler.php
8 years ago
VideoFork.php
8 years ago
VideoJug.php
8 years ago
Vimeo.php
8 years ago
Vine.php
8 years ago
WordpressTV.php
8 years ago
YFrog.php
8 years ago
Yandex.php
8 years ago
Youtube.php
8 years ago
IFixIt.php
43 lines
| 1 | <?php |
| 2 | /** |
| 3 | * IFixIt.php |
| 4 | * |
| 5 | * @package Providers |
| 6 | * @author Michael Pratt <pratt@hablarmierda.net> |
| 7 | * @link http://www.michael-pratt.com/ |
| 8 | * |
| 9 | * For the full copyright and license information, please view the LICENSE |
| 10 | * file that was distributed with this source code. |
| 11 | */ |
| 12 | |
| 13 | namespace Embera\Providers; |
| 14 | |
| 15 | /** |
| 16 | * The ifixit.com Provider |
| 17 | * @link http://www.ifixit.com/api/doc/embed |
| 18 | * @link http://www.ifixit.com/ |
| 19 | */ |
| 20 | class IFixIt extends \Embera\Adapters\Service |
| 21 | { |
| 22 | /** inline {@inheritdoc} */ |
| 23 | protected $apiUrl = 'http://www.ifixit.com/Embed?format=json'; |
| 24 | |
| 25 | /** inline {@inheritdoc} */ |
| 26 | protected function validateUrl() |
| 27 | { |
| 28 | return (preg_match('~ifixit\.com/(?:Guide|Teardown)/(?:[\w\d\+ %]+)/(?:[\d/]+)/?$~i', $this->url)); |
| 29 | } |
| 30 | |
| 31 | /** inline {@inheritdoc} */ |
| 32 | public function fakeResponse() |
| 33 | { |
| 34 | preg_match('~/(\d{4,20})/?~i', $this->url, $matches); |
| 35 | return array( |
| 36 | 'type' => 'rich', |
| 37 | 'provider_name' => 'iFixit', |
| 38 | 'provider_url' => 'http://www.ifixit.com', |
| 39 | 'html' => '<iframe src="https://www.ifixit.com/Guide/Embed/'.$matches[1].'" width="1000" height="730" allowfullscreen frameborder="0"></iframe>\n', |
| 40 | ); |
| 41 | } |
| 42 | } |
| 43 |