本文整理汇总了PHP中Resource::Resource方法的典型用法代码示例。如果您正苦于以下问题:PHP Resource::Resource方法的具体用法?PHP Resource::Resource怎么用?PHP Resource::Resource使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Resource
的用法示例。
在下文中一共展示了Resource::Resource方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
/**
* Create a new course description
* @param int $id
* @param string $title
* @param string $content
*/
function __construct($id, $title, $content, $description_type)
{
parent::Resource($id, RESOURCE_COURSEDESCRIPTION);
$this->title = $title;
$this->content = $content;
$this->description_type = $description_type;
}
示例2: LinkCategory
/**
* Create a new LinkCategory
* @param int $id
* @param string $title
* @param string $description
*/
function LinkCategory($id, $title, $description, $display_order)
{
parent::Resource($id, RESOURCE_LINKCATEGORY);
$this->title = $title;
$this->description = $description;
$this->display_order = $display_order;
}
示例3: Glossary
/**
* Create a new Glossary
* @param int $id
* @param string $name
* @param string $description
* @param int $display_order
*/
function Glossary($id, $name, $description, $display_order)
{
parent::Resource($id, RESOURCE_GLOSSARY);
$this->glossary_id = $id;
$this->name = $name;
$this->description = $description;
$this->display_order = $display_order;
}
示例4: SurveyInvitation
/**
* Create a new SurveyInvitation
* @param int $id
* @param string $code
* @param string $user
* @param string $invitation_code
* @param string $invitation_date
* @param string $reminder_date
*/
function SurveyInvitation($id, $code, $user, $invitation_code, $invitation_date, $reminder_date)
{
parent::Resource($id, RESOURCE_SURVEYINVITATION);
$this->code = $code;
$this->user = $user;
$this->invitation_code = $invitation_code;
$this->invitation_date = $invitation_date;
$this->reminder_date = $reminder_date;
}
示例5: Document
/**
* Create a new Document
* @param int $id
* @param string $path
* @param string $comment
* @param string $title
* @param string $file_type (DOCUMENT or FOLDER);
* @param int $size
*/
public function Document($id, $path, $comment, $title, $file_type, $size)
{
parent::Resource($id, RESOURCE_DOCUMENT);
$this->path = 'document' . $path;
$this->comment = $comment;
$this->title = $title;
$this->file_type = $file_type;
$this->size = $size;
}
示例6: Link
/**
* Create a new Link
* @param int $id The id of this link in the Chamilo-course
* @param string $title
* @param string $url
* @param string $description
*/
public function Link($id, $title, $url, $description, $category_id, $on_homepage)
{
parent::Resource($id, RESOURCE_LINK);
$this->title = $title;
$this->url = $url;
$this->description = $description;
$this->category_id = $category_id;
$this->on_homepage = $on_homepage;
}
示例7: Announcement
/**
* Create a new announcement
* @param int $id
* @param string $title
* @param string $content
* @param string $date
* @param int display_order
*/
function Announcement($id, $title, $content, $date, $display_order, $email_sent, $path, $filename, $size, $comment)
{
parent::Resource($id, RESOURCE_ANNOUNCEMENT);
$this->content = $content;
$this->title = $title;
$this->date = $date;
$this->display_order = $display_order;
$this->email_sent = $email_sent;
$this->attachment_path = $path;
$this->attachment_filename = $filename;
$this->attachment_size = $size;
$this->attachment_comment = $comment;
}
示例8: Event
/**
* Create a new Event
* @param int $id
* @param string $title
* @param string $content
* @param string $date
* @param string $hour
* @param int $duration
*/
function Event($id, $title, $content, $start_date, $end_date, $attachment_path = null, $attachment_filename = null, $attachment_size = null, $attachment_comment = null, $all_day = 0)
{
parent::Resource($id, RESOURCE_EVENT);
$this->title = $title;
$this->content = $content;
$this->start_date = $start_date;
$this->end_date = $end_date;
$this->all_day = $all_day;
$this->attachment_path = $attachment_path;
$this->attachment_filename = $attachment_filename;
$this->attachment_size = $attachment_size;
$this->attachment_comment = $attachment_comment;
}
示例9: SurveyQuestion
/**
* Create a new SurveyQuestion
* @param int $id
* @param int $survey_id
* @param string $survey_question
* @param string $survey_question_comment
* @param string $type
* @param string $display
* @param int $sort
* @param int $shared_question_id
* @param int $max_value
*/
function SurveyQuestion($id, $survey_id, $survey_question, $survey_question_comment, $type, $display, $sort, $shared_question_id, $max_value)
{
parent::Resource($id, RESOURCE_SURVEYQUESTION);
$this->survey_id = $survey_id;
$this->survey_question = $survey_question;
$this->survey_question_comment = $survey_question_comment;
$this->survey_question_type = $type;
$this->display = $display;
$this->sort = $sort;
$this->shared_question_id = $shared_question_id;
$this->max_value = $max_value;
$this->answers = array();
}
示例10: Wiki
function Wiki($id, $page_id, $reflink, $title, $content, $user_id, $group_id, $timestamp, $progress, $version)
{
parent::Resource($id, RESOURCE_WIKI);
$this->id = $id;
$this->page_id = $page_id;
$this->reflink = $reflink;
$this->title = $title;
$this->content = $content;
$this->user_id = $user_id;
$this->group_id = $group_id;
$this->dtime = $timestamp;
$this->progress = $progress;
$this->version = $version;
}
示例11: QuizQuestion
/**
* Create a new QuizQuestion
* @param string $question
* @param string $description
* @param int $ponderation
* @param int $type
* @param int $position
*/
public function QuizQuestion($id, $question, $description, $ponderation, $type, $position, $picture, $level, $extra, $question_category = 0)
{
parent::Resource($id, RESOURCE_QUIZQUESTION);
$this->question = $question;
$this->description = $description;
$this->ponderation = $ponderation;
$this->quiz_type = $type;
$this->position = $position;
$this->picture = $picture;
$this->level = $level;
$this->answers = array();
$this->extra = $extra;
$this->question_category = $question_category;
}
示例12: ForumTopic
function ForumTopic($obj)
{
parent::Resource($obj->thread_id, RESOURCE_FORUMTOPIC);
$this->obj = $obj;
/*
$this->title = $title;
$this->time = $time;
$this->topic_poster_id = $topic_poster_id;
$this->topic_poster_name = $topic_poster_name;
$this->forum_id = $forum_id;
$this->last_post = $last_post;
$this->replies = $replies;
$this->views = $views;
$this->sticky = $sticky;
$this->locked = $locked;
$this->time_closed = $time_closed;
$this->weight = $weight;
$this->title_qualify = $title_qualify;
$this->qualify_max = $qualify_max; */
}
示例13: CourseCopyLearnpath
/**
* Create a new learnpath
* @param integer ID
* @param integer Type (1,2,3,...)
* @param string $name
* @param string $path
* @param string $ref
* @param string $description
* @param string $content_local
* @param string $default_encoding
* @param string $default_view_mode
* @param bool $prevent_reinit
* @param bool $force_commit
* @param string $content_maker
* @param integer $display_order
* @param string $js_lib
* @param string $content_license
* @param integer $debug
* @param string $visibility
* @param array $items
*/
public function CourseCopyLearnpath($id, $type, $name, $path, $ref, $description, $content_local, $default_encoding, $default_view_mode, $prevent_reinit, $force_commit, $content_maker, $display_order, $js_lib, $content_license, $debug, $visibility, $author, $preview_image, $use_max_score, $autolunch, $created_on, $modified_on, $publicated_on, $expired_on, $session_id, $items)
{
parent::Resource($id, RESOURCE_LEARNPATH);
$this->lp_type = $type;
$this->name = $name;
$this->path = $path;
$this->ref = $ref;
$this->description = $description;
$this->content_local = $content_local;
$this->default_encoding = $default_encoding;
$this->default_view_mod = $default_view_mode;
$this->prevent_reinit = $prevent_reinit;
$this->force_commit = $force_commit;
$this->content_maker = $content_maker;
$this->display_order = $display_order;
$this->js_lib = $js_lib;
$this->content_license = $content_license;
$this->debug = $debug;
$this->visibility = $visibility;
$this->use_max_score = $use_max_score;
$this->autolunch = $autolunch;
$this->created_on = $created_on;
$this->modified_on = $modified_on;
$this->publicated_on = $publicated_on;
$this->expired_on = $expired_on;
$this->session_id = $session_id;
$this->author = $author;
$this->preview_image = $preview_image;
$this->items = $items;
}
示例14: ToolIntro
/**
* Create a new text introduction
* @param int $id The id of this tool introduction in the Chamilo-course
* @param string $intro_text
*/
function ToolIntro($id, $intro_text)
{
parent::Resource($id, RESOURCE_TOOL_INTRO);
$this->id = $id;
$this->intro_text = $intro_text;
}
示例15: ForumCategory
/**
* Create a new ForumCategory
*/
function ForumCategory($obj)
{
parent::Resource($obj->cat_id, RESOURCE_FORUMCATEGORY);
$this->obj = $obj;
}