本文整理汇总了PHP中getProperty函数的典型用法代码示例。如果您正苦于以下问题:PHP getProperty函数的具体用法?PHP getProperty怎么用?PHP getProperty使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getProperty函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: put
/**
* PUT changes into an existing record
*
* @param array $params
* @param array $postData
* @return array
*/
public function put(array $params, array $postData)
{
$this->_requireDataType($params);
if (!array_get($params, 'id')) {
throw new Garp_Content_Api_Rest_Exception(self::EXCEPTION_PUT_WITHOUT_ID);
}
$model = $this->_normalizeModelName($params['datatype']);
// First, see if the record actually exists
list($record) = $this->_getSingleResult($params);
if (is_null($record['result'])) {
return $this->_formatResponse(array('success' => false), 404);
}
if (!array_get($params, 'relatedType')) {
$this->_updateSingle($params, $postData);
list($response, $httpCode) = $this->_getSingleResult($params);
} else {
$schema = new Garp_Content_Api_Rest_Schema('rest');
// Sanity check if related model exists
list($relatedRecord) = $this->_getSingleResult(array('datatype' => getProperty('model', $schema->getRelation($params['datatype'], $params['relatedType'])), 'id' => $params['relatedId']));
if (!$relatedRecord['result']) {
return $this->_formatResponse(array('success' => false), 404);
}
$this->_addRelation($params, $postData);
list($response, $httpCode) = $this->_getRelatedResults($params);
}
return $this->_formatResponse($response, $httpCode);
}
开发者ID:grrr-amsterdam,项目名称:garp3,代码行数:34,代码来源:Rest.php
示例2: __construct
function __construct()
{
$this->format = 'application/sparql-results+json';
$dados = new Constant();
$this->http = getProperty($dados->DB_HOST);
//http://localhost:8890/sparql/ //
}
开发者ID:joraojr,项目名称:desaparecidos,代码行数:7,代码来源:Virtuoso_query.php
示例3: consultaSPARQL
function consultaSPARQL($sparql)
{
error_reporting(E_ALL);
ini_set("display_errors", 1);
$dados = new Constant();
$login = getProperty($dados->DB_LOGIN_SPARQL);
$url_sparql = getProperty($dados->DB_URL_SPARQL);
//definindo o formato de retorno dos dados
$format = 'application/sparql-results+json';
//definindo a consulta
$consulta = $sparql;
//codificando a consulta
$url = urlencode($consulta);
//concatenando as string para formar a url de consulta
$sparqlURL = $url_sparql . '?query=' . $url;
/*Setando o cabecalho da requisicao */
//usando a fun����o curl para conectar com o allegrograph
$curl = curl_init();
//inicializando o curl
curl_setopt($curl, CURLOPT_USERPWD, $login);
//usuario e senha do banco
curl_setopt($curl, CURLOPT_URL, $sparqlURL);
//definindo a url de consulta
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
//Recebe o retorno da consulta como uma string
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Accept: ' . $format));
//definido o formato de retorno desejado
$resposta = curl_exec($curl);
//executando o curl e armazenando a resposta numa variavel
curl_close($curl);
//fechando o curl
///////// come��ando a manipula����o de dados/////////////
$objects = array();
$resultado = json_decode($resposta);
//Decodificando o objecto json
//pegando o valor de interesse no array//
foreach ($resultado->results->bindings as $reg) {
// primeiro loop
$obj = new stdClass();
foreach ($reg as $field => $value) {
$obj->{$field} = $value->value;
}
$objects[] = $obj;
}
//sai do segundo loop
$row = objectToArray($objects);
return $row;
}
开发者ID:RaphaelNunes,项目名称:ligadopoliticos,代码行数:48,代码来源:consultasSPARQL.php
示例4: testReplaceFieldTag
public function testReplaceFieldTag()
{
$replaceFieldTag = getMethod('MailForm', 'replaceFieldTag');
$RequestParam = getProperty('MailForm', 'RequestParam');
$FormConfig = getProperty('MailForm', 'FormConfig');
$mailform = $this->getMockBuilder('MailForm')->setMethods(array('getDateTime'))->getMock();
$mailform->expects($this->any())->method('getDateTime')->will($this->returnValue('return_getDateTime'));
$selectValues = array('1' => 'option1', '2' => 'option2', '3' => 'option3');
$FormConfig->setValue($mailform, array('items' => array('key1' => array('value' => 'string'), 'selectkey' => array('value' => 'select', 'selectvalues' => $selectValues), 'multi-selectkey' => array('value' => 'multi-select', 'selectvalues' => $selectValues))));
$RequestParam->setValue($mailform, array('key1' => 'value1', 'key2' => 'value2', 'selectkey' => '1', 'multi-selectkey' => array('2', '3')));
$this->assertEquals('時間:return_getDateTime', $replaceFieldTag->invokeArgs($mailform, array('時間:{{{datetime}}}')));
$this->assertEquals('key1=value1\\nselectkey=option1\\nmulti-selectkey=option2/option3', $replaceFieldTag->invokeArgs($mailform, array('key1={{{key1}}}\\nselectkey={{{selectkey}}}\\nmulti-selectkey={{{multi-selectkey}}}')));
$RequestParam->setValue($mailform, array());
$this->assertEquals('key1=\\nselectkey=\\nmulti-selectkey=', $replaceFieldTag->invokeArgs($mailform, array('key1={{{key1}}}\\nselectkey={{{selectkey}}}\\nmulti-selectkey={{{multi-selectkey}}}')));
}
开发者ID:RainbowJapan,项目名称:SimpleMailForm,代码行数:15,代码来源:class.mailform_test.php
示例5: preg_replace
$offer_text = preg_replace("/#PROX#ADDRESS#PROX#/", $address, $offer_text);
$offer_text = preg_replace("/#PROX#PROPERTY#PROX#/", $propertyName, $offer_text);
$offer_text = preg_replace("/MORE OFFERS AT:/", "", $offer_text);
$offer_text = preg_replace("/Mas ofertas/", "", $offer_text);
$offer_text = preg_replace("/ValuText:/", "", $offer_text);
//$offer_text = preg_replace("/http:\/\/vtext.me(\/)?/", $url, $offer_text);
$offer_text = preg_replace("/http:\\/\\/vtext.me(\\/)?/", "", $offer_text);
//$offer_text = preg_replace("/#PROX#ADDRESS#PROX#/",$property->address,$obj->clean_offer_text);
$list[] = "<div id='offer' class=\"listitem\"><div>" . $offer_text . "\n </div></div>";
$list[] = $share;
$title .= " - " . $offer_text;
} else {
header("Location: /");
}
} elseif (isset($PROPERTY_id)) {
$property = getProperty($mysqli, $PROPERTY_id);
if ($property != NULL) {
$title .= $property->name;
$oList = listOffersByPropertyAndLocale($mysqli, $PROPERTY_id, $locale);
$list[] = "<div id='offer' class=\"backitem\">\n <a href=\"/" . $COUNTRY_id . "/" . $locale . "\"><div><span class='larrow'>◄</span>" . $message_back . "</a></div>" . "</div><h2>" . $property->name . "</h2><p>" . $property->address . "</p>";
foreach ($oList as $obj) {
$retailer = getRetailerByOffer($mysqli, $obj->id);
$list[] = "\n <div class=\"listitem\">\n <a href=\"/" . $COUNTRY_id . "/" . $locale . "/" . $PROPERTY_id . "/" . $obj->id . "\">\n <div id=\"offer-" . $obj->id . "\">" . $retailer->name . "\n <span class=\"arrow\">►</span>\n </div>\n </a>\n </div>";
}
} else {
header("Location: /404?reason=propertynotfound");
}
} elseif (isset($COUNTRY_id)) {
$pList = listPropertiesByCountry($mysqli, $COUNTRY_id);
$list[] = "<div id='offer' class=\"backitem\">\n <a href=\"/\"><div><span class='larrow'>◄</span>" . $message_back . "</a></div>" . "</div><br/><br/>";
foreach ($pList as $obj) {
开发者ID:offerall,项目名称:Campaign-Manager-2.0,代码行数:31,代码来源:router.php
示例6: _getVisibleModels
protected function _getVisibleModels()
{
return array_filter((array) Garp_Spawn_Model_Set::getInstance(), getProperty('visible'));
}
开发者ID:grrr-amsterdam,项目名称:garp3,代码行数:4,代码来源:Schema.php
示例7: rss_scheme_stylesheets
function rss_scheme_stylesheets($theme = null, $media = null)
{
if ($theme === null) {
list($theme, $media) = getActualTheme();
}
$ret = getProperty(rss_theme_option_ref_obj_from_theme($theme, $media), rss_theme_config_override_option_name_mangle('rss.output.theme.scheme'));
if ($ret === null) {
return "";
}
$arr = explode(',', $ret);
$ret = "";
$idx = array_pop($arr);
foreach (loadSchemeList(false, $theme, $media) as $i => $val) {
if ($i == $idx) {
if ($i > 0) {
if (file_exists(GREGARIUS_HOME . RSS_THEME_DIR . "/{$theme}/{$media}/schemes/{$val}") && is_dir(GREGARIUS_HOME . RSS_THEME_DIR . "/{$theme}/{$media}/schemes/{$val}")) {
foreach (glob(GREGARIUS_HOME . RSS_THEME_DIR . "/{$theme}/{$media}/schemes/{$val}/*.css") as $file) {
$file = substr($file, strlen(GREGARIUS_HOME . RSS_THEME_DIR . "/{$theme}/{$media}/schemes/{$val}/"));
$file = getPath() . RSS_THEME_DIR . "/{$theme}/{$media}/schemes/{$val}/{$file}";
$ret .= "\t<link rel=\"stylesheet\" type=\"text/css\" href=\"{$file}\" />\n";
}
}
}
break;
}
}
return $ret;
}
开发者ID:nerdling,项目名称:gregarius,代码行数:28,代码来源:themes.php
示例8: ini_set
<?php
require_once 'library/menu.php';
echo "<h1>Tracking</h1>";
if (isset($_GET['number'])) {
require_once 'library/fedex-common.php';
//The WSDL is not included with the sample code.
//Please include and reference in $path_to_wsdl variable.
$path_to_wsdl = "wsdl/TrackService_v10.wsdl";
ini_set("soap.wsdl_cache_enabled", "0");
$client = new SoapClient($path_to_wsdl, array('trace' => 1));
// Refer to http://us3.php.net/manual/en/ref.soap.php for more information
$request['WebAuthenticationDetail'] = array('ParentCredential' => array('Key' => getProperty('parentkey'), 'Password' => getProperty('parentpassword')), 'UserCredential' => array('Key' => getProperty('key'), 'Password' => getProperty('password')));
$request['ClientDetail'] = array('AccountNumber' => getProperty('shipaccount'), 'MeterNumber' => getProperty('meter'));
$request['TransactionDetail'] = array('CustomerTransactionId' => '*** Track Request using PHP ***');
$request['Version'] = array('ServiceId' => 'trck', 'Major' => '10', 'Intermediate' => '0', 'Minor' => '0');
$request['SelectionDetails'] = array('PackageIdentifier' => array('Type' => 'TRACKING_NUMBER_OR_DOORTAG', 'Value' => $_GET['number']));
try {
if (setEndpoint('changeEndpoint')) {
$newLocation = $client->__setLocation(setEndpoint('endpoint'));
}
$response = $client->track($request);
if ($response->HighestSeverity != 'FAILURE' && $response->HighestSeverity != 'ERROR') {
if ($response->HighestSeverity != 'SUCCESS') {
echo '<table border="1">';
echo '<tr><th>Track Reply</th><th> </th></tr>';
trackDetails($response->Notifications, '');
echo '</table>';
} else {
if ($response->CompletedTrackDetails->HighestSeverity != 'SUCCESS') {
echo '<table border="1">';
开发者ID:rubaiet,项目名称:fedex,代码行数:31,代码来源:track.php
示例9: addSmartPostDetail
function addSmartPostDetail(){
$smartPostDetail = array(
'Indicia' => 'PARCEL_SELECT',
'AncillaryEndorsement' => 'CARRIER_LEAVE_IF_NO_RESPONSE',
'SpecialServices' => 'USPS_DELIVERY_CONFIRMATION',
'HubId' => getProperty('hubid')
//'CustomerManifestId' => 'XXX'
);
return $smartPostDetail;
}
开发者ID:rubaiet,项目名称:fedex,代码行数:10,代码来源:ShipWebServiceClient.php5
示例10: date
);
$request['ReturnTransitAndCommit'] = true;
$request['RequestedShipment']['DropoffType'] = 'REGULAR_PICKUP'; // valid values REGULAR_PICKUP, REQUEST_COURIER, ...
$request['RequestedShipment']['ShipTimestamp'] = date('c');
// Service Type and Packaging Type are not passed in the request
$request['RequestedShipment']['Shipper'] = array(
'Address'=>getProperty('address1')
);
$request['RequestedShipment']['Recipient'] = array(
'Address'=>getProperty('address2')
);
$request['RequestedShipment']['ShippingChargesPayment'] = array(
'PaymentType' => 'SENDER',
'Payor' => array(
'ResponsibleParty' => array(
'AccountNumber' => getProperty('billaccount'),
'Contact' => null,
'Address' => array(
'CountryCode' => 'US'
)
)
)
);
$request['RequestedShipment']['PackageCount'] = '2';
$request['RequestedShipment']['RequestedPackageLineItems'] = array(
'0' => array(
'SequenceNumber' => 1,
'GroupPackageCount' => 1,
'Weight' => array(
'Value' => 2.0,
'Units' => 'LB'
开发者ID:rubaiet,项目名称:fedex,代码行数:31,代码来源:RateAvailableServicesWebServiceClient.php5
示例11: channel_edit_form
function channel_edit_form($cid)
{
$sql = "select id, title, url, siteurl, parent, descr, icon, mode, daterefreshed, dateadded from " . getTable("channels") . " where id={$cid}";
$res = rss_query($sql);
list($id, $title, $url, $siteurl, $parent, $descr, $icon, $mode, $daterefreshed, $dateadded) = rss_fetch_row($res);
$title = htmlentities($title, ENT_QUOTES);
// get tags
$sql = "select t.tag from " . getTable('tag') . " t " . " inner join " . getTable('metatag') . " m " . " on m.tid = t.id " . "where m.ttype = 'channel' and m.fid = {$cid}";
$res = rss_query($sql);
$tags = "";
while ($r = rss_fetch_assoc($res)) {
$tags .= $r['tag'] . " ";
}
echo "<div>\n";
echo "\n\n<h2>" . __('Edit the feed ') . " '{$title}'</h2>\n";
echo "<form method=\"post\" action=\"" . $_SERVER['PHP_SELF'] . "#fa{$cid}\" id=\"channeledit\">\n";
echo "<fieldset id=\"channeleditfs\">";
// Timestamps
if (!empty($daterefreshed)) {
echo "<p><label>" . __('Added') . ": " . date("M-d-Y H:i", strtotime($dateadded)) . "</label></p>" . "<p><label>" . __('Last Update') . ": " . date("M-d-Y H:i", strtotime($daterefreshed)) . " (Age: " . round((time() - strtotime($daterefreshed)) / 60) . " minutes)</label></p>\n";
} else {
echo "<p><label>" . __('Added') . ": " . date("M-d-Y H:i", strtotime($dateadded)) . "</label></p>" . "<p><label>" . __('Last Update') . ": " . __('Never') . "</label></p>\n";
}
// Item name
echo "<p><label for=\"c_name\">" . __('Title:') . "</label>\n" . "<input type=\"text\" id=\"c_name\" name=\"c_name\" value=\"{$title}\" />" . "<input type=\"hidden\" name=\"" . CST_ADMIN_DOMAIN . "\" value=\"" . CST_ADMIN_DOMAIN_CHANNEL . "\" />\n" . "<input type=\"hidden\" name=\"action\" value=\"" . CST_ADMIN_SUBMIT_EDIT . "\" />\n" . "<input type=\"hidden\" name=\"cid\" value=\"{$cid}\" /></p>\n" . "<p><label for=\"c_url\">" . __('RSS URL:') . "</label>\n" . "<a href=\"{$url}\">" . __('(visit)') . "</a>\n" . "<input type=\"text\" id=\"c_url\" name=\"c_url\" value=\"{$url}\" /></p>" . "<p><label for=\"c_siteurl\">" . __('Site URL:') . "</label>\n" . "<a href=\"{$siteurl}\">" . __('(visit)') . "</a>\n" . "<input type=\"text\" id=\"c_siteurl\" name=\"c_siteurl\" value=\"{$siteurl}\" /></p>" . "<p><label for=\"c_parent\">" . __('In folder:') . "</label>\n" . rss_toolkit_folders_combo('c_parent', $parent) . "</p>\n";
// Tags
echo "<p><label for=\"c_tags\">" . __('Categories') . ":</label>\n" . "<input type=\"text\" id=\"c_tags\" name=\"c_tags\" value=\"{$tags}\" /></p>";
// Items state
if ($mode & RSS_MODE_PRIVATE_STATE) {
$pchk = " checked=\"checked\" ";
$old_priv = "1";
} else {
$pchk = "";
$old_priv = "0";
}
if ($mode & RSS_MODE_DELETED_STATE) {
$dchk = " checked=\"checked\" ";
$old_del = "1";
} else {
$dchk = "";
$old_del = "0";
}
echo "<p>\n" . "<input style=\"display:inline\" type=\"checkbox\" id=\"c_private\" " . " name=\"c_private\" value=\"1\"{$pchk} />\n" . "<label for=\"c_private\">" . __('This feed is <strong>private</strong>, only admins see it.') . "</label>\n" . "<input type=\"hidden\" name=\"old_priv\" value=\"{$old_priv}\" />\n" . "</p>\n";
echo "<p>\n" . "<input style=\"display:inline\" type=\"checkbox\" id=\"c_deleted\" " . " name=\"c_deleted\" value=\"1\"{$dchk} />\n" . "<label for=\"c_deleted\">" . __("This feed is <strong>deprecated</strong>, it won't be updated anymore and won't be visible in the feeds column.") . "</label>\n" . "<input type=\"hidden\" name=\"old_del\" value=\"{$old_del}\" />\n" . "</p>\n";
// Description
$descr = trim(htmlentities(strip_tags($descr), ENT_QUOTES));
echo "<p><label for=\"c_descr\">" . __('Description:') . "</label>\n" . "<input type=\"text\" id=\"c_descr\" name=\"c_descr\" value=\"{$descr}\" /></p>\n";
// Icon
if (getConfig('rss.output.showfavicons')) {
echo "<p><label for=\"c_icon\">" . __('Shown favicon:') . "</label>\n";
if (trim($icon) != "") {
if (substr($icon, 0, 5) == 'blob:') {
$icon = substr($icon, 5);
}
echo "<img src=\"{$icon}\" alt=\"{$title}\" class=\"favicon\" width=\"16\" height=\"16\" />\n";
echo "<span>" . __('(Leave blank for no icon)') . "</span>";
}
echo "<input type=\"text\" id=\"c_icon\" name=\"c_icon\" value=\"{$icon}\" /></p>\n";
} else {
echo "<p><input type=\"hidden\" name=\"c_icon\" id=\"c_icon\" value=\"{$icon}\" /></p>\n";
}
rss_plugin_hook('rss.plugins.admin.feed.properties', $cid);
echo "</fieldset>\n";
// Feed properties
echo "<fieldset id=\"channeleditpropfs\">";
echo "<p>" . "<span style=\"float:left;\">Allow Gregarius to look for updates in existing items for this feed?</span>" . "<span style=\"float:right;\">[<a href=\"index.php?domain=config&action=edit&key=rss.input.allowupdates&view=config\">Edit the global option</a>]</span>\n" . " " . "</p>";
$rss_input_allowupdates_default_current = getProperty($cid, 'rss.input.allowupdates');
$rss_input_allowupdates_default_value = $rss_input_allowupdates_default = "Use global option (" . (getConfig('rss.input.allowupdates') ? "Yes" : "No") . ")";
echo "<p id=\"rss_input_allowupdates_options\">" . "<input type=\"radio\" " . "id=\"rss_input_allowupdates_yes\" " . "name=\"prop_rss_input_allowupdates\" value=\"1\" " . ($rss_input_allowupdates_default_current === true ? " checked=\"checked\" " : "") . "/>\n" . "<label for=\"rss_input_allowupdates_yes\">Yes</label>\n" . "<input type=\"radio\" " . "id=\"rss_input_allowupdates_no\" " . "name=\"prop_rss_input_allowupdates\" value=\"0\" " . ($rss_input_allowupdates_default_current === false ? " checked=\"checked\" " : "") . "/>\n" . "<label for=\"rss_input_allowupdates_no\">No</label>" . "<input type=\"radio\" " . "id=\"rss_input_allowupdates_default\" " . "name=\"prop_rss_input_allowupdates\" value=\"default\" " . ($rss_input_allowupdates_default_current === null ? " checked=\"checked\" " : "") . "/>\n" . "<label for=\"rss_input_allowupdates_default\">{$rss_input_allowupdates_default}</label>" . "</p>\n";
echo "<p>" . "<span style=\"float:left;\">Refresh Interval (minutes): </span>" . " " . "</p>";
$rss_config_refreshinterval_default_current = getProperty($cid, 'rss.config.refreshinterval');
echo "<p id=\"rss_config_refreshinterval_options\">" . "<input type=\"text\" id=\"rss_config_refreshinterval\" name=\"rss_config_refreshinterval\" value=\"" . (true == empty($rss_config_refreshinterval_default_current) ? 60 : $rss_config_refreshinterval_default_current) . "\">" . "</p>";
echo "</fieldset>\n";
echo "<p style=\"clear:both; padding: 1em 0\"><input type=\"submit\" name=\"action_\" value=\"" . __('Submit Changes') . "\" />" . "<input type=\"button\" name=\"_cancel\" value=\"" . __('Cancel') . "\" onclick=\"history.back(-1);\"></p>";
echo "</form></div>\n";
}
开发者ID:jphpsf,项目名称:gregarius,代码行数:76,代码来源:channels.php
示例12: total_cadastrados1
public function total_cadastrados1()
{
$format = 'application/sparql-results+json';
/*Concatenando string que formar a url*/
$endereco = 'PREFIX des:<http://www.desaparecidos.com.br/rdf/>
SELECT (COUNT(distinct ?s) AS ?no) { ?s des:id ?x }';
$url = urlencode($endereco);
$dados = new Constant();
$sparqlURL = getProperty($dados->DB_HOST) . '?query=' . $url . '+limit+10';
//http://localhost:10035/repositories/desaparecidos
/*Setando o cabecalho da requisicao */
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $sparqlURL);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
//Recebe o output da url como uma string
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Accept: ' . $format, 'Content-Type: application/sparql-results+json'));
$resposta = curl_exec($curl);
curl_close($curl);
///////// começando a manipulação de dados/////////////
$objects = array();
$results = json_decode($resposta);
//Decodificando o objecto json
//pegando o valor de interesse no array//
foreach ($results->results->bindings as $reg) {
// primeiro loop
$retorno = new stdClass();
//cria uma classe generica do php
foreach ($reg->no as $posicao) {
//entra no segundo loop
$retorno->retorno = $posicao;
//faz com que a classe generica do php receba a ultima posicao do segundo loop
}
//sai do segundo loop
$objects[] = $retorno->retorno;
}
return $objects[0];
/*
$this->load->library('virtuoso_query');
//Carrega a classe para gerar consultas sparql
$this->load->library('sparql');
//Montando a consulta SPARQL
$endereco = 'SELECT (COUNT(distinct ?s) AS ?no) { ?s a [] }';
$url = urlencode($endereco);
$sparqlURL = 'http://172.18.40.9:10035/repositories/desaparecidos1?query='.$url.'+limit+10';
//Carregando os dados para consulta no virtuoso
$this->virtuoso_query->load_sparql_http('http://172.18.40.9:10035/repositories/desaparecidos1');
$this->virtuoso_query->load_graph(get_graph());
$this->virtuoso_query->load_query_sparql($url);
$this->virtuoso_query->load_format('application/sparql-results+json');
//Executa a query SPARQL
$this->virtuoso_query->execute();
$quantidade = $this->virtuoso_query->convert_json_to_simple_object();
return $quantidade;
*/
}
开发者ID:joraojr,项目名称:desaparecidos,代码行数:58,代码来源:buscar.php
示例13: addShippingChargesPayment
function addShippingChargesPayment(){
$shippingChargesPayment = array(
'PaymentType' => 'SENDER', // valid values RECIPIENT, SENDER and THIRD_PARTY
'Payor' => array(
'AccountNumber' => getProperty('shipaccount'),
'CountryCode' => 'US')
);
return $shippingChargesPayment;
}
开发者ID:nidhhoggr,项目名称:Shipping-Calculator,代码行数:9,代码来源:RateWebServiceClient.php5
示例14: group
| - good for ensuring strict SQL while developing
|
| The $active_group variable lets you choose which connection group to
| make active. By default there is only one group (the 'default' group).
|
| The $active_record variables lets you determine whether or not to load
| the active record class
*/
$active_group = 'default';
$active_record = TRUE;
include 'properties.php';
$dados = new Constant();
$host = getProperty($dados->DB_HOST);
$user = getProperty($dados->DB_USER);
$pass = getProperty($dados->DB_PASS);
$desa = getProperty($dados->DB_DESA);
$db['default']['hostname'] = $host;
$db['default']['username'] = $user;
$db['default']['password'] = $pass;
$db['default']['database'] = $desa;
$db['default']['dbdriver'] = 'mysql';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
开发者ID:joraojr,项目名称:desaparecidos,代码行数:31,代码来源:database.php
示例15: addCustomClearanceDetail2
function addCustomClearanceDetail2(){
$customerClearanceDetail = array(
'DutiesPayment' => array(
'PaymentType' => 'SENDER', // valid values RECIPIENT, SENDER and THIRD_PARTY
'Payor' => array(
'ResponsibleParty' => array(
'AccountNumber' => getProperty('dutyaccount'),
'Contact' => null,
'Address' => array(
'CountryCode' => 'US'
)
)
)
),
'DocumentContent' => 'DOCUMENTS_ONLY',
'TermsOfSale' => 'CFR_OR_CPT', // valid values CFR_OR_CPT, CIF_OR_CIP, DDP, DDU, EXW and FOB_OR_FCA
'CustomsValue' => array(
'Currency' => 'USD',
'Amount' => 100.00
),
'Commodities' => array(
'0' => array(
'NumberOfPieces' => 1,
'Description' => 'Books',
'CountryOfManufacture' => 'US',
'Weight' => array(
'Units' => 'LB',
'Value' => 1.0
),
'Quantity' => 1,
'QuantityUnits' => 'EA',
'UnitPrice' => array(
'Currency' => 'USD',
'Amount' => 1.000000
),
'CustomsValue' => array(
'Currency' => 'USD',
'Amount' => 100.000000
)
)
)
);
return $customerClearanceDetail;
}
开发者ID:rubaiet,项目名称:fedex,代码行数:44,代码来源:ShipWebServiceClient.php5
示例16: rdf
public function rdf($id = -1)
{
if ($id == -1) {
redirect('desaparecido');
exit;
}
////////////////////////////Alterado///////////////////////
$ID1 = '"' . $id . '"';
//Carrega a classe de consulta no virtuoso
$this->load->library('virtuoso_query');
//Carrega a classe para gerar consultas sparql
$this->load->library('sparql');
//Montando a consulta SPARQL
$fields = array('foaf:name' => 'nome', 'foaf:nick' => 'apelido', 'foaf:birthday' => 'data_nascimento', 'foaf:gender' => 'sexo', 'foaf:img' => 'imagem', 'foaf:age' => 'idade', 'des:cityDes' => 'cidade', 'des:stateDes' => 'estado', 'dbpprop:height' => 'altura', 'dbpprop:weight' => 'peso', 'des:skin' => 'pele', 'dbpprop:hairColor' => 'cor_cabelo', 'dbpprop:eyeColor' => 'cor_olho', 'des:moreCharacteristics' => 'mais_caracteristicas', 'des:disappearanceDate' => 'data_desaparecimento', 'des:disappearancePlace' => 'local_desaparecimento', 'des:circumstanceLocation' => 'circunstancia_desaparecimento', 'des:dateLocation' => 'data_localizacao', 'des:additionalData' => 'dados_adicionais', 'des:status' => 'status', 'des:source' => 'fonte');
//Defini os prefixos que serão usados
$this->sparql->prefix("foaf", "http://xmlns.com/foaf/0.1/");
$this->sparql->prefix("des", get_schema());
$this->sparql->prefix("dbpprop", "http://dbpedia.org/property/");
//Tripla quer será retornada - Está condição deve ser satisfeita para retornar um resultado
$this->sparql->new_ptrn("?recurso des:id {$ID1}");
foreach ($fields as $key => $value) {
$this->sparql->select("?{$value}");
$this->sparql->optional($this->sparql->new_ptrn("?recurso {$key} ?{$value}"));
}
//Ordena por nome
$this->sparql->order("?nome");
//processa a consulta
$query = $this->sparql->query();
//Carregando os dados para consulta no virtuoso
/////////////////////////Alterado///////////////////////////////
$dados = new Constant();
$this->virtuoso_query->load_sparql_http(getProperty($dados->DB_HOST));
//http://localhost:8890/sparql/
//'http://localhost:10035/repositories/desaparecidos'
$this->virtuoso_query->load_graph(get_graph());
$this->virtuoso_query->load_query_sparql($query);
///////////////////////Alterado///////////////////////////////
$this->virtuoso_query->load_format('application/sparql-results+json');
//application/json
//Executa a query SPARQL
$this->virtuoso_query->execute();
//Retorna o resultado no formato especificado
//$obj_json = $this->virtuoso_query->get_result();
//Retorna como um objeto mais simples
////////////////////Alterado//////////////////////////
//$desaparecido = $this->virtuoso_query->convert_json_to_simple_object(0);
$retorno[] = $this->virtuoso_query->convert_json_to_simple_object(0);
$desaparecido = $retorno[0];
if (sizeof($desaparecido) != 0) {
$rdf = '<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:dbpprop="http://dbpedia.org/property/"
xmlns:being="http://purl.org/ontomedia/ext/common/being#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:des="http://www.desaparecidos.com.br/rdf/">
<rdf:description rdf:about="http://www.desaparecidos.ufjf.br/desaparecidos/' . $id . '">
<foaf:name>' . (!isset($desaparecido[0]->nome) ? $desaparecido[0]->nome : "vazio") . '</foaf:name>
<foaf:nick>' . (isset($desaparecido[0]->apelido) ? $desaparecido[0]->apelido : "") . '</foaf:nick>
<foaf:birthday>' . (isset($desaparecido[0]->data_nascimento) ? $desaparecido[0]->data_nascimento : "") . '</foaf:birthday>
<foaf:gender>' . (isset($desaparecido[0]->sexo) ? $desaparecido[0]->sexo : "") . '</foaf:gender>
<foaf:img>' . (isset($desaparecido[0]->imagem) ? $desaparecido[0]->imagem : "") . '</foaf:img>
<foaf:age>' . (isset($desaparecido[0]->idade) ? $desaparecido[0]->idade : "") . '</foaf:age>
<des:cityDes>' . (isset($desaparecido[0]->cidade) ? $desaparecido[0]->cidade : "") . '</des:cityDes>
<des:cityDes rdf:resource="http://rdf.freebase.com/ns/en.juiz_de_fora" />
<des:cityDes rdf:resource="http://dbpedia.org/resource/Juiz_de_Fora" />
<des:cityDes rdf:resource="" />
<des:cityDes rdf:resource="" />
<des:stateDes>' . (isset($desaparecido[0]->estado) ? $desaparecido[0]->estado : "") . '</des:stateDes>
<dbpprop:height>' . (isset($desaparecido[0]->altura) ? $desaparecido[0]->altura : "") . '</dbpprop:height>
<dbpprop:weight>' . (isset($desaparecido[0]->peso) ? $desaparecido[0]->peso : "") . '</dbpprop:weight>
<des:skin>' . (isset($desaparecido[0]->pele) ? $desaparecido[0]->pele : "") . '</des:skin>
<dbpprop:hairColor>' . (isset($desaparecido[0]->cor_cabelo) ? $desaparecido[0]->cor_cabelo : "") . '</dbpprop:hairColor>
<dbpprop:eyeColor>' . (isset($desaparecido[0]->cor_olho) ? $desaparecido[0]->cor_olho : "") . '</dbpprop:eyeColor>
<des:moreCharacteristics>' . (isset($desaparecido[0]->mais_caracteristicas) ? $desaparecido[0]->mais_caracteristicas : "") . '</des:moreCharacteristics>
<des:disappearanceDate>' . (isset($desaparecido[0]->data_desaparecimento) ? $desaparecido[0]->data_desaparecimento : "") . '</des:disappearanceDate>
<des:disappearancePlace>' . (isset($desaparecido[0]->local_desaparecimento) ? $desaparecido[0]->local_desaparecimento : "") . '</des:disappearancePlace>
<des:circumstanceLocation>' . (isset($desaparecido[0]->circunstancia_desaparecimento) ? $desaparecido[0]->circunstancia_desaparecimento : "") . '</des:circumstanceLocation>
<des:dateLocation>' . (isset($desaparecido[0]->data_localizacao) ? $desaparecido[0]->data_localizacao : "") . '</des:dateLocation>
<des:additionalData>' . (isset($desaparecido[0]->dados_adicionais) ? $desaparecido[0]->dados_adicionais : "") . '</des:additionalData>
<des:status>' . (isset($desaparecido[0]->status) ? $desaparecido[0]->status : "") . '</des:status>
<des:source>' . (isset($desaparecido[0]->fonte) ? $desaparecido[0]->fonte : "") . '</des:source>
</rdf:description>
</rdf:RDF>';
$this->load->helper('download');
force_download('desaparecido-' . $id . '.rdf', $rdf);
} else {
$this->load->view('tema/pages/pessoa-nao-encontrada');
}
}
开发者ID:joraojr,项目名称:desaparecidos,代码行数:92,代码来源:desaparecido.php
示例17: getParams
public function getParams()
{
$fields = array_filter($this->getModel()->fields->toArray(), getProperty('minLength'));
return array_combine(array_map(getProperty('name'), $fields), array_map(getProperty('minLength'), $fields));
}
开发者ID:grrr-amsterdam,项目名称:garp3,代码行数:5,代码来源:MinLength.php
示例18: getProperty
/**
* This section provides a convenient place to setup many commonly used variables
* needed for the php sample code to function.
*/
function getProperty($var)
{
if ($var == 'key') {
return 'XXX';
}
if ($var == 'password') {
return 'XXX';
}
if ($var == 'shipaccount') {
return 'XXX';
}
if ($var == 'billaccount') {
return 'XXX';
}
if ($var == 'dutyaccount') {
return 'XXX';
}
if ($var == 'freightaccount') {
return 'XXX';
}
if ($var == 'trackaccount') {
return 'XXX';
}
if ($var == 'dutiesaccount') {
return 'XXX';
}
if ($var == 'importeraccount') {
return 'XXX';
}
if ($var == 'brokeraccount') {
return 'XXX';
}
if ($var == 'distributionaccount') {
return 'XXX';
}
if ($var == 'locationid') {
return 'PLBA';
}
if ($var == 'printlabels') {
return false;
}
if ($var == 'printdocuments') {
return true;
}
if ($var == 'packagecount') {
return '4';
}
if ($var == 'meter') {
return 'XXX';
}
if ($var == 'shiptimestamp') {
return mktime(10, 0, 0, date("m"), date("d") + 1, date("Y"));
}
if ($var == 'spodshipdate') {
return '2014-07-21';
}
if ($var == 'serviceshipdate') {
return '2017-07-26';
}
if ($var == 'readydate') {
return '2014-07-09T08:44:07';
}
//if($var == 'closedate') Return date("Y-m-d");
if ($var == 'closedate') {
return '2014-07-17';
}
if ($var == 'pickupdate') {
return date("Y-m-d", mktime(8, 0, 0, date("m"), date("d") + 1, date("Y")));
}
if ($var == 'pickuptimestamp') {
return mktime(8, 0, 0, date("m"), date("d") + 1, date("Y"));
}
if ($var == 'pickuplocationid') {
return 'XXX';
}
if ($var == 'pickupconfirmationnumber') {
return '1';
}
if ($var == 'dispatchdate') {
return date("Y-m-d", mktime(8, 0, 0, date("m"), date("d") + 1, date("Y")));
}
if ($var == 'dispatchlocationid') {
return 'XXX';
}
if ($var == 'dispatchconfirmationnumber') {
return '1';
}
if ($var == 'tag_readytimestamp') {
return mktime(10, 0, 0, date("m"), date("d") + 1, date("Y"));
}
if ($var == 'tag_latesttimestamp') {
return mktime(20, 0, 0, date("m"), date("d") + 1, date(&quo
|
请发表评论