本文整理匯總了PHP中Logs::warn方法的典型用法代碼示例。如果您正苦於以下問題:PHP Logs::warn方法的具體用法?PHP Logs::warn怎麽用?PHP Logs::warn使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Logs
的用法示例。
在下文中一共展示了Logs::warn方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
public function __construct($array = null, $success = true)
{
if (!$success) {
$this->exception = new SmsException($array);
} else {
if ($array) {
Logs::warn('Constructor with JSON params in ' . get_class($this) . ' is deprecated, use Conversions utility class!');
Conversions::fillFromJSON($this, $array, !$success);
}
}
}
示例2: __construct
public function __construct($arrayOrJson = null, $success = true)
{
// TODO: Remove this and use only the Conversions class
if (!$success) {
$this->exception = new SmsException($arrayOrJson);
} else {
if ($arrayOrJson) {
Logs::warn('Constructor with JSON params in ' . get_class($this) . ' is deprecated, use Conversions utility class!');
Conversions::fillFromJSON($this, $arrayOrJson, !$success);
}
}
}
示例3: convertFromJson
public function convertFromJson($object, $json)
{
$values = Utils::getArrayValue($json, $this->jsonFieldName);
if (!is_array($values)) {
Logs::warn('Looking for array (', $this->jsonFieldName, '), but found:', $values);
return null;
}
$result = array();
foreach ($values as $value) {
$result[] = Conversions::createFromJSON($this->className, $value, false);
}
$fieldName = $this->objectFieldName;
$object->{$fieldName} = $result;
}