golden hour
/var/www/html/wp-content/plugins/the-events-calendar/common/src/Tribe
⬆️ Go Up
Upload
File/Folder
Size
Actions
Abstract_Deactivation.php
1.65 KB
Del
OK
Abstract_Plugin_Register.php
1.25 KB
Del
OK
Admin
-
Del
OK
Ajax
-
Del
OK
App_Shop.php
9.87 KB
Del
OK
Asset
-
Del
OK
Assets.php
24.69 KB
Del
OK
Assets_Pipeline.php
1.7 KB
Del
OK
Autoloader.php
8.31 KB
Del
OK
Cache.php
18.13 KB
Del
OK
Cache_Listener.php
5.92 KB
Del
OK
Changelog_Reader.php
1.5 KB
Del
OK
Container.php
11.36 KB
Del
OK
Context
-
Del
OK
Context.php
48.65 KB
Del
OK
Cost_Utils.php
16.44 KB
Del
OK
Credits.php
2.9 KB
Del
OK
Customizer
-
Del
OK
Customizer.php
25.29 KB
Del
OK
DB_Lock.php
10.04 KB
Del
OK
Data.php
5.21 KB
Del
OK
Date_Utils.php
48.59 KB
Del
OK
Db.php
876 B
Del
OK
Debug.php
1.54 KB
Del
OK
Debug_Bar
-
Del
OK
Dependency.php
16.47 KB
Del
OK
Deprecation.php
4.84 KB
Del
OK
Dialog
-
Del
OK
Documentation
-
Del
OK
Duplicate
-
Del
OK
Editor
-
Del
OK
Editor.php
6.58 KB
Del
OK
Error.php
4.51 KB
Del
OK
Exception.php
2.08 KB
Del
OK
Extension.php
13 KB
Del
OK
Extension_Loader.php
3.96 KB
Del
OK
Feature_Detection.php
7.51 KB
Del
OK
Field.php
22.38 KB
Del
OK
Field_Conditional.php
2.37 KB
Del
OK
Freemius.php
1.34 KB
Del
OK
Image
-
Del
OK
JSON_LD
-
Del
OK
Languages
-
Del
OK
Log
-
Del
OK
Log.php
11.33 KB
Del
OK
Main.php
23.13 KB
Del
OK
Meta
-
Del
OK
Models
-
Del
OK
Notices.php
1.49 KB
Del
OK
PUE
-
Del
OK
Plugin_Meta_Links.php
3.45 KB
Del
OK
Plugins.php
5.32 KB
Del
OK
Plugins_API.php
12.2 KB
Del
OK
Post_History.php
2.96 KB
Del
OK
Post_Transient.php
5.76 KB
Del
OK
Process
-
Del
OK
Promise.php
9.04 KB
Del
OK
Promoter
-
Del
OK
REST
-
Del
OK
Repository
-
Del
OK
Repository.php
100.06 KB
Del
OK
Rewrite.php
34.63 KB
Del
OK
Service_Providers
-
Del
OK
Settings.php
23.81 KB
Del
OK
Settings_Manager.php
9.78 KB
Del
OK
Settings_Tab.php
6.93 KB
Del
OK
Shortcode
-
Del
OK
Simple_Table.php
4.01 KB
Del
OK
Support
-
Del
OK
Support.php
14.43 KB
Del
OK
Tabbed_View
-
Del
OK
Tabbed_View.php
8.1 KB
Del
OK
Template.php
43.65 KB
Del
OK
Template_Factory.php
5.45 KB
Del
OK
Template_Part_Cache.php
2.74 KB
Del
OK
Templates.php
1.79 KB
Del
OK
Terms.php
1.51 KB
Del
OK
Timezones.php
18.21 KB
Del
OK
Tooltip
-
Del
OK
Tracker.php
12.51 KB
Del
OK
Traits
-
Del
OK
Updater.php
3.78 KB
Del
OK
Utils
-
Del
OK
Validate.php
16.54 KB
Del
OK
Validator
-
Del
OK
View_Helpers.php
9.64 KB
Del
OK
Widget
-
Del
OK
Edit: Container.php
<?php if ( ! class_exists( 'Tribe__Container' ) ) { /** * Class Tribe__Container * * Tribe Dependency Injection Container. */ class Tribe__Container extends tad_DI52_Container { /** * @var Tribe__Container */ protected static $instance; /** * @return Tribe__Container */ public static function init() { if ( empty( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } } } if ( ! function_exists( 'tribe_singleton' ) ) { /** * Registers a class as a singleton. * * Each call to obtain an instance of this class made using the `tribe( $slug )` function * will return the same instance; the instances are built just in time (if not passing an * object instance or callback function) and on the first request. * The container will call the class `__construct` method on the class (if not passing an object * or a callback function) and will try to automagically resolve dependencies. * * Example use: * * tribe_singleton( 'tec.admin.class', 'Tribe__Admin__Class' ); * * // some code later... * * // class is built here * tribe( 'tec.admin.class' )->doSomething(); * * Need the class built immediately? Build it and register it: * * tribe_singleton( 'tec.admin.class', new Tribe__Admin__Class() ); * * // some code later... * * tribe( 'tec.admin.class' )->doSomething(); * * Need a very custom way to build the class? Register a callback: * * tribe_singleton( 'tec.admin.class', array( Tribe__Admin__Class__Factory, 'make' ) ); * * // some code later... * * tribe( 'tec.admin.class' )->doSomething(); * * Or register the methods that should be called on the object after its construction: * * tribe_singleton( 'tec.admin.class', 'Tribe__Admin__Class', array( 'hook', 'register' ) ); * * // some code later... * * // the `hook` and `register` methods will be called on the built instance. * tribe( 'tec.admin.class' )->doSomething(); * * The class will be built only once (if passing the class name or a callback function), stored * and the same instance will be returned from that moment on. * * @param string $slug The human-readable and catchy name of the class. * @param string|object|callable $class The full class name or an instance of the class * or a callback that will return the instance of the class. * @param array $after_build_methods An array of methods that should be called on * the built object after the `__construct` method; the methods * will be called only once after the singleton instance * construction. */ function tribe_singleton( $slug, $class, array $after_build_methods = null ) { Tribe__Container::init()->singleton( $slug, $class, $after_build_methods ); } } if ( ! function_exists( 'tribe_register' ) ) { /** * Registers a class. * * Each call to obtain an instance of this class made using the `tribe( $slug )` function * will return a new instance; the instances are built just in time (if not passing an * object instance, in that case it will work as a singleton) and on the first request. * The container will call the class `__construct` method on the class (if not passing an object * or a callback function) and will try to automagically resolve dependencies. * * Example use: * * tribe_register( 'tec.some', 'Tribe__Some' ); * * // some code later... * * // class is built here * $some_one = tribe( 'tec.some' )->doSomething(); * * // $some_two !== $some_one * $some_two = tribe( 'tec.some' )->doSomething(); * * Need the class built immediately? Build it and register it: * * tribe_register( 'tec.admin.class', new Tribe__Admin__Class() ); * * // some code later... * * // $some_two === $some_one * // acts like a singleton * $some_one = tribe( 'tec.some' )->doSomething(); * $some_two = tribe( 'tec.some' )->doSomething(); * * Need a very custom way to build the class? Register a callback: * * tribe_register( 'tec.some', array( Tribe__Some__Factory, 'make' ) ); * * // some code later... * * // $some_two !== $some_one * $some_one = tribe( 'tec.some' )->doSomething(); * $some_two = tribe( 'tec.some' )->doSomething(); * * Or register the methods that should be called on the object after its construction: * * tribe_singleton( 'tec.admin.class', 'Tribe__Admin__Class', array( 'hook', 'register' ) ); * * // some code later... * * // the `hook` and `register` methods will be called on the built instance. * tribe( 'tec.admin.class' )->doSomething(); * * @param string $slug The human-readable and catchy name of the class. * @param string|object|callable $class The full class name or an instance of the class * or a callback that will return the instance of the class. * @param array $after_build_methods An array of methods that should be called on * the built object after the `__construct` method; the methods * will be called each time after the instance contstruction. */ function tribe_register( $slug, $class, array $after_build_methods = null ) { Tribe__Container::init()->bind( $slug, $class, $after_build_methods ); } } if ( ! function_exists( 'tribe' ) ) { /** * Returns a ready to use instance of the requested class. * * Example use: * * tribe_singleton( 'common.main', 'Tribe__Main'); * * // some code later... * * tribe( 'common.main' )->do_something(); * * @param string|null $slug_or_class Either the slug of a binding previously registered using `tribe_singleton` or * `tribe_register` or the full class name that should be automagically created or * `null` to get the container instance itself. * * @return mixed|object|Tribe__Container The instance of the requested class. Please note that the cardinality of * the class is controlled registering it as a singleton using `tribe_singleton` * or `tribe_register`; if the `$slug_or_class` parameter is null then the * container itself will be returned. */ function tribe( $slug_or_class = null ) { $container = Tribe__Container::init(); return null === $slug_or_class ? $container : $container->make( $slug_or_class ); } } if ( ! function_exists( 'tribe_set_var' ) ) { /** * Registers a value under a slug in the container. * * Example use: * * tribe_set_var( 'tec.url', 'http://example.com' ); * * @param string $slug The human-readable and catchy name of the var. * @param mixed $value The variable value. */ function tribe_set_var( $slug, $value ) { $container = Tribe__Container::init(); $container->setVar( $slug, $value ); } } if ( ! function_exists( 'tribe_get_var' ) ) { /** * Returns the value of a registered variable. * * Example use: * * tribe_set_var( 'tec.url', 'http://example.com' ); * * $url = tribe_get_var( 'tec.url' ); * * @param string $slug The slug of the variable registered using `tribe_set_var`. * @param null $default The value that should be returned if the variable slug * is not a registered one. * * @return mixed Either the registered value or the default value if the variable * is not registered. */ function tribe_get_var( $slug, $default = null ) { $container = Tribe__Container::init(); try { $var = $container->getVar( $slug ); } catch ( InvalidArgumentException $e ) { return $default; } return $var; } } if ( ! function_exists( 'tribe_unset_var' ) ) { /** * Returns the value of a registered variable. * * Example use: * * tribe_set_var( 'tec.url', 'http://example.com' ); * * tribe_unset_var( 'tec.url' ); * * @since 4.11.0 * * @param string $slug The slug of the variable registered using `tribe_unset_var`. * * @return void */ function tribe_unset_var( $slug ) { $container = Tribe__Container::init(); try { $container->offsetUnset( $slug ); } catch ( Exception $e ) {} } } if ( ! function_exists( 'tribe_isset_var' ) ) { /** * Returns the value of a registered variable. * * Example use: * * tribe_set_var( 'tec.url', 'http://example.com' ); * * tribe_isset_var( 'tec.url' ); * * @since 4.11.0 * * @param string $slug The slug of the variable checked using `tribe_isset_var`. * * @return boolean Either a the given slug exists. */ function tribe_isset_var( $slug ) { $container = Tribe__Container::init(); return $container->offsetExists( $slug ); } } if ( ! function_exists( 'tribe_register_provider' ) ) { /** * Registers a service provider in the container. * * Service providers must implement the `tad_DI52_ServiceProviderInterface` interface or extend * the `tad_DI52_ServiceProvider` class. * * @see tad_DI52_ServiceProvider * @see tad_DI52_ServiceProviderInterface * * @param string $provider_class */ function tribe_register_provider( $provider_class ) { $container = Tribe__Container::init(); $container->register( $provider_class ); } if ( ! function_exists( 'tribe_callback' ) ) { /** * Returns a lambda function suitable to use as a callback; when called the function will build the implementation * bound to `$classOrInterface` and return the value of a call to `$method` method with the call arguments. * * @since 4.7 * @since 4.6.2 Included the $argsN params * * @param string $slug A class or interface fully qualified name or a string slug. * @param string $method The method that should be called on the resolved implementation with the * specified array arguments. * @param mixed [$argsN] (optional) Any number of arguments that will be passed down to the Callback * * @return callable A PHP Callable based on the Slug and Methods passed */ function tribe_callback( $slug, $method ) { $container = Tribe__Container::init(); $arguments = func_get_args(); $is_empty = 2 === count( $arguments ); if ( $is_empty ) { $callable = $container->callback( $slug, $method ); } else { $callback = $container->callback( 'callback', 'get' ); $callable = call_user_func_array( $callback, $arguments ); } return $callable; } } if ( ! function_exists( 'tribe_callback_return' ) ) { /** * Returns a tribe_callback for a very simple Return value method * * Example of Usage: * * add_filter( 'admin_title', tribe_callback_return( __( 'Ready to work.' ) ) ); * * @since 4.6.2 * * @param mixed $value The value to be returned * * @return callable A PHP Callable based on the Slug and Methods passed */ function tribe_callback_return( $value ) { return tribe_callback( 'callback', 'return_value', $value ); } } }
Save