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


PHP Resource::setIsbnOrIssn方法代码示例

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


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

示例1: date

 // Convert to UTF-8
 $data = array_map(function ($row) {
     return mb_convert_encoding($row, 'UTF-8');
 }, $data);
 // Let's insert data
 $resource->createLoginID = $loginID;
 $resource->createDate = date('Y-m-d');
 $resource->updateLoginID = '';
 $resource->updateDate = '';
 $resource->titleText = $data[$_POST['titleText']];
 $resource->resourceURL = $data[$_POST['resourceURL']];
 $resource->resourceAltURL = $data[$_POST['resourceAltURL']];
 $resource->providerText = $data[$_POST['providerText']];
 $resource->statusID = 1;
 $resource->save();
 $resource->setIsbnOrIssn($deduping_values);
 $inserted++;
 // Do we have to create an organization or attach the resource to an existing one?
 if ($data[$_POST['organization']]) {
     $organizationName = $data[$_POST['organization']];
     $organization = new Organization();
     $organizationRole = new OrganizationRole();
     $organizationID = false;
     // If we use the Organizations module
     if ($config->settings->organizationsModule == 'Y') {
         $dbName = $config->settings->organizationsDatabaseName;
         // Does the organization already exists?
         $query = "SELECT count(*) AS count FROM {$dbName}.Organization WHERE UPPER(name) = '" . str_replace("'", "''", strtoupper($organizationName)) . "'";
         $result = $organization->db->processQuery($query, 'assoc');
         // If not, we try to create it
         if ($result['count'] == 0) {
开发者ID:jsteverman,项目名称:resources,代码行数:31,代码来源:import.php

示例2: Resource

<?php

$resourceID = $_POST['resourceID'];
//get this resource
$resource = new Resource(new NamedArguments(array('primaryKey' => $resourceID)));
$resource->updateLoginID = $loginID;
$resource->updateDate = date('Y-m-d H:i:s');
$resource->titleText = $_POST['titleText'];
$resource->descriptionText = $_POST['descriptionText'];
$resource->resourceFormatID = $_POST['resourceFormatID'];
$resource->resourceTypeID = $_POST['resourceTypeID'];
$resource->resourceURL = $_POST['resourceURL'];
$resource->resourceAltURL = $_POST['resourceAltURL'];
$isbnarray = json_decode($_POST['isbnOrISSN']);
$resource->setIsbnOrIssn($isbnarray);
//to determine status id
$status = new Status();
if ((!$resource->archiveDate || $resource->archiveDate == '0000-00-00') && $_POST['archiveInd'] == "1") {
    $resource->archiveDate = date('Y-m-d');
    $resource->archiveLoginID = $loginID;
    $resource->statusID = $status->getIDFromName('archive');
} else {
    if ($_POST['archiveInd'] == "0") {
        //if archive date is currently set and being removed, mark status as complete
        if ($resource->archiveDate != '' && $resource->archiveDate != '0000-00-00') {
            $resource->statusID = $status->getIDFromName('complete');
        }
        $resource->archiveDate = '';
        $resource->archiveLoginID = '';
    }
}
开发者ID:billdueber,项目名称:resources,代码行数:31,代码来源:submitProductUpdate.php

示例3: date

 }
 // Let's insert data
 $resource->createLoginID = $loginID;
 $resource->createDate = date('Y-m-d');
 $resource->updateLoginID = '';
 $resource->updateDate = '';
 $resource->titleText = trim($data[$resourceTitleColumn]);
 $resource->descriptionText = trim($data[$resourceDescColumn]);
 $resource->resourceURL = trim($data[$resourceURLColumn]);
 $resource->resourceAltURL = trim($data[$resourceAltURLColumn]);
 $resource->resourceTypeID = $resourceTypeID;
 $resource->resourceFormatID = $resourceFormatID;
 //$resource->providerText     = $data[$_POST['providerText']];
 $resource->statusID = 1;
 $resource->save();
 $resource->setIsbnOrIssn($isbnIssn_values);
 $inserted++;
 // If Alias is mapped, check to see if it exists
 foreach ($jsonData['alias'] as $alias) {
     if ($alias['column'] === "") {
         continue;
     }
     if ($alias['delimiter'] !== "") {
         $aliasArray = array_map('trim', explode($alias['delimiter'], $data[intval($alias['column']) - 1]));
     } else {
         $aliasArray = array(trim($data[intval($alias['column']) - 1]));
     }
     foreach ($aliasArray as $currentAlias) {
         if ($currentAlias === $resource->titleText) {
             continue;
         }
开发者ID:pontifechs,项目名称:resources,代码行数:31,代码来源:import.php


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