Skip to content

Instantly share code, notes, and snippets.

View kawahara's full-sized avatar

Shogo Kawahara (bucyou) kawahara

  • freee
  • Kyoto, Japan
  • 11:36 (UTC +09:00)
View GitHub Profile
<?php
// OpenSocial RESTful APIサンプル
// ライブラリとして http://oauth.googlecode.com/svn/code/php/ を利用しています。
include_once('oauth/OAuth.php');
define('CONSUMER_KEY', '#CONSUMER_KEY#');
define('CONSUMER_SECRET', '#CONSUMER_SECRET#');
define('BASE_URL', 'http://sns.example.com');
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="hello world example">
<Require feature="opensocial-0.8"/>
</ModulePrefs>
<Content type="html"><![CDATA[
<script type="text/javascript">
function getHtml() {
var params = {};
params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT;
<?php
// OpenSocial RESTful APIサンプル (2-legged OAuth)
// ライブラリとして http://oauth.googlecode.com/svn/code/php/ を利用しています。
include_once('lib/OAuth.php');
define('CONSUMER_KEY', '#CONSUMER_KEY#');
define('CONSUMER_SECRET', '#CONSUMER_SECRET#');
define('BASE_URL', '#BASE_URL#');
<?php
require_once dirname(__FILE__).'/../lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();
require_once dirname(__FILE__).'/../lib/util/sfPropelBaseTask.class.php';
define('OPENPNE_CONFIGURAIOTN_SAMPLE_HASH', '7b73a69b5efd2d390bead8135e8a6335');
if (!defined('E_DEPRECATED'))
<?php
class opDoctrineConnectionOpenPNE extends Doctrine_Connection_Mysql
{
protected function unsetDbh()
{
if (!$this->transaction->getTransactionLevel())
{
$this->dbh = null;
diff --git a/lib/config/sfOpenPNEApplicationConfiguration.class.php b/lib/config/sfOpenPNEApplicationConfiguration.class.php
index aabc8bd..43b3699 100644
--- a/lib/config/sfOpenPNEApplicationConfiguration.class.php
+++ b/lib/config/sfOpenPNEApplicationConfiguration.class.php
@@ -19,6 +19,9 @@ abstract class sfOpenPNEApplicationConfiguration extends sfApplicationConfigurat
{
static protected $zendLoaded = false;
+ protected $globEnablePluginList = array();
+ protected $globEnablePluginControllerList = array();
<?php
class MyPDOStatement extends PDOStatement
{
protected $pdo;
protected function __construct(PDO $pdo)
{
$this->pdo = $pdo;
}
public function retrieveGadgetsByTypesName($typesName)
{
$file = sfConfig::get('sf_app_cache_dir').'/config/'.sfInflector::underscore($typesName)."_gadgets.php";
if (is_readable($file))
{
return include($file);
}
$types = $this->getTypes($typesName);
diff --git a/lib/model/doctrine/GadgetTable.class.php b/lib/model/doctrine/GadgetTable.class.php
index 33ba22c..1659906 100644
--- a/lib/model/doctrine/GadgetTable.class.php
+++ b/lib/model/doctrine/GadgetTable.class.php
@@ -10,25 +10,28 @@
class GadgetTable extends opAccessControlDoctrineTable
{
- protected $results;
+ protected
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Activity Test" description="Activityのテスト">
<Link rel="event.addapp" href="http://debian/oauth/t.php" method="POST" />
<Link rel="event.removeapp" href="http://debian/oauth/t.php" method="POST" />
<Require feature="opensocial-0.8" />
<Require feature="dynamic-height" />
</ModulePrefs>
<Content type="html"><![CDATA[
Hello!<br />