当前位置: 首页>>代码示例>>PHP>>正文


PHP ca_objects::find方法代码示例

本文整理汇总了PHP中ca_objects::find方法的典型用法代码示例。如果您正苦于以下问题:PHP ca_objects::find方法的具体用法?PHP ca_objects::find怎么用?PHP ca_objects::find使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ca_objects的用法示例。


在下文中一共展示了ca_objects::find方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testFindByPreferredLabelWithPurify

 public function testFindByPreferredLabelWithPurify()
 {
     $vm_ret = ca_objects::find(['preferred_labels' => ['name' => 'Sound & Motion']], ['purifyWithFallback' => false, 'purify' => true, 'returnAs' => 'ids']);
     $this->assertInternalType('array', $vm_ret);
     $this->assertCount(1, $vm_ret);
     $this->assertEquals($this->opn_object_id, $vm_ret[0]);
 }
开发者ID:samrahman,项目名称:providence,代码行数:7,代码来源:FindTest.php

示例2: getComponents

 /** 
  * Return number of components directly linked to this container
  *
  * @param array $pa_options Array of options:
  *		object_id = object to return components for, rather than currently loaded object. [Default = null; use loaded object]
  *		returnAs = what to return; possible values are:
  *			searchResult			= a search result instance (aka. a subclass of BaseSearchResult), when the calling subclass is searchable (ie. <classname>Search and <classname>SearchResult classes are defined) 
  *			ids						= an array of ids (aka. primary keys)
  *			modelInstances			= an array of instances, one for each match. Each instance is the same class as the caller, a subclass of BaseModel 
  *			firstId					= the id (primary key) of the first match. This is the same as the first item in the array returned by 'ids'
  *			firstModelInstance		= the instance of the first match. This is the same as the first instance in the array returned by 'modelInstances'
  *			info					= an array, keyed on object_id with label, type and idno of each component
  *			
  * @return int 
  */
 public function getComponents($pa_options = null)
 {
     $pn_object_id = caGetOption('object_id', $pa_options, null);
     if (!(int) $pn_object_id) {
         $pn_object_id = (int) $this->getPrimaryKey();
     }
     if (!$pn_object_id) {
         return null;
     }
     if (caGetOption('idsOnly', $pa_options, false)) {
         $pa_options['returnAs'] = 'ids';
     }
     $vs_return_as = caGetOption('returnAs', $pa_options, 'info');
     $va_component_types = $this->getAppConfig()->getList('ca_objects_component_types');
     if (is_array($va_component_types) && (sizeof($va_component_types) && !in_array('*', $va_component_types))) {
         $vm_res = ca_objects::find(array('parent_id' => $pn_object_id, 'type_id' => $va_component_types), array('sort' => 'ca_objects.idno', 'returnAs' => $vs_return_as == 'info' ? 'searchResult' : $vs_return_as));
     } else {
         $vm_res = ca_objects::find(array('parent_id' => $pn_object_id), array('sort' => 'ca_objects.idno', 'returnAs' => $vs_return_as == 'info' ? 'searchResult' : $vs_return_as));
     }
     if ($vs_return_as == 'info') {
         $va_data = array();
         while ($vm_res->nextHit()) {
             $va_data[$vn_object_id = $vm_res->get('ca_objects.object_id')] = array('object_id' => $vn_object_id, 'id' => $vn_object_id, 'label' => $vm_res->get('ca_objects.preferred_labels.name'), 'idno' => $vm_res->get('ca_objects.idno'), 'type_id' => $vm_res->get('ca_objects.type_id'), 'source_id' => $vm_res->get('ca_objects.source_id'));
         }
         return caSortArrayByKeyInValue($va_data, array('idno'));
     }
     return $vm_res;
 }
开发者ID:kai-iak,项目名称:pawtucket2,代码行数:43,代码来源:ca_objects.php

