本文整理汇总了PHP中form_create_site_object_action::_create_object_operation方法的典型用法代码示例。如果您正苦于以下问题:PHP form_create_site_object_action::_create_object_operation方法的具体用法?PHP form_create_site_object_action::_create_object_operation怎么用?PHP form_create_site_object_action::_create_object_operation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类form_create_site_object_action
的用法示例。
在下文中一共展示了form_create_site_object_action::_create_object_operation方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
function _create_object_operation()
{
$this->object->set_attribute('files_data', $_FILES[$this->name]);
if (($id = parent::_create_object_operation()) === false) {
return false;
}
return $id;
}
示例2:
function _create_object_operation()
{
$this->object->set_attribute('files_data', $this->_get_uploaded_files_data());
if (($id = parent::_create_object_operation()) === false) {
return false;
}
return $id;
}
示例3:
function _create_object_operation()
{
$file = $this->dataspace->get('file');
$this->object->set_attribute('tmp_file_path', $file['tmp_name']);
$this->object->set_attribute('file_name', $file['name']);
$this->object->set_attribute('mime_type', $file['type']);
return parent::_create_object_operation();
}
示例4:
function _create_object_operation(&$object)
{
$object->set_attribute('files_data', $_FILES[$this->name]);
if (($id = parent::_create_object_operation(&$object)) === false) {
return false;
}
$object->create_variations();
return $id;
}
示例5:
function _create_object_operation()
{
if (isset($_FILES[$this->name]['tmp_name']['file'])) {
if ($_FILES[$this->name]['size']['file'] > ini_get('upload_max_filesize') * 1024 * 1024) {
message_box::write_warning('uploaded file size exceeds limit');
return false;
}
$this->object->set_attribute('tmp_file_path', $_FILES[$this->name]['tmp_name']['file']);
$this->object->set_attribute('file_name', $_FILES[$this->name]['name']['file']);
$this->object->set_attribute('mime_type', $_FILES[$this->name]['type']['file']);
}
return parent::_create_object_operation();
}