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
<?php | |
$context->set('reposeSessionFactory', array( | |
'className' => 'substrate_orm_repose_SessionFactoryFactoryObject', | |
'constructorArgs' => array( | |
'configuration' => array( | |
'connection' => array( | |
'dsn' => '${s3a.dao.dsn}', | |
'username' => '${s3a.dao.username}', | |
'password' => '${s3a.dao.password}', | |
), |
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
<?php | |
abstract class s3a_domain_AbstractReposeRepository { | |
private $sessionFactory; | |
protected function __construct(repose_SessionFactory $sessionFactory) { | |
$this->sessionFactory = $sessionFactory; | |
} | |
public function getDataSource() { | |
return $this->getSession()->getDataSource(); | |
} | |
public function getSession() { |
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
<?php | |
hc_core_ClassLoader::load('s3a_domain_AbstractReposeRepository'); | |
hc_core_ClassLoader::load('s3a_domain_ISpaceRepository'); | |
hc_core_ClassLoader::load('s3a_domain_model_Space'); | |
hc_core_ClassLoader::load('s3a_domain_model_SpaceNeighborhood'); | |
hc_core_ClassLoader::load('s3a_domain_model_SpaceUri'); | |
hc_core_ClassLoader::load('s3a_domain_model_Neighborhood'); | |
hc_core_ClassLoader::load('repose_SessionFactory'); | |
class s3a_domain_ReposeSpaceRepository extends s3a_domain_AbstractReposeRepository implements s3a_domain_ISpaceRepository { |
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
<?php | |
curl_setopt_custom_postfields($ch, array( | |
'file' => '@/path/to/file', | |
'tag' => array('a', 'b', 'c'), | |
)); | |
?> |
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
<?php | |
// Import the data source context configuration. | |
$context->import('dataSource.context.php'); | |
// Setup the string configuration object. | |
$context->set('stringConfiguration', array( | |
// We use a Composite Configuration! | |
'className' => 'hc_configuration_CompositeConfiguration', | |
'constructorArgs' => array( |
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
<?php | |
hc_core_ClassLoader::load('s3a_domain_model_Space'); | |
hc_core_ClassLoader::load('s3a_domain_model_Neighborhood'); | |
interface s3a_domain_ISpaceRepository { | |
public function find($spaceSymName); | |
public function findById($spaceId); | |
public function findAll(); | |
public function save(s3a_domain_model_Space $space); | |
public function saveSpaceUri(s3a_domain_model_SpaceUri $spaceUri); | |
public function addNeighborhood(s3a_domain_model_Space $space, s3a_domain_model_Neighborhood $neighborhood); |
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
<?php | |
// Import the Space Repository. | |
$context->import('s3a_spaceRepository.context.php'); | |
// Define the Space Edit controller, and make certain that the Space Repository | |
// is set. | |
$context->set('spaceEditController', array( | |
'className' => 's3a_controllers_admin_SpaceEditController', | |
'properties' => array( | |
'spaceRepository' => $context->ref('spaceRepository'), |
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
<fb:narrow> | |
<div class="header">Header</div> | |
<div class="image"> | |
<fb:random> | |
<fb:random-option> | |
<img src="sample1.jpg" /> | |
</fb:random-option> | |
<fb:random-option> | |
<img src="sample2.jpg" /> | |
</fb:random-option> |
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
import pycurl | |
import sys | |
class Storage: | |
def __init__(self): | |
self.contents = '' | |
self.line = 0 | |
def store(self, buf): | |
self.line = self.line + 1 |
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
jQuery('.emailLink').click(function(e) { | |
e.preventDefault(); | |
var $link = jQuery(this); | |
var $sending = jQuery('<span>Sending...</span>'); | |
$link.after($sending); | |
$link.hide(); | |
var restoreCb = function() { | |
$link.show(); | |
$sending.remove(); | |
}; |