Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various enhancements #5

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.idea
composer.phar
vendor
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: php

php:
- 5.3

before_script:
- wget -nc http://getcomposer.org/composer.phar
- php composer.phar install

script: phpunit
154 changes: 0 additions & 154 deletions OpenGraph.php

This file was deleted.

31 changes: 0 additions & 31 deletions OpenGraphTest.php

This file was deleted.

23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
# Open Graph Protocol helper for PHP
Open Graph Protocol helper for PHP
==================================

A small library for making accessing of Open Graph Protocol data easier

## Note
Note
----

Keys with a dash (-) in the name are converted to _ for easy access as a property
in PHP

## Required Extensions
Installation
============

To use the library in your project, just install it with Composer (http://getcomposer.org/)
from the Packagist repository (http://packagist.org/).

Required Extensions
-------------------

* DOM for parsing

## Usage
require_once('OpenGraph.php');
Usage
=====

$graph = OpenGraph::fetch('http://www.rottentomatoes.com/m/10011268-oceans/');
$graph = \OpenGraph\OpenGraph::fetch('http://www.rottentomatoes.com/m/10011268-oceans/');
var_dump($graph->keys());
var_dump($graph->schema);

Expand Down
31 changes: 31 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name":"scottmac/opengraph",
"description":"Helper class for accessing the OpenGraph Protocol",
"keywords":[
"OpenGraph"
],
"homepage":"http://github.com/scottmac/opengraph",
"type":"library",
"license":"Apache 2.0",
"authors":[
{
"name":"Scott MacVicar",
"homepage":"http://www.macvicar.net"
},
{
"name":"Bastian Hofmann",
"email":"bastian.hofmann@researchgate.net",
"homepage":"http://www.bastianhofmann.de"
}
],
"require":{
"php":">=5.3.2",
"ext-dom":"*",
"kriswallsmith/buzz":"*"
},
"autoload": {
"psr-0": {
"OpenGraph": "src/"
}
}
}
18 changes: 18 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="true"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="false"
mapTestClassNameToCoveredClassName="false"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
syntaxCheck="false"
testSuiteLoaderClass="PHPUnit_Runner_StandardTestSuiteLoader"
strict="false"
verbose="false">
<testsuites>
<testsuite name="all">
<directory>test</directory>
</testsuite>
</testsuites>
</phpunit>
Loading