示例3: getObjectID

 /** 
  * Returns object_id for the object_id with the specified name, regardless of specified type. If the object does not already 
  * exist then it will be created with the specified name, type and locale, as well as with any specified values in the $pa_values array.
  * $pa_values keys should be either valid object fields or attributes.
  *
  * @param string $ps_object_name Object label name
  * @param int $pn_parent_id The parent_id of the object; must be set to a non-null value
  * @param int $pn_type_id The type_id of the object type to use if the object needs to be created
  * @param int $pn_locale_id The locale_id to use if the object needs to be created (will be used for both the object locale as well as the label locale)
  * @param array $pa_values An optional array of additional values to populate newly created object records with. These values are *only* used for newly created objects; they will not be applied if the object named already exists. The array keys should be names of ca_objects fields or valid object attributes. Values should be either a scalar (for single-value attributes) or an array of values for (multi-valued attributes)
  * @param array $pa_options An optional array of options, which include:
  *				outputErrors - if true, errors will be printed to console [default=false]
  *				matchOnIdno - try to match on idno if name match fails [default=false]
  *				dontCreate - if true then new entities will not be created [default=false]
  * 				transaction - if Transaction object is passed, use it for all Db-related tasks [default=null]
  *				returnInstance = return ca_objects instance rather than object_id. Default is false. 
  *				generateIdnoWithTemplate = A template to use when setting the idno. The template is a value with automatically-set SERIAL values replaced with % characters. Eg. 2012.% will set the created row's idno value to 2012.121 (assuming that 121 is the next number in the serial sequence.) The template is NOT used if idno is passed explicitly as a value in $pa_values.
  *				importEvent = if ca_data_import_events instance is passed then the insert/update of the object will be logged as part of the import
  *				importEventSource = if importEvent is passed, then the value set for importEventSource is used in the import event log as the data source. If omitted a default value of "?" is used
  *				log = if KLogger instance is passed then actions will be logged
  */
 static function getObjectID($ps_object_name, $pn_parent_id, $pn_type_id, $pn_locale_id, $pa_values = null, $pa_options = null)
 {
     if (!is_array($pa_options)) {
         $pa_options = array();
     }
     if (!isset($pa_options['outputErrors'])) {
         $pa_options['outputErrors'] = false;
     }
     $pb_match_on_idno = caGetOption('matchOnIdno', $pa_options, false);
     $t_object = new ca_objects();
     if (isset($pa_options['transaction']) && $pa_options['transaction'] instanceof Transaction) {
         $t_object->setTransaction($pa_options['transaction']);
     }
     $o_event = isset($pa_options['importEvent']) && $pa_options['importEvent'] instanceof ca_data_import_events ? $pa_options['importEvent'] : null;
     $vs_event_source = isset($pa_options['importEventSource']) && $pa_options['importEventSource'] ? $pa_options['importEventSource'] : "?";
     $o_log = isset($pa_options['log']) && $pa_options['log'] instanceof KLogger ? $pa_options['log'] : null;
     if (!($vs_idno = isset($pa_values['idno']) ? (string) $pa_values['idno'] : null)) {
         if (isset($pa_options['generateIdnoWithTemplate']) && $pa_options['generateIdnoWithTemplate']) {
             $vs_idno = $t_object->setIdnoTWithTemplate($pa_options['generateIdnoWithTemplate'], array('dontSetValue' => true));
         }
     }
     $va_find_arr = array();
     if ($pn_type_id) {
         $va_find_arr['type_id'] = $pn_type_id;
     }
     if ($pn_parent_id) {
         $va_find_arr['parent_id'] = $pn_parent_id;
     }
     if (!($vn_id = ca_objects::find(array_merge(array('preferred_labels' => array('name' => $ps_object_name)), $va_find_arr), array('returnAs' => 'firstId', 'transaction' => $pa_options['transaction'])))) {
         if ($pb_match_on_idno && $vs_idno) {
             $va_find_arr['idno'] = $vs_idno;
             $vn_id = ca_objects::find($va_find_arr, array('returnAs' => 'firstId', 'transaction' => $pa_options['transaction']));
         }
     }
     if (!$vn_id) {
         if (isset($pa_options['dontCreate']) && $pa_options['dontCreate']) {
             return false;
         }
         if ($o_event) {
             $o_event->beginItem($vs_event_source, 'ca_objects', 'I');
         }
         $t_object->setMode(ACCESS_WRITE);
         $t_object->set('locale_id', $pn_locale_id);
         $t_object->set('type_id', $pn_type_id);
         $t_object->set('parent_id', $pn_parent_id);
         $t_object->set('source_id', isset($pa_values['source_id']) ? $pa_values['source_id'] : null);
         $t_object->set('access', isset($pa_values['access']) ? $pa_values['access'] : 0);
         $t_object->set('status', isset($pa_values['status']) ? $pa_values['status'] : 0);
         $t_object->set('idno', $vs_idno);
         $t_object->set('hier_object_id', isset($pa_values['hier_object_id']) ? $pa_values['hier_object_id'] : null);
         $t_object->insert();
         if ($t_object->numErrors()) {
             if (isset($pa_options['outputErrors']) && $pa_options['outputErrors']) {
                 print "[Error] " . _t("Could not insert object %1: %2", $ps_object_name, join('; ', $t_object->getErrors())) . "\n";
             }
             if ($o_log) {
                 $o_log->logError(_t("Could not insert object %1: %2", $ps_object_name, join('; ', $t_object->getErrors())));
             }
             return null;
         }
         $vb_label_errors = false;
         $t_object->addLabel(array('name' => $ps_object_name), $pn_locale_id, null, true);
         if ($t_object->numErrors()) {
             if (isset($pa_options['outputErrors']) && $pa_options['outputErrors']) {
                 print "[Error] " . _t("Could not set preferred label for object %1: %2", $ps_object_name, join('; ', $t_object->getErrors())) . "\n";
             }
             if ($o_log) {
                 $o_log->logError(_t("Could not set preferred label for object %1: %2", $ps_object_name, join('; ', $t_object->getErrors())));
             }
             $vb_label_errors = true;
         }
         unset($pa_values['access']);
         unset($pa_values['status']);
         unset($pa_values['idno']);
         unset($pa_values['source_id']);
         unset($pa_values['hier_object_id']);
         $vb_attr_errors = false;
         if (is_array($pa_values)) {
             foreach ($pa_values as $vs_element => $va_value) {
//.........这里部分代码省略.........
开发者ID:ffarago,项目名称:pawtucket2,代码行数:101,代码来源:DataMigrationUtils.php

示例4: getObjectID

 /**
  * Returns object_id for the object with the specified name (and type) or idno (regardless of specified type.) If the object does not already
  * exist then it will be created with the specified name, type and locale, as well as with any specified values in the $pa_values array.
  * $pa_values keys should be either valid object fields or attributes.
  *
  * @param string $ps_object_name Object label name
  * @param int $pn_parent_id The parent_id of the object; must be set to a non-null value
  * @param int $pn_type_id The type_id of the object type to use if the object needs to be created
  * @param int $pn_locale_id The locale_id to use if the object needs to be created (will be used for both the object locale as well as the label locale)
  * @param array $pa_values An optional array of additional values to populate newly created object records with. These values are *only* used for newly created objects; they will not be applied if the object named already exists. The array keys should be names of ca_objects fields or valid object attributes. Values should be either a scalar (for single-value attributes) or an array of values for (multi-valued attributes)
  * @param array $pa_options An optional array of options, which include:
  *                outputErrors - if true, errors will be printed to console [default=false]
  *                matchOn = optional list indicating sequence of checks for an existing record; values of array can be "label" and "idno". Ex. array("idno", "label") will first try to match on idno and then label if the first match fails.
  *                dontCreate - if true then new objects will not be created [default=false]
  *                transaction - if Transaction object is passed, use it for all Db-related tasks [default=null]
  *                returnInstance = return ca_objects instance rather than object_id. Default is false.
  *                generateIdnoWithTemplate = A template to use when setting the idno. The template is a value with automatically-set SERIAL values replaced with % characters. Eg. 2012.% will set the created row's idno value to 2012.121 (assuming that 121 is the next number in the serial sequence.) The template is NOT used if idno is passed explicitly as a value in $pa_values.
  *                importEvent = if ca_data_import_events instance is passed then the insert/update of the object will be logged as part of the import
  *                importEventSource = if importEvent is passed, then the value set for importEventSource is used in the import event log as the data source. If omitted a default value of "?" is used
  *                nonPreferredLabels = an optional array of nonpreferred labels to add to any newly created objects. Each label in the array is an array with required object label values.
  *                log = if KLogger instance is passed then actions will be logged
  * @return bool|\ca_objects|mixed|null
  */
 static function getObjectID($ps_object_name, $pn_parent_id, $pn_type_id, $pn_locale_id, $pa_values = null, $pa_options = null)
 {
     if (!is_array($pa_options)) {
         $pa_options = array();
     }
     if (!isset($pa_options['outputErrors'])) {
         $pa_options['outputErrors'] = false;
     }
     $pa_match_on = caGetOption('matchOn', $pa_options, array('label', 'idno'), array('castTo' => "array"));
     /** @var ca_data_import_events $o_event */
     $o_event = isset($pa_options['importEvent']) && $pa_options['importEvent'] instanceof ca_data_import_events ? $pa_options['importEvent'] : null;
     $t_object = new ca_objects();
     if (isset($pa_options['transaction']) && $pa_options['transaction'] instanceof Transaction) {
         $t_object->setTransaction($pa_options['transaction']);
         if ($o_event) {
             $o_event->setTransaction($pa_options['transaction']);
         }
     }
     $vs_event_source = isset($pa_options['importEventSource']) && $pa_options['importEventSource'] ? $pa_options['importEventSource'] : "?";
     /** @var KLogger $o_log */
     $o_log = isset($pa_options['log']) && $pa_options['log'] instanceof KLogger ? $pa_options['log'] : null;
     $vs_idno = isset($pa_values['idno']) ? (string) $pa_values['idno'] : null;
     if (preg_match('!\\%!', $vs_idno)) {
         $pa_options['generateIdnoWithTemplate'] = $vs_idno;
         $vs_idno = null;
     }
     if (!$vs_idno) {
         if (isset($pa_options['generateIdnoWithTemplate']) && $pa_options['generateIdnoWithTemplate']) {
             $vs_idno = $t_object->setIdnoWithTemplate($pa_options['generateIdnoWithTemplate'], array('dontSetValue' => true));
         }
     }
     $vn_id = null;
     foreach ($pa_match_on as $vs_match_on) {
         switch (strtolower($vs_match_on)) {
             case 'label':
             case 'labels':
                 if (trim($ps_object_name)) {
                     if ($vn_id = ca_objects::find(array('preferred_labels' => array('name' => $ps_object_name), 'parent_id' => $pn_parent_id, 'type_id' => $pn_type_id), array('returnAs' => 'firstId', 'transaction' => $pa_options['transaction']))) {
                         break 2;
                     }
                 }
                 break;
             case 'idno':
                 if ($vs_idno == '%') {
                     break;
                 }
                 // don't try to match on an unreplaced idno placeholder
                 if ($vn_id = ca_objects::find(array('idno' => $vs_idno ? $vs_idno : $ps_object_name), array('returnAs' => 'firstId', 'transaction' => $pa_options['transaction']))) {
                     break 2;
                 }
                 break;
         }
     }
     if (!$vn_id) {
         if (isset($pa_options['dontCreate']) && $pa_options['dontCreate']) {
             return false;
         }
         if ($o_event) {
             $o_event->beginItem($vs_event_source, 'ca_objects', 'I');
         }
         $t_object->setMode(ACCESS_WRITE);
         $t_object->set('locale_id', $pn_locale_id);
         $t_object->set('type_id', $pn_type_id);
         $t_object->set('parent_id', $pn_parent_id);
         $t_object->set('source_id', isset($pa_values['source_id']) ? $pa_values['source_id'] : null);
         $t_object->set('access', isset($pa_values['access']) ? $pa_values['access'] : 0);
         $t_object->set('status', isset($pa_values['status']) ? $pa_values['status'] : 0);
         $t_object->set('idno', $vs_idno);
         $t_object->set('hier_object_id', isset($pa_values['hier_object_id']) ? $pa_values['hier_object_id'] : null);
         $t_object->insert();
         if ($t_object->numErrors()) {
             if (isset($pa_options['outputErrors']) && $pa_options['outputErrors']) {
                 print "[Error] " . _t("Could not insert object %1: %2", $ps_object_name, join('; ', $t_object->getErrors())) . "\n";
             }
             if ($o_log) {
                 $o_log->logError(_t("Could not insert object %1: %2", $ps_object_name, join('; ', $t_object->getErrors())));
             }
//.........这里部分代码省略.........
开发者ID:kai-iak,项目名称:pawtucket2,代码行数:101,代码来源:DataMigrationUtils.php

示例5: commandImportSIPs


//.........这里部分代码省略.........
                                 $va_track_xml_by_side[$va_tmp[2]][] = ($vb_is_dir ? "{$vs_file}/sides/" : "phar://{$vs_file}/{$vs_idno}/sides/") . $va_tmp[2] . "/" . $va_tmp[3] . "/" . $va_tmp[4];
                                 break;
                         }
                     } else {
                         if ($va_tmp[2]) {
                             $vs_ext = pathinfo($va_tmp[3], PATHINFO_EXTENSION);
                             switch ($vs_ext) {
                                 case 'mp3':
                                     $va_side_audio[$va_tmp[2]] = $va_tmp[3];
                                     break;
                                 case 'xml':
                                     if (preg_match('!meta!', $va_tmp[3])) {
                                         $va_side_xml[$va_tmp[2]] = ($vb_is_dir ? "{$vs_file}/sides/" : "phar://{$vs_file}/{$vs_idno}/sides/") . $va_tmp[2] . "/" . $va_tmp[3];
                                     }
                                     break;
                             }
                         }
                     }
                     break;
                 case 'artifacts':
                     if (sizeof($va_tmp) == 3) {
                         $va_artifacts[] = ($vb_is_dir ? "{$vs_file}/artifacts/" : "phar://{$vs_file}/{$vs_idno}/artifacts/") . $va_tmp[2];
                     }
                     break;
             }
         }
         //print "[6] ".$t->getTime(4)."\n";
         //print_R($va_side_xml); die;
         // Process
         // Create parent record
         $vn_image_count = 0;
         $o_progress->next(_t('Processing %1', $vs_archive_file));
         $o_progress->setMessage(_t("Creating reel for %1", $vs_idno));
         $va_ids = ca_objects::find(array('idno' => $vs_idno, 'deleted' => 0, 'type_id' => 'reel'), array('returnAs' => 'ids'));
         if (!is_array($va_ids) || !sizeof($va_ids)) {
             $t_object = new ca_objects();
             $t_object->setMode(ACCESS_WRITE);
             $t_object->set(array('status' => 5, 'type_id' => 'reel', 'idno' => $vs_idno));
             $vn_object_id = $t_object->insert();
             if ($t_object->numErrors()) {
                 if ($o_log) {
                     $o_log->logError(_t("Could not add reel record %1: %2", $vs_idno, join("; ", $t_object->getErrors())));
                 }
             }
             $t_object->addLabel(array('name' => $vs_idno_padded), $pn_locale_id, null, true);
             if ($t_object->numErrors()) {
                 if ($o_log) {
                     $o_log->logError(_t("Could not add label to reel record %1: %2", $vs_idno, join("; ", $t_object->getErrors())));
                 }
             }
             if ($t_object->numErrors()) {
                 if ($o_log) {
                     $o_log->logError(_t("Could not add artifct media %1 to reel %2: %3", pathinfo($vs_artifact, PATHINFO_BASENAME), $vs_idno, join("; ", $t_object->getErrors())));
                 }
             }
         } else {
             if ($o_log) {
                 $o_log->logDebug(_t("Found existing reel record %1 for %2", $va_ids[0], $vs_idno));
             }
             $t_object = new ca_objects($vn_object_id = $va_ids[0]);
             $t_object->setMode(ACCESS_WRITE);
             $t_object->set('status', 5);
             $t_object->update();
             if (($vn_image_count = $t_object->numberOfRepresentationsOfClass("image")) > 0) {
                 // skip reels that have images already
                 //if ($o_log) { $o_log->logDebug(_t("Skipped existing reel record %1 because it already has %2 images", $vs_idno, $vn_image_count)); }
开发者ID:idiscussforum,项目名称:providence,代码行数:67,代码来源:pbcImportSIPTool.php

示例6: importMediaFromDirectory


//.........这里部分代码省略.........
                     switch ($vs_match_mode) {
                         case 'DIRECTORY_NAME':
                             $va_names_to_match = array($d);
                             break;
                         case 'FILE_AND_DIRECTORY_NAMES':
                             $va_names_to_match = array($f, $d);
                             break;
                         default:
                         case 'FILE_NAME':
                             $va_names_to_match = array($f);
                             break;
                     }
                     foreach ($va_names_to_match as $vs_match_name) {
                         if (preg_match('!' . $vs_regex . '!', $vs_match_name, $va_matches)) {
                             if (!$vs_idno || strlen($va_matches[1]) < strlen($vs_idno)) {
                                 $vs_idno = $va_matches[1];
                             }
                             if (!$vs_modified_filename || strlen($vs_modified_filename) > strlen($va_matches[1])) {
                                 $vs_modified_filename = $va_matches[1];
                             }
                             $va_extracted_idnos_from_filename[] = $va_matches[1];
                             if (in_array($vs_import_mode, array('TRY_TO_MATCH', 'ALWAYS_MATCH'))) {
                                 if (!is_array($va_fields_to_match_on = $po_request->config->getList('batch_media_import_match_on')) || !sizeof($batch_media_import_match_on)) {
                                     $batch_media_import_match_on = array('idno');
                                 }
                                 $va_values = array();
                                 foreach ($va_fields_to_match_on as $vs_fld) {
                                     if (in_array($vs_fld, array('preferred_labels', 'nonpreferred_labels'))) {
                                         $va_values[$vs_fld] = array($vs_fld => array('name' => $va_matches[1]));
                                     } else {
                                         $va_values[$vs_fld] = $va_matches[1];
                                     }
                                 }
                                 if ($vn_object_id = ca_objects::find($va_values, array('returnAs' => 'firstId', 'boolean' => 'OR'))) {
                                     if ($t_object->load($vn_object_id)) {
                                         $va_notices[$vs_relative_directory . '/' . $vs_match_name . '_match'] = array('idno' => $t_object->get($t_object->getProperty('ID_NUMBERING_ID_FIELD')), 'label' => $t_object->getLabelForDisplay(), 'message' => _t('Matched media %1 from %2 to object using %2', $f, $vs_relative_directory, $vs_regex_name), 'status' => 'MATCHED');
                                     }
                                     break 3;
                                 }
                             }
                         }
                     }
                 }
             }
         }
         if (!$t_object->getPrimaryKey()) {
             // Use filename as idno if all else fails
             if ($t_object->load(array('idno' => $f, 'deleted' => 0))) {
                 $va_notices[$vs_relative_directory . '/' . $f . '_match'] = array('idno' => $t_object->get($t_object->getProperty('ID_NUMBERING_ID_FIELD')), 'label' => $t_object->getLabelForDisplay(), 'message' => _t('Matched media %1 from %2 to object using filename', $f, $vs_relative_directory), 'status' => 'MATCHED');
             }
         }
         $t_new_rep = null;
         if ($t_object->getPrimaryKey()) {
             // found existing object
             $t_object->setMode(ACCESS_WRITE);
             $t_new_rep = $t_object->addRepresentation($vs_directory . '/' . $f, $vn_rep_type_id, $vn_locale_id, $vn_object_representation_status, $vn_object_representation_access, false, array(), array('original_filename' => $f, 'returnRepresentation' => true));
             if ($t_object->numErrors()) {
                 $o_eventlog->log(array("CODE" => 'ERR', "SOURCE" => "mediaImport", "MESSAGE" => "Error importing {$f} from {$vs_directory}: " . join('; ', $t_object->getErrors())));
                 $va_errors[$vs_relative_directory . '/' . $f] = array('idno' => $t_object->get($t_object->getProperty('ID_NUMBERING_ID_FIELD')), 'label' => $t_object->getLabelForDisplay(), 'errors' => $t_object->errors(), 'message' => _t("Error importing %1 from %2: %3", $f, $vs_relative_directory, join('; ', $t_object->getErrors())), 'status' => 'ERROR');
                 $o_trans->rollback();
                 continue;
             } else {
                 if ($vb_delete_media_on_import) {
                     @unlink($vs_directory . '/' . $f);
                 }
             }
开发者ID:guaykuru,项目名称:pawtucket,代码行数:67,代码来源:BatchProcessor.php


注:本文中的ca_objects::find方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。