Skip to content

Instantly share code, notes, and snippets.

View e2thex's full-sized avatar

Erik Summerfield e2thex

View GitHub Profile
<?xml version='1.0' encoding='UTF-8'?>
<GateDocument>
<!-- The document's features-->
<GateDocumentFeatures>
<Feature>
<Name className="java.lang.String">gate.SourceURL</Name>
<Value className="java.lang.String">created from String</Value>
</Feature>
</GateDocumentFeatures>
auth lister => StructuredDynamics\structwsf\php\api\ws\auth\lister\AuthListerQuery::__set_state(array(
'endpoint' => 'auth/lister/',
'method' => 'get',
'mime' => 'resultset',
'timeout' => 0,
'resultset' =>
StructuredDynamics\structwsf\framework\Resultset::__set_state(array(
'resultset' =>
array (
'unspecified' =>
Array
(
[bibo_document] => Array
(
[type] => resource
[bundle] => bibo_document
[mapping] => Array
(
[rdftype] => Array
(
-------------------------. .-----------------------------.
Create Task | | Create Task (Step) |
-------------------------| |-----------------------------|
Name (machine name too) | | Resolution |
Type <drop down> | | Name |
-------------------------' | Actions (add) |
| (add new resolution) |
'-----------------------------'
$e = entity_load('resource_type', array('http://ccr.nhccn.com.au/datasets/global/documents/16964'));
entity_save('resource_type', $e);
@e2thex
e2thex / gist:3148658
Created July 20, 2012 04:16
sps_drupal()
<?php
namespace Drupal/sps
/**
* This is to assit in calling function outside of the sps
* module that might have side effect. It allows for test to
* change the function for there tests
* the syntax to use is
.---------------------------------------------------.
|.-------------------------------------------------.|
|| [Select Condition] Date [__________] [submit] ||
|'-------------------------------------------------'|
| |
|.-----------------------------. .-----------------.|
||.---------------------------.| |.---------------.||
||| [Publish] || || [Publish] |||
||'---------------------------'| |'---------------'||
|| | | ||
@e2thex
e2thex / gist:3098139
Created July 12, 2012 13:34
Plugin Factory validatePluginInfoElement
<?php
/**
* Validate that the plugin info array contains the all of the required keys
*
* @param $plugin_info
* @param $element_key
* @param $element
*
* @throws Exception\InvalidPluginException
*
@e2thex
e2thex / gist:3091134
Created July 11, 2012 15:28
PluginFactory::checkPluginMeta
/**
* Recursive function to search the meta data
*
* @param $plugin_info
* @param $property
* this can be a string or a array of tree keys
* @param $value
*
* @return bool
*/
13:43 /opt/development/esummerfield/lds/html/sites/all/modules/lsd_csi/sps (7.x-1.x) $ php /opt/development/esummerfield/lds/html/scripts/run-tests.s
h --color --verbose --class SPSPluginFactoryUnitTest
Drupal test run
---------------
Tests to be run:
- SPS Plugin Factory Unit Tests (SPSPluginFactoryUnitTest)