本文整理汇总了PHP中Fox::getCamelCase方法的典型用法代码示例。如果您正苦于以下问题:PHP Fox::getCamelCase方法的具体用法?PHP Fox::getCamelCase怎么用?PHP Fox::getCamelCase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fox
的用法示例。
在下文中一共展示了Fox::getCamelCase方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getPropertyName
/**
* Makes conventional property name from key
*
* @param string $key
* @return string
*/
public static function getPropertyName($key)
{
return Fox::getCamelCase($key);
}
示例2: _preSave
/**
* Process data before save
*
* @param array $data
* @return array
* @throws Exception if uploads directory not found
*/
protected function _preSave(array $data)
{
if (!empty($_FILES)) {
$path = Fox::getUploadDirectoryPath() . DIRECTORY_SEPARATOR . $this->_eav_entity_type;
if (!file_exists($path)) {
if (!@mkdir($path, 777, TRUE)) {
throw new Exception('uploads directory was not found.');
}
}
foreach ($_FILES as $key => $file) {
if (isset($file['tmp_name']) && $file['tmp_name']) {
if (($pos = strrpos($file['name'], '.')) > -1) {
$ext = substr($file['name'], $pos + 1);
$fileName = 'FILE-' . time() . '.' . $ext;
$filePath = $path . DIRECTORY_SEPARATOR;
$upload = new Zend_File_Transfer_Adapter_Http();
$upload->setDestination($filePath);
$upload->receive($key);
$uploadedfilepath = $upload->getFileName($key);
$filterFileRename = new Zend_Filter_File_Rename(array('target' => $filePath . $fileName, 'overwrite' => true));
$filterFileRename->filter($uploadedfilepath);
$method = Uni_Core_Model::SET . Fox::getCamelCase($key);
$this->{$method}($fileName);
}
}
}
}
return parent::_preSave($data);
}