本文整理汇总了PHP中FileMaker::getProperty方法的典型用法代码示例。如果您正苦于以下问题:PHP FileMaker::getProperty方法的具体用法?PHP FileMaker::getProperty怎么用?PHP FileMaker::getProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileMaker
的用法示例。
在下文中一共展示了FileMaker::getProperty方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getErrorString
/**
* Returns the string representation of $this->code in the language
* currently set for PHP error messages in FileMaker Server Admin
* Console.
*
* You should call getMessage() in most cases, if you are not sure whether
* the error is a FileMaker Web Publishing Engine error with an error code.
*
* @return string Error description.
*/
function getErrorString()
{
// Default to English.
$lang = basename($this->_fm->getProperty('locale'));
if (!$lang) {
$lang = 'en';
}
static $strings = array();
if (empty($strings[$lang])) {
if (!@(include_once dirname(__FILE__) . '/Error/' . $lang . '.php')) {
include_once dirname(__FILE__) . '/Error/en.php';
}
$strings[$lang] = $__FM_ERRORS;
}
if (isset($strings[$lang][$this->getCode()])) {
return $strings[$lang][$this->getCode()];
}
return $strings[$lang][-1];
}
示例2: getErrorString
/**
* Returns the string representation of $this->code in the language
* currently set for PHP error messages in FileMaker Server Admin
* Console.
*
* You should call getMessage() in most cases, if you are not sure whether
* the error is a FileMaker Web Publishing Engine error with an error code.
*
* @param int $code Error code
* @return string Error description.
*/
public function getErrorString($code)
{
// Default to English.
$lang = basename($this->_fm->getProperty('locale'));
if (!$lang) {
$lang = 'en';
}
if (empty(self::$strings[$lang])) {
if (file_exists(dirname(__FILE__) . '/Error/' . $lang . '.php')) {
$path = dirname(__FILE__) . '/Error/' . $lang . '.php';
} else {
$path = dirname(__FILE__) . '/Error/en.php';
}
$strings[$lang] = (require $path);
}
if (isset($strings[$lang][$code])) {
return $strings[$lang][$code];
}
return $strings[$lang][-1];
}
示例3: testMagicSet
/**
* @covers \airmoi\FileMaker\FileMaker::__set
*/
public function testMagicSet()
{
if ($GLOBALS['OFFICIAL_API']) {
return true;
}
$this->fm->logLevel = 5;
$this->assertEquals(5, $this->fm->getProperty('logLevel'));
try {
$this->fm->fakeVar = "Hello World";
} catch (FileMakerException $e) {
$this->assertTrue(FileMaker::isError($e));
}
}