-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jasdy Ady
authored and
Jasdy Ady
committed
Jun 28, 2016
0 parents
commit 19f0293
Showing
7 changed files
with
141 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# CakeSocial plugin for CakePHP | ||
|
||
## Installation | ||
|
||
You can install this plugin into your CakePHP application using [composer](http://getcomposer.org). | ||
|
||
The recommended way to install composer packages is: | ||
|
||
``` | ||
composer require your-name-here/CakeSocial | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"name": "akutaktau/CakeSocial", | ||
"description": "CakeSocial plugin for CakePHP", | ||
"type": "cakephp-plugin", | ||
"require": { | ||
"php": ">=5.4.16", | ||
"cakephp/cakephp": "~3.0", | ||
"facebook/php-sdk-v4": "~5.0" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "*" | ||
}, | ||
|
||
"autoload": { | ||
"psr-4": { | ||
"CakeSocial\\": "src" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"CakeSocial\\Test\\": "tests", | ||
"Cake\\Test\\": "./vendor/cakephp/cakephp/tests" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
use Cake\Routing\RouteBuilder; | ||
use Cake\Routing\Router; | ||
|
||
Router::plugin( | ||
'CakeSocial', | ||
['path' => '/cake-social'], | ||
function (RouteBuilder $routes) { | ||
$routes->fallbacks('DashedRoute'); | ||
} | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit | ||
colors="true" | ||
processIsolation="false" | ||
stopOnFailure="false" | ||
syntaxCheck="false" | ||
bootstrap="./tests/bootstrap.php" | ||
> | ||
<php> | ||
<ini name="memory_limit" value="-1"/> | ||
<ini name="apc.enable_cli" value="1"/> | ||
</php> | ||
|
||
<!-- Add any additional test suites you want to run here --> | ||
<testsuites> | ||
<testsuite name="CakeSocial Test Suite"> | ||
<directory>./tests/TestCase</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<!-- Setup a listener for fixtures --> | ||
<listeners> | ||
<listener | ||
class="\Cake\TestSuite\Fixture\FixtureInjector" | ||
file="./vendor/cakephp/cakephp/src/TestSuite/Fixture/FixtureInjector.php"> | ||
<arguments> | ||
<object class="\Cake\TestSuite\Fixture\FixtureManager" /> | ||
</arguments> | ||
</listener> | ||
</listeners> | ||
|
||
<!-- Prevent coverage reports from looking in tests and vendors --> | ||
<filter> | ||
<blacklist> | ||
<directory suffix=".php">./vendor/</directory> | ||
<directory suffix=".ctp">./vendor/</directory> | ||
|
||
<directory suffix=".php">./tests/</directory> | ||
<directory suffix=".ctp">./tests/</directory> | ||
</blacklist> | ||
</filter> | ||
|
||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace CakeSocial\Controller; | ||
|
||
use App\Controller\AppController as BaseController; | ||
|
||
class AppController extends BaseController | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
/** | ||
* CakeSocial Facebook Component | ||
* | ||
* @author Jasdy Syarman | ||
* @copyright (c) 2016 syarman.com/soft | ||
* @license MIT | ||
*/ | ||
namespace CakeSocial\Controller\Component; | ||
|
||
use Cake\Controller\Component; | ||
// use Cake\Controller\ComponentRegistry; | ||
// use Cake\Core\Configure; | ||
// use Cake\Event\Event; | ||
// use Cake\ORM\TableRegistry; | ||
// use Cake\Routing\Router; | ||
// use Facebook\FacebookSession; | ||
// use Facebook\FacebookRedirectLoginHelper; | ||
// use Facebook\FacebookRequest; | ||
// use Facebook\FacebookResponse; | ||
// use Facebook\GraphUser; | ||
// use Facebook\FacebookSDKException; | ||
// use Facebook\FacebookRequestException; | ||
// use Facebook\FacebookAuthorizationException; | ||
|
||
/** | ||
* Facebook component | ||
*/ | ||
class FacebookComponent extends Component { | ||
|
||
public function initialize() { | ||
|
||
parent::initialize(); | ||
if(Configure::read('CakeSocial')) { | ||
$config = Configure::read('CakeSocial'); | ||
|
||
pr($config); | ||
} | ||
} | ||
|
||
} |
Empty file.