PageRenderTime 685ms queryFilters 0ms Sphinxql 148ms GetByIds 518ms meta 0ms repositoryFilters 0ms languageFilters 0ms sourceFilters 0ms

207 results for 'php method_exists repo:moodle/moodle' (685 ms)

Source

Language

Repository

locallib.php git://github.com/moodle/moodle.git | PHP | 471 lines
1<?php
2// This file is part of Moodle - http://moodle.org/
410                foreach ($fields as $field) {
411                    require_once($CFG->dirroot.'/user/profile/field/'.$field->datatype.'/field.class.php');
412                    $newfield = 'profile_field_'.$field->datatype;
413                    $formfield = new $newfield($field->id, $data->id);
414                    if (method_exists($formfield, 'convert_external_data')) {
415                        $data->$key = $formfield->convert_external_data($value);
446                foreach ($fields as $field) {
447                    require_once($CFG->dirroot.'/user/profile/field/'.$field->datatype.'/field.class.php');
448                    $newfield = 'profile_field_'.$field->datatype;
449                    $formfield = new $newfield($field->id, 0);
450                    if (method_exists($formfield, 'convert_external_data') &&
451                            is_null($formfield->convert_external_data($value))) {
455                    // Check for duplicate value.
456                    if (method_exists($formfield, 'edit_validate_field') ) {
457                        $testuser = new stdClass();
format.php git://github.com/moodle/moodle.git | PHP | 1,187 lines
1<?php
2// This file is part of Moodle - http://moodle.org/
266            $qtype = question_bank::get_qtype($qtypehint, false);
267            if (is_object($qtype) && method_exists($qtype, $methodname)) {
268                $question = $qtype->$methodname($data, $question, $this, $extra);
277        foreach (question_bank::get_all_qtypes() as $qtype) {
278            if (method_exists($qtype, $methodname)) {
279                if ($question = $qtype->$methodname($data, $question, $this, $extra)) {
303        // Raise time and memory, as importing can be quite intensive.
304        core_php_time_limit::raise();
305        raise_memory_limit(MEMORY_EXTRA);
377
378            // reset the php timeout
379            core_php_time_limit::raise();
840        $qtype = question_bank::get_qtype($name, false);
841        if (method_exists($qtype, $methodname)) {
842            return $qtype->$methodname($question, $this, $extra);
weblib.php git://github.com/moodle/moodle.git | PHP | 3,722 lines
1<?php
2// This file is part of Moodle - http://moodle.org/
161 *
162 * This function is necessary because PHP_SELF and REQUEST_URI and SCRIPT_NAME
163 * return different things depending on a lot of things like your OS, Web
163 * return different things depending on a lot of things like your OS, Web
164 * server, and the way PHP is compiled (ie. as a CGI, module, ISAPI, etc.)
165 * <b>NOTE:</b> This function returns false if the global variables needed are not set.
1110    global $CFG;
1111    require_once($CFG->libdir.'/phpmailer/moodle_phpmailer.php');
1112
1341        // the text before storing into database which would be itself big bug..
1342        $text = str_replace("\"$CFG->wwwroot/draftfile.php", "\"$CFG->wwwroot/brokenfile.php#", $text);
1343
1383 *
1384 * @param bool $phpunitreset true means called from our PHPUnit integration test reset
1385 * @return void
PEAR.php git://github.com/moodle/moodle.git | PHP | 1,083 lines
1<?php
2/**
11 * @author     Sterling Hughes <sterling@php.net>
12 * @author     Stig Bakken <ssb@php.net>
13 * @author     Tomas V.V.Cox <cox@idecnet.com>
13 * @author     Tomas V.V.Cox <cox@idecnet.com>
14 * @author     Greg Beaver <cellog@php.net>
15 * @copyright  1997-2010 The Authors
84 * @since      Class available since PHP 4.0.2
85 * @link        http://pear.php.net/manual/en/core.pear.php#core.pear.pear
86 */
537            // little non-eval hack to fix bug #12147
538            include 'PEAR/FixPHP5PEARWarnings.php';
539            return $a;
803 * @version    Release: 1.9.1
804 * @link       http://pear.php.net/manual/en/core.pear.pear-error.php
805 * @see        PEAR::raiseError(), PEAR::throwError()
grade_grade_test.php https://bitbucket.org/moodle/moodle.git | PHP | 509 lines
1<?php
2// This file is part of Moodle - http://moodle.org/
18 * @package    core_grades
19 * @category   phpunit
20 * @copyright  nicolas@moodle.com
25
26require_once(__DIR__.'/fixtures/lib.php');
27
60        $grade_grade = new grade_grade();
61        $this->assertTrue(method_exists($grade_grade, 'insert'));
62
89        $grade_grade = new grade_grade($this->grade_grades[0], false);
90        $this->assertTrue(method_exists($grade_grade, 'update'));
91    }
94        $grade_grade = new grade_grade();
95        $this->assertTrue(method_exists($grade_grade, 'fetch'));
96
Locator.php git://github.com/moodle/moodle.git | PHP | 424 lines
1<?php
2/**
4 *
5 * A PHP-Based RSS and Atom Feed Framework.
6 * Takes the hard work out of managing a complete RSS/Atom solution.
40 * @link http://simplepie.org/ SimplePie
41 * @license http://www.opensource.org/licenses/bsd-license.php BSD License
42 */
192				$this->base = $base;
193				$this->base_location = method_exists($element, 'getLineNo') ? $element->getLineNo() : 0;
194				break;
231				$rel = array_unique($this->registry->call('Misc', 'space_separated_tokens', array(strtolower($link->getAttribute('rel')))));
232				$line = method_exists($link, 'getLineNo') ? $link->getLineNo() : 1;
233
281				{
282					if (method_exists($link, 'getLineNo') && $this->base_location < $link->getLineNo())
283					{
Twitter.php git://github.com/moodle/moodle.git | PHP | 1,034 lines
1<?php
2/**
25 */
26require_once 'Zend/Rest/Client.php';
27
30 */
31require_once 'Zend/Rest/Client/Result.php';
32
35 */
36require_once 'Zend/Oauth/Consumer.php';
37
225        if (!in_array($type, $this->_methodTypes)) {
226            include_once 'Zend/Service/Twitter/Exception.php';
227            throw new Zend_Service_Twitter_Exception(
244    {
245        if (method_exists($this->_oauthConsumer, $method)) {
246            $return = call_user_func_array(array($this->_oauthConsumer, $method), $params);
Simple.php git://github.com/moodle/moodle.git | PHP | 327 lines
1<?php
2
9 *
10 * PHP versions 4 and 5
11 *
13 *
14 * Copyright (c) 2002-2008 The PHP Group
15 * All rights reserved.
42 * @package   XML_Parser
43 * @author    Stephan Schmidt <schst@php.net>
44 * @copyright 2004-2008 Stephan Schmidt <schst@php.net>
46 * @version   CVS: $Id$
47 * @link      http://pear.php.net/package/XML_Parser
48 */
52 */
53require_once 'XML/Parser.php';
54
grade_outcome_test.php git://github.com/moodle/moodle.git | PHP | 106 lines
1<?php
2// This file is part of Moodle - http://moodle.org/
18 * @package    core_grades
19 * @category   phpunit
20 * @copyright  nicolas@moodle.com
25
26require_once(__DIR__.'/fixtures/lib.php');
27
52        $grade_outcome = new grade_outcome();
53        $this->assertTrue(method_exists($grade_outcome, 'insert'));
54
70        $grade_outcome = new grade_outcome($this->grade_outcomes[0], false);
71        $this->assertTrue(method_exists($grade_outcome, 'update'));
72        $grade_outcome->shortname = 'Team work';
80        $grade_outcome = new grade_outcome($this->grade_outcomes[0], false);
81        $this->assertTrue(method_exists($grade_outcome, 'delete'));
82
pagelib.php git://github.com/moodle/moodle.git | PHP | 2,084 lines
1<?php
2// This file is part of Moodle - http://moodle.org/
320     * @var int Sets the page to refresh after a given delay (in seconds) using
321     * meta refresh in {@link standard_head_html()} in outputlib.php
322     * If set to null(default) the page is not refreshed
818    /**
819     * PHP overloading magic to make the $PAGE->course syntax work by redirecting
820     * it to the corresponding $PAGE->magic_get_course() method if there is one, and
828        $getmethod = 'magic_get_' . $name;
829        if (method_exists($this, $getmethod)) {
830            return $this->$getmethod();
836    /**
837     * PHP overloading magic to catch obvious coding errors.
838     *
849    public function __set($name, $value) {
850        if (method_exists($this, 'set_' . $name)) {
851            throw new coding_exception('Invalid attempt to modify page object', "Use \$PAGE->set_$name() instead.");
Base.php git://github.com/moodle/moodle.git | PHP | 573 lines
1<?php
2
26 */
27require_once 'Zend/Gdata/App/Util.php';
28
306            if (!$success) {
307                require_once 'Zend/Gdata/App/Exception.php';
308                throw new Zend_Gdata_App_Exception("DOMDocument cannot parse XML: $php_errormsg");
311            if (!$element) {
312                require_once 'Zend/Gdata/App/Exception.php';
313                throw new Zend_Gdata_App_Exception('No root <' . $this->_rootElement . '> element');
316        } else {
317            require_once 'Zend/Gdata/App/Exception.php';
318            throw new Zend_Gdata_App_Exception('XML passed to transferFromXML cannot be null');
477        $method = 'get'.ucfirst($name);
478        if (method_exists($this, $method)) {
479            return call_user_func(array(&$this, $method));
navigationlib_test.php git://github.com/moodle/moodle.git | PHP | 656 lines
1<?php
2// This file is part of Moodle - http://moodle.org/
17/**
18 * Unit tests for lib/navigationlib.php
19 *
20 * @package   core
21 * @category  phpunit
22 * @copyright 2009 Sam Hemelryk
28global $CFG;
29require_once($CFG->libdir . '/navigationlib.php');
30
349        $page->set_course($course);
350        $page->set_url(new moodle_url('/course/view.php', array('id' => $course->id)));
351        $page->navbar->prepend('test 1');
568        }
569        if (method_exists($this, $method)) {
570            return call_user_func_array(array($this, $method), $arguments);
IRI.php git://github.com/moodle/moodle.git | PHP | 1,236 lines
1<?php
2/**
4 *
5 * A PHP-Based RSS and Atom Feed Framework.
6 * Takes the hard work out of managing a complete RSS/Atom solution.
40 * @link http://simplepie.org/ SimplePie
41 * @license http://www.opensource.org/licenses/bsd-license.php BSD License
42 */
52 * @copyright 2007-2012 Geoffrey Sneddon, Steve Minutillo, Ryan McCue
53 * @license http://www.opensource.org/licenses/bsd-license.php
54 */
149	{
150		if (method_exists($this, 'set_' . $name))
151		{
225	{
226		return method_exists($this, 'get_' . $name) || isset($this->$name);
227	}
grade_scale_test.php https://bitbucket.org/moodle/moodle.git | PHP | 171 lines
1<?php
2// This file is part of Moodle - http://moodle.org/
18 * @package    core_grades
19 * @category   phpunit
20 * @copyright  nicolas@moodle.com
25
26require_once(__DIR__.'/fixtures/lib.php');
27
60        $grade_scale = new grade_scale();
61        $this->assertTrue(method_exists($grade_scale, 'insert'));
62
80        $grade_scale = new grade_scale($this->scale[1], false);
81        $this->assertTrue(method_exists($grade_scale, 'update'));
82
91        $grade_scale = new grade_scale($this->scale[4], false); // Choose one we're not using elsewhere.
92        $this->assertTrue(method_exists($grade_scale, 'delete'));
93
restore_structure_step.class.php git://github.com/moodle/moodle.git | PHP | 548 lines
1<?php
2
27 *
28 * TODO: Finish phpdocs
29 */
280            $backupclassname = 'backup_' . $plugintype . '_' . $name . '_plugin';
281            $backupfile = $pluginsdir . '/backup/moodle2/' . $backupclassname . '.class.php';
282            if (file_exists($backupfile)) {
286            $restoreclassname = 'restore_' . $plugintype . '_' . $name . '_plugin';
287            $restorefile = $pluginsdir . '/backup/moodle2/' . $restoreclassname . '.class.php';
288            if (file_exists($restorefile)) {
350        $parentfile = core_component::get_component_directory($plugintype . '_' . $pluginname) .
351            '/backup/moodle2/' . $parentclass . '.class.php';
352        if (file_exists($parentfile)) {
359            $classname = 'restore_' . $subplugintype . '_' . $name . '_subplugin';
360            $restorefile = $subpluginsdir . '/backup/moodle2/' . $classname . '.class.php';
361            if (file_exists($restorefile)) {
BaseMediaSource.php git://github.com/moodle/moodle.git | PHP | 180 lines
1<?php
2
26 */
27require_once 'Zend/Gdata/App/MediaSource.php';
28
113        $method = 'get'.ucfirst($name);
114        if (method_exists($this, $method)) {
115            return call_user_func(array(&$this, $method));
118        } else {
119            require_once 'Zend/Gdata/App/InvalidArgumentException.php';
120            throw new Zend_Gdata_App_InvalidArgumentException(
137        $method = 'set'.ucfirst($name);
138        if (method_exists($this, $method)) {
139            return call_user_func(array(&$this, $method), $val);
142        } else {
143            require_once 'Zend/Gdata/App/InvalidArgumentException.php';
144            throw new Zend_Gdata_App_InvalidArgumentException(
group.php git://github.com/moodle/moodle.git | PHP | 278 lines
1<?php
2// This file is part of Moodle - http://moodle.org/
27
28require_once("HTML/QuickForm/group.php");
29require_once('templatable_form_element.php');
67    /**
68     * Old syntax of class constructor. Deprecated in PHP7.
69     *
114        foreach ($this->_elements as $element){
115            if (method_exists($element, 'setHiddenLabel')){
116                $element->setHiddenLabel(true);
164
165        include_once('HTML/QuickForm/Renderer/Default.php');
166
190
191            // Replicates the separator logic from 'pear/HTML/QuickForm/Renderer/Default.php'.
192            $separator = '';
Locator.php https://bitbucket.org/moodle/moodle.git | PHP | 424 lines
1<?php
2/**
4 *
5 * A PHP-Based RSS and Atom Feed Framework.
6 * Takes the hard work out of managing a complete RSS/Atom solution.
40 * @link http://simplepie.org/ SimplePie
41 * @license http://www.opensource.org/licenses/bsd-license.php BSD License
42 */
192				$this->base = $base;
193				$this->base_location = method_exists($element, 'getLineNo') ? $element->getLineNo() : 0;
194				break;
231				$rel = array_unique($this->registry->call('Misc', 'space_separated_tokens', array(strtolower($link->getAttribute('rel')))));
232				$line = method_exists($link, 'getLineNo') ? $link->getLineNo() : 1;
233
281				{
282					if (method_exists($link, 'getLineNo') && $this->base_location < $link->getLineNo())
283					{
behat_tool_lp_data_generators.php git://github.com/moodle/moodle.git | PHP | 362 lines
1<?php
2// This file is part of Moodle - http://moodle.org/
25
26require_once(__DIR__ . '/../../../../../lib/behat/behat_base.php');
27
108        // Now that we need them require the data generators.
109        require_once(__DIR__.'/../../../../../lib/phpunit/classes/util.php');
110
148            // Preprocess the entities that requires a special treatment.
149            if (method_exists($this, 'preprocess_' . $elementdatagenerator)) {
150                $elementdata = $this->{'preprocess_' . $elementdatagenerator}($elementdata);
154            $methodname = 'create_' . $elementdatagenerator;
155            if (method_exists($this->datageneratorlp, $methodname)) {
156                // Using data generators directly.
158
159            } else if (method_exists($this, 'process_' . $elementdatagenerator)) {
160                // Using an alternative to the direct data generator call.
behat_tool_lp_data_generators.php https://bitbucket.org/moodle/moodle.git | PHP | 362 lines
1<?php
2// This file is part of Moodle - http://moodle.org/
25
26require_once(__DIR__ . '/../../../../../lib/behat/behat_base.php');
27
108        // Now that we need them require the data generators.
109        require_once(__DIR__.'/../../../../../lib/phpunit/classes/util.php');
110
148            // Preprocess the entities that requires a special treatment.
149            if (method_exists($this, 'preprocess_' . $elementdatagenerator)) {
150                $elementdata = $this->{'preprocess_' . $elementdatagenerator}($elementdata);
154            $methodname = 'create_' . $elementdatagenerator;
155            if (method_exists($this->datageneratorlp, $methodname)) {
156                // Using data generators directly.
158
159            } else if (method_exists($this, 'process_' . $elementdatagenerator)) {
160                // Using an alternative to the direct data generator call.
1 2 3 4 5 6 7 8 9 10 11