示例#1
0
文件: Bean.php 项目: dapepe/xily
 /**
  * This function evaluates a datapath relativ to the given dataset.
  *
  * @param string $strDataPath The XML data path
  * @param Xml $mxtDataset The dataset on which the datapath should be applied
  * @param bool $bolStringOnly If true, the function will only return results of type string
  * @param bool $bolStrict If strict mode is of, the function will try to convert unfitting object to strings (e.g. XML files)
  * @return string|array|Xml|mixed
  */
 private function xdrRetriveData($strDataPath, $mxtDataset, $bolStringOnly = true, $bolStrict = false)
 {
     // TESTING: $this->probe('xdrRetriveData', "STEP3: Evaluating datapath", 7);
     // TESTING: $this->probe('xdrRetriveData', "Only Strings: ".($bolStringOnly?'on':'off'), 7);
     // TESTING: $this->probe('xdrRetriveData', "Path: ".$strDataPath, 7);
     if (is_array($mxtDataset)) {
         // TESTING: $this->probe('xdrRetriveData', "Dataset is an array", 8);
         $xlyArray = new Dict($mxtDataset);
         return $xlyArray->get($strDataPath, false);
     } elseif ($mxtDataset instanceof Xml || $mxtDataset instanceof Bean) {
         // TESTING: $this->probe('xdrRetriveData', "Dataset is an XML/Bean document", 8);
         if ($bolStringOnly) {
             // TESTING: $this->probe('xdrRetriveData', "Tracing the datapath now: ".$strDataPath, 9);
             return $mxtDataset->trace($strDataPath);
         } else {
             // TESTING: $this->probe('xdrRetriveData', "Retrieving the object now: ".$strDataPath, 9);
             $mxtData = $mxtDataset->getNodesByPath($strDataPath);
             if (isset($mxtData[1])) {
                 return $mxtData;
             } elseif (isset($mxtData[0])) {
                 return $mxtData[0];
             } else {
                 return false;
             }
         }
     } else {
         // TESTING: $this->probe('xdrRetriveData', "Invalid dataset: Dataset must be an array or XML/Bean object.", 8);
         return false;
     }
 }
示例#2
0
文件: mail.php 项目: joadr/cms
<?php

return array('driver' => 'mailgun', 'host' => 'smtp.mailgun.org', 'port' => 587, 'from' => array('address' => \Dict::get('email_from_email'), 'name' => \Dict::get('email_from_name', 'CMS')), 'encryption' => 'tls', 'username' => null, 'password' => null, 'sendmail' => '/usr/sbin/sendmail -bs', 'pretend' => false);
示例#3
0
文件: Engine.php 项目: joadr/cms
 private function getOneDict($identifier, $default)
 {
     return \Dict::get($identifier, $default);
 }
示例#4
0
文件: services.php 项目: joadr/cms
<?php

return array('mailgun' => array('domain' => \Dict::get('mailgun_domain'), 'secret' => \Dict::get('mailgun_secret')), 'mandrill' => array('secret' => ''), 'stripe' => array('model' => 'User', 'secret' => ''));