本文整理汇总了PHP中get_path函数的典型用法代码示例。如果您正苦于以下问题:PHP get_path函数的具体用法?PHP get_path怎么用?PHP get_path使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_path函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getResourcesList
/**
* Returns all the descriptions of a course.
* @throws InvalidArgumentException if the $cid in not provided.
* @webservice{/module/MOBILE/GEN/getResourcesList/cidReq}
* @ws_arg{method,getResourcesList}
* @ws_arg{cidReq,SYSCODE of requested cours}
* @return array of Descriptions object
*/
function getResourcesList($args)
{
$module = isset($args['module']) ? $args['module'] : null;
$cid = claro_get_current_course_id();
if ($cid == null || $module == null) {
throw new InvalidArgumentException('Missing cid argument!');
}
$list = array();
FromKernel::uses('core/linker.lib');
ResourceLinker::init();
$locator = new ClarolineResourceLocator($cid, $module, null, claro_get_current_group_id());
if (ResourceLinker::$Navigator->isNavigable($locator)) {
$resourceList = ResourceLinker::$Navigator->getResourceList($locator);
foreach ($resourceList as $lnk) {
$inLocator = $lnk->getLocator();
$item['title'] = $lnk->getName();
$item['visibility'] = $lnk->isVisible();
$item['url'] = str_replace(get_path('url'), "", get_path('rootWeb')) . ResourceLinker::$Resolver->resolve($inLocator);
if ($inLocator->hasResourceId()) {
$item['resourceId'] = $inLocator->getResourceId();
} else {
$item['resourceId'] = $item['url'];
}
if (claro_is_allowed_to_edit() || $item['visibility']) {
$list[] = $item;
}
}
}
return $list;
}
开发者ID:Okhoshi,项目名称:Claroline.REST-API-Plugin,代码行数:38,代码来源:genericwebservicecontroller.lib.php
示例2: renderContent
public function renderContent()
{
global $platformLanguage;
$out = '';
// Last user action
$lastUserAction = isset($_SESSION['last_action']) && $_SESSION['last_action'] != '1970-01-01 00:00:00' ? $_SESSION['last_action'] : date('Y-m-d H:i:s');
$userCommands = array();
// User commands
// 'Create Course Site' command. Only available for teacher.
if (claro_is_allowed_to_create_course()) {
$userCommands[] = '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'course/create.php')) . '" class="userCommandsItem">' . '<img src="' . get_icon_url('courseadd') . '" alt="" /> ' . get_lang('Create a course site') . '</a>' . "\n";
} elseif ($GLOBALS['currentUser']->isCourseCreator) {
$userCommands[] = '<span class="userCommandsItemDisabled">' . '<img src="' . get_icon_url('courseadd') . '" alt="" /> ' . get_lang('Create a course site') . '</span>' . "\n";
}
if (get_conf('allowToSelfEnroll', true)) {
$userCommands[] = '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'auth/courses.php?cmd=rqReg&categoryId=0')) . '" class="userCommandsItem">' . '<img src="' . get_icon_url('enroll') . '" alt="" /> ' . get_lang('Enrol on a new course') . '</a>' . "\n";
$userCommands[] = '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'auth/courses.php?cmd=rqUnreg')) . '" class="userCommandsItem">' . '<img src="' . get_icon_url('unenroll') . '" alt="" /> ' . get_lang('Remove course enrolment') . '</a>' . "\n";
}
$userCommands[] = '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'course/platform_courses.php')) . '" class="userCommandsItem">' . '<img src="' . get_icon_url('course') . '" alt="" /> ' . get_lang('All platform courses') . '</a>' . "\n";
$userCommands[] = '<a href="' . claro_htmlspecialchars(Url::Contextualize(get_path('clarolineRepositoryWeb') . 'notification_date.php')) . '" class="userCommandsItem">' . '<img class="iconDefinitionList" src="' . get_icon_url('hot') . '" alt="' . get_lang('New items') . '" />' . ' ' . get_lang('New items') . ' ' . get_lang('to another date') . (substr($lastUserAction, strlen($lastUserAction) - 8) == '00:00:00' ? ' [' . claro_html_localised_date(get_locale('dateFormatNumeric'), strtotime($lastUserAction)) . ']' : '') . '</a>' . "\n";
$userCourseList = render_user_course_list();
$userCourseListDesactivated = render_user_course_list_desactivated();
$out .= '<div class="userCommands">' . '<h2>' . get_lang('Manage my courses') . '</h2>' . claro_html_list($userCommands) . '</div>' . '<div class="userCourseList">' . '<h2>' . get_lang('My course list') . '</h2>' . $userCourseList;
if (!empty($userCourseListDesactivated)) {
$out .= '<h4>' . get_lang('Deactivated course list') . '</h4>' . $userCourseListDesactivated;
}
$out .= '</div>';
/*'</td>'
. '</tr>'
. '</tbody>'
. '</table>'*/
$this->content = $out;
return $this->content;
}
开发者ID:rhertzog,项目名称:lcs,代码行数:34,代码来源:mycourselist.class.php
示例3: class_loader
/**
* A helper function to load the Nmwdhj classes.
*
* @return void
* @since 1.2
*/
function class_loader($class_name)
{
$nps = explode('\\', $class_name, 3);
if ('Nmwdhj' !== $nps[0] || count($nps) === 1) {
return;
}
switch ($nps[1]) {
case 'Manager':
case 'Exception':
case 'EventManager':
case 'PriorityArray':
$class_path = get_path('core/Essentials.php');
break;
case 'Attributes':
$class_path = get_path('core/Attributes.php');
break;
case 'Elements':
if (!empty($nps[2])) {
$class_path = get_path(sprintf('elements/%s.php', $nps[2]));
}
break;
case 'Views':
if (!empty($nps[2])) {
$class_path = get_path(sprintf('elements/views/%s.php', $nps[2]));
}
break;
}
if (!empty($class_path) && file_exists($class_path)) {
require $class_path;
}
}
开发者ID:mastinoz,项目名称:Momtaz-Framework,代码行数:37,代码来源:nmwdhj.php
示例4: addAdminScripts
function addAdminScripts($hook_suffix)
{
wp_register_script('', get_path('js') . '', array('jquery'), '', true);
if ($hook_suffix == '') {
wp_enqueue_script(array());
}
}
开发者ID:alpipego,项目名称:axg,代码行数:7,代码来源:Scripts.php
示例5: resolve
public function resolve(ResourceLocator $locator)
{
if ($locator->hasResourceId()) {
$context = Claro_Context::getCurrentContext();
$context[CLARO_CONTEXT_COURSE] = $locator->getCourseId();
if ($locator->inGroup()) {
$context[CLARO_CONTEXT_GROUP] = $locator->getGroupId();
}
$path = get_path('coursesRepositorySys') . claro_get_course_path($locator->getCourseId());
// in a group
if ($locator->inGroup()) {
$groupData = claro_get_group_data($context);
$path .= '/group/' . $groupData['directory'];
$groupId = $locator->getGroupId();
} else {
$path .= '/document';
}
$path .= '/' . ltrim($locator->getResourceId(), '/');
$resourcePath = '/' . ltrim($locator->getResourceId(), '/');
$path = secure_file_path($path);
if (!file_exists($path)) {
throw new Exception("Resource not found {$path}");
} elseif (is_dir($path)) {
$url = new Url(get_module_entry_url('CLDOC'));
$url->addParam('cmd', 'exChDir');
$url->addParam('file', base64_encode($resourcePath));
return $url->toUrl();
} else {
return get_module_url('CLDOC') . '/connector/cllp.frames.cnr.php';
return claro_get_file_download_url($resourcePath, Claro_Context::getUrlContext($context));
}
} else {
return get_module_entry_url('CLDOC');
}
}
开发者ID:rhertzog,项目名称:lcs,代码行数:35,代码来源:cllp.linker.cnr.php
示例6: load_path
function load_path($dir, $path)
{
$file = get_path($dir, $path);
if (file_exists($file)) {
require_once $file;
}
}
开发者ID:uklibraries,项目名称:findingaid,代码行数:7,代码来源:init.php
示例7: CLANN_write_ical
/**
* CLAROLINE
*
* @version $Revision: 13708 $
* @copyright (c) 2001-2011, Universite catholique de Louvain (UCL)
* @license http://www.gnu.org/copyleft/gpl.html (GPL) GENERAL PUBLIC LICENSE
* @package CLANN
* @subpackage CLICAL
* @author Claro Team <[email protected]>
*/
function CLANN_write_ical($iCal, $context)
{
if (is_array($context) && count($context) > 0) {
$courseId = array_key_exists(CLARO_CONTEXT_COURSE, $context) ? $context[CLARO_CONTEXT_COURSE] : claro_get_current_course_id();
}
require_once dirname(__FILE__) . '/../lib/announcement.lib.php';
$courseData = claro_get_course_data($courseId);
$toolNameList = claro_get_tool_name_list();
$announcementList = announcement_get_item_list($context, 'DESC');
$organizer = (array) array($courseData['titular'], $courseData['email']);
$attendees = array();
$categories = array(get_conf('siteName'), $courseData['officialCode'], trim($toolNameList['CLANN']));
foreach ($announcementList as $announcementItem) {
if ('SHOW' == $announcementItem['visibility']) {
/*
$rssList[] = array( 'title' => trim($announcementItem['title'])
, 'category' => trim($toolNameList['CLANN'])
, 'guid' => get_module_url('CLANN') . '/announcements.php?cidReq='.claro_get_current_course_id().'&l#ann'.$announcementItem['id']
, 'link' => get_module_url('CLANN') . '/announcements.php?cidReq='.claro_get_current_course_id().'&l#ann'.$announcementItem['id']
, 'description' => trim(str_replace('<!-- content: html -->','',$announcementItem['content']))
, 'pubDate' => date('r', stripslashes(strtotime($announcementItem['time'])))
//, 'author' => $_course['email']
);
*/
$iCal->addJournal(trim($announcementItem['title']), trim(str_replace('<!-- content: html -->', '', $announcementItem['content'])), strtotime($announcementItem['time']), strtotime($announcementItem['time']), time(), 1, 1, $organizer, $attendees, $categories, 5, 10, 1, array(), 0, '', get_path('rootWeb') . get_module_url('CLANN') . '/announcements.php?cidReq=' . $courseId . '&l#ann' . $announcementItem['id'], get_locale('iso639_1_code'), '');
}
}
return $iCal;
}
开发者ID:rhertzog,项目名称:lcs,代码行数:39,代码来源:ical.write.cnr.php
示例8: callback_parse_path
function callback_parse_path($matches)
{
if (count($matches) < 2) {
return "";
}
return get_path($matches[1]);
}
开发者ID:BGCX262,项目名称:zwf-svn-to-git,代码行数:7,代码来源:paths.php
示例9: update
public function update($id, $args)
{
$langs = get_langs();
if ($this->valid($args, $this->rules())) {
$page = $this->findItem($id);
$page->image = get_path($args['image']);
$page->post_status = $args['post_status'];
$page->template = $args['template'];
if (!$page->update()) {
throw new ExcuteException('save_error', 'Không lưu được');
}
$syncs = [];
foreach ($langs as $lang) {
$code = $args[$lang->code];
$page_title = $code['post_title'];
$slug = $code['slug'];
$slug = trim($slug) == '' ? toSlug($page_title) : toSlug($slug);
$page_desc = ['post_title' => $page_title, 'slug' => $slug, 'post_content' => $code['post_content'], 'post_excerpt' => $code['post_excerpt']];
$syncs[$lang->id] = $page_desc;
}
$page->langs()->sync($syncs);
} else {
throw new ValidationException('Error Validation', 'Điền đầy đủ các thông tin!');
}
}
开发者ID:JamesNguyen9x,项目名称:vatc,代码行数:25,代码来源:PageRepository.php
示例10: GENERAR_ARTICULOS
function GENERAR_ARTICULOS()
{
$data = '';
$categoria = isset($_GET['categoria']) ? db_codex($_GET['categoria']) : 0;
if ($categoria) {
$c = "SELECT * FROM ventas_categorias WHERE id_categoria='{$categoria}'";
$resultado = db_consultar($c);
if (db_resultado($resultado, 'padre') > 0) {
$data .= "<h1>Mostrando publicaciones de la sub-categoria <span style='color:#00F'>" . db_resultado($resultado, 'nombre') . "</span></h1>";
$data .= "Ubicación: " . get_path($categoria) . "<br />";
$data .= "<hr />";
$data .= "Deseo publicar una <a href=\"./vender?op={$categoria}\">venta</a> en esta categoría<br />";
$data .= "<hr />";
$WHERE = "z.id_categoria='{$categoria}'";
} else {
$data .= "<h1>Mostrando publicaciones recientes de la categoria <span style='color:#00F'>" . db_resultado($resultado, 'nombre') . "</span></h1>";
$WHERE = "(SELECT padre FROM ventas_categorias AS b where b.id_categoria=z.id_categoria)='{$categoria}'";
}
} else {
$data .= "<h1>Publicaciones mas recientes</h1>";
// Mostrar todos los articulos recientes
$WHERE = "1";
}
$WHERE .= " AND z.tipo IN (" . _A_aceptado . "," . _A_promocionado . ") AND fecha_fin >= CURDATE()";
$data .= VISTA_ListaPubs($WHERE, "ORDER BY promocionado DESC, fecha_ini DESC", "indice");
return $data;
}
开发者ID:vlad88sv,项目名称:YoMachete,代码行数:27,代码来源:contenido.php
示例11: get_block
/**
* return the content
*
* @param coursecode $key
* @param array $context
* @return string : html content
*/
public static function get_block($key, $isadmin, $context = null, $right = null)
{
$out = self::get_content($key, $context, $right);
if ($isadmin) {
$out .= '<p>' . "\n" . '<a href="' . get_path('rootAdminWeb') . 'managing/editFile.php?cmd=rqEdit&file=textzone_messaging_top.inc.html">' . "\n" . '<img src="' . get_icon_url('edit') . '" alt="" />' . get_lang('Edit text zone') . "\n" . '</a>' . "\n" . '</p>';
}
return $out;
}
开发者ID:rhertzog,项目名称:lcs,代码行数:15,代码来源:textzone.lib.php
示例12: after_setup_theme
/**
* Sets up theme defaults and registers support for various features.
*/
function after_setup_theme()
{
load_theme_textdomain(config('textdomain'), get_path('i18n'));
// Let WordPress manage the document title.
// By adding theme support, we declare that this theme does not use a
// hard-coded <title> tag in the document head, and expect WordPress to
// provide it for us.
add_theme_support('title-tag');
}
开发者ID:smikhalevski,项目名称:wp-theme,代码行数:12,代码来源:functions.php
示例13: down
public function down()
{
$this->remove_access();
$this->remove_menu();
$this->remove_setting();
@unlink(get_path('{www}{www image}/people'));
$this->drop_table('cms_people');
return true;
}
开发者ID:ProjectOrangeBox,项目名称:cms-people,代码行数:9,代码来源:v1.0.0-cms_people.php
示例14: claro_is_user_platform_admin
/**
* return true if the user in parameter is admin, false is the user in parameter is not admin
*
* @param int $userId
* @return bool true if the user is admin
* false if the user is not admin
*/
function claro_is_user_platform_admin($userId)
{
static $uidAdmin = false;
require_once get_path('incRepositorySys') . '/lib/user.lib.php';
if (!$uidAdmin) {
$uidAdmin = claro_get_uid_of_platform_admin();
}
return in_array($userId, $uidAdmin);
}
开发者ID:rhertzog,项目名称:lcs,代码行数:16,代码来源:tools.lib.php
示例15: down
public function down()
{
$this->remove_access();
$this->remove_menu();
$this->drop_table('cms_banners');
/* remove only if empty */
@unlink(get_path('{www}{www image}/banners'));
return true;
}
开发者ID:ProjectOrangeBox,项目名称:cms-banner,代码行数:9,代码来源:v1.0.0-cms_banner.php
示例16: notify
/**
* notify by email the user of the reception of a message
*
* @param array of int: $userDataList user identificatin list
* @param MessageToSend $message message envoy�
* @param int $messageId identification of the message
*
*/
public function notify($userDataList, $message, $messageId)
{
if (!get_conf('mailNotification', TRUE)) {
return;
}
// sender name and email
if ($message->getSender() == 0) {
$userData = array('mail' => get_conf('no_reply_mail') ? get_conf('no_reply_mail') : get_conf('administrator_email'), 'firstName' => get_lang('Message from %platformName', array('%platformName' => get_conf('siteName'))), 'lastName' => '');
} else {
$userData = claro_get_current_user_data();
}
//************************************ IS MANAGER
$stringManager = false;
$courseManagers = claro_get_course_manager_id($message->getCourseCode());
$nbrOfManagers = count($courseManagers);
for ($countManager = 0; $countManager < $nbrOfManagers; $countManager++) {
if ($message->getSender() == $courseManagers[$countManager]) {
$courseData = claro_get_course_data($message->getCourseCode());
$stringManager = get_block('Course manager of %course%(%courseCode%)', array('%course%' => $courseData['name'], '%courseCode%' => $courseData['officialCode']));
}
}
//---------------------- email subject
$emailSubject = '[' . get_conf('siteName');
if (!is_null($message->getCourseCode())) {
$courseData = claro_get_course_data($message->getCourseCode());
if ($courseData) {
$emailSubject .= ' - ' . $courseData['officialCode'];
}
}
$emailSubject .= '] ' . $message->getSubject();
//------------------------------subject
/* $altBody = get_lang('If you can\'t read this message go to: ') . rtrim( get_path('rootWeb'), '/' ) . '/claroline/messaging/readmessage.php?messageId=' . $messageId . '&type=received' . "\n\n"
. '-- '
. claro_get_current_user_data('lastName') . " " . claro_get_current_user_data('firstName') . "\n"
. $stringManager
. "\n\n" . get_conf('siteName') ." <" . get_conf('rootWeb') . '>' . "\n"
. ' ' . get_lang('Administrator') . ' : ' . get_conf('administrator_name') . ' <' . get_conf('administrator_email') . '>' . "\n"
; */
//-------------------------BODY
$msgContent = claro_parse_user_text($message->getMessage());
$urlAppend = get_path('url');
if (!empty($urlAppend)) {
$msgContent = preg_replace('!href="' . get_path('url') . '!', 'href="' . rtrim(get_path('rootWeb'), '/') . '/', $msgContent);
$msgContent = preg_replace('!\\>' . get_path('url') . '!', '>' . get_path('rootWeb'), $msgContent);
} else {
$msgContent = preg_replace('!href="/!', 'href="' . rtrim(get_path('rootWeb'), '/') . '/', $msgContent);
}
$emailBody = "<html><head></head><body>" . $msgContent . '<br /><br />' . '-- <br />' . get_lang('%firstName %lastName', array('%firstName' => $userData['firstName'], '%lastName' => $userData['lastName'])) . "<br />" . $stringManager . '<br /><br /><a href="' . get_conf('rootWeb') . '">' . get_conf('siteName') . '</a><br />' . ' ' . get_lang('Administrator') . ': <a href="mailto:' . get_conf('administrator_email') . '">' . get_conf('administrator_name') . '</a><br />' . '</body></html>';
//******************************** END BODY
//******************************************
if (empty($userData['mail']) || !is_well_formed_email_address($userData['mail'])) {
// do not send email for a user with no mail address
pushClaroMessage('Mail Notification Failed : User has no email or an invalid one : ' . var_export($userData, true) . '!');
return claro_failure::set_failure(get_lang("Mail Notification Failed : You don't have any email address defined in your user profile or the defined email address is not valid."));
}
self::emailNotification($userDataList, $emailBody, $emailSubject, $userData['mail'], get_lang('%firstName %lastName', array('%firstName' => $userData['firstName'], '%lastName' => $userData['lastName'])));
}
开发者ID:rhertzog,项目名称:lcs,代码行数:65,代码来源:mail.notifier.lib.php
示例17: renderContent
public function renderContent()
{
$output = '';
$course = claro_get_current_course_data();
$course['db'] = $course['dbName'];
$toolId = get_tool_id_from_module_label('CLANN');
if (is_module_installed_in_course('CLANN', claro_get_current_course_id()) && is_tool_activated_in_course($toolId, claro_get_current_course_id()) && claro_is_tool_visible($toolId, claro_get_current_course_id())) {
$announcementList = announcement_get_course_item_list_portlet($course);
// Manage announcement's datas
if ($announcementList) {
$output .= '<dl id="portletAnnouncements">' . "\n";
$i = 0;
foreach ($announcementList as $announcementItem) {
// Generate announcement URL
$announcementItem['url'] = get_path('url') . '/claroline/announcements/announcements.php?cidReq=' . $course['sysCode'];
// Generate announcement title and content
$announcementItem['title'] = trim(strip_tags($announcementItem['title']));
if ($announcementItem['title'] == '') {
$announcementItem['title'] = substr($announcementItem['title'], 0, 60) . (strlen($announcementItem['title']) > 60 ? ' (...)' : '');
}
$announcementItem['content'] = trim(strip_tags($announcementItem['content']));
if ($announcementItem['content'] == '') {
$announcementItem['content'] = substr($announcementItem['content'], 0, 60) . (strlen($announcementItem['content']) > 60 ? ' (...)' : '');
}
// Don't display hidden and expired elements
$isVisible = (bool) ($announcementItem['visibility'] == 'SHOW') ? 1 : 0;
$isOffDeadline = (bool) (isset($announcementItem['visibleFrom']) && strtotime($announcementItem['visibleFrom']) > time() || isset($announcementItem['visibleUntil']) && time() >= strtotime($announcementItem['visibleUntil'])) ? 1 : 0;
// Prepare the render
$displayChar = 250;
if (strlen($announcementItem['content']) > $displayChar) {
$content = substr($announcementItem['content'], 0, $displayChar) . '... <a href="' . claro_htmlspecialchars(Url::Contextualize($announcementItem['url'])) . '">' . '<b>' . get_lang('Read more »') . '</b></a>';
} else {
$content = $announcementItem['content'];
}
if ($isVisible && !$isOffDeadline) {
$output .= '<dt>' . "\n" . '<h2> ' . '<a href="' . $announcementItem['url'] . '#item' . $announcementItem['id'] . '">' . (!empty($announcementItem['title']) ? $announcementItem['title'] : get_lang('No title')) . '</a></h2>' . "\n" . '</dt>' . "\n" . '<dd' . ($i == count($announcementList) - 1 ? ' class="last"' : '') . '>' . "\n" . $content . "\n" . (claro_is_allowed_to_edit() ? '<div class="manageTools"><a
href="' . claro_htmlspecialchars(Url::Contextualize(get_module_url('CLANN') . '/announcements.php?cmd=rqEdit&id=' . $announcementItem['id'])) . '"
title="' . get_lang('Edit this item') . '">
<img src="' . get_icon_url('edit') . '" alt="' . get_lang('Edit') . '" />
</a>
<a
href="' . claro_htmlspecialchars(Url::Contextualize(get_module_url('CLANN') . '/announcements.php?cmd=exDelete&id=' . $announcementItem['id'])) . '"
title="' . get_lang('Delete this item') . '">
<img src="' . get_icon_url('delete') . '" alt="' . get_lang('Delete') . '" />
</a></div>' : '') . '</dd>' . "\n";
}
$i++;
}
$output .= '</dl>';
} else {
$output .= "\n" . '<dl>' . "\n" . '<dt></dt>' . "\n" . '<dd class="last">' . ' ' . get_lang('No announcement') . "\n" . '</dd>' . "\n" . '</dl>' . "\n\n";
}
}
return $output;
}
开发者ID:rhertzog,项目名称:lcs,代码行数:56,代码来源:coursehomepage.cnr.php
示例18: _write_script_tags
function _write_script_tags($files)
{
foreach ($files as $file) {
if (!preg_match('|\\.js$|', $file)) {
$file = $file . '.js';
}
$path = get_path($file, 'js');
print "<script src='{$path}' type='text/javascript'></script>\n";
}
}
开发者ID:keithnorm,项目名称:WP-Asset-Packager,代码行数:10,代码来源:asset_packager.php
示例19: is_xml
function is_xml($link = NULL)
{
if ($link === NULL) {
$link = $_SERVER['REQUEST_URI'];
}
if (preg_match('#.+\\.xml#', end(get_path($link)))) {
return true;
}
return false;
}
开发者ID:aidoskz,项目名称:Storage,代码行数:10,代码来源:function.php
示例20: store
/**
* Store a newly created resource in storage.
*
* @return Response
*/
public function store(PartnerCreateRequest $request)
{
$partner = new Partner();
$partner->name = $request->get('name');
$partner->link = $request->get('link');
$partner->logo = get_path($request->get('image'));
$partner->status = $request->get('status');
$partner->save();
return redirect()->route('admin.partner.index');
}
开发者ID:huudo,项目名称:bds1,代码行数:15,代码来源:PartnerController.php
注:本文中的get_path函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论