PHP Class GravityFormsIframe_AbstractPlugin

Since: 2.0.0
显示文件 Open project: cedaro/gravity-forms-iframe

Protected Properties

Property Type Description
$basename string Ex: plugin-name/plugin-name.php
$directory string Absolute path to the main plugin directory.
$file string Absolute path to the main plugin file.
$slug string Plugin identifier.
$url string URL to the main plugin directory.

Public Methods

Method Description
get_basename ( ) : string Retrieve the relative path to the main plugin file from the plugin directory.
get_directory ( ) : string Retrieve the plugin directory.
get_file ( ) : string Retrieve the absolute path for the main plugin file.
get_path ( string $path = '' ) : string Retrieve the path to a file in the plugin.
get_slug ( ) : string Retrieve the plugin indentifier.
get_url ( string $path = '' ) : string Retrieve the URL for a file in the plugin.
register_hooks ( object $provider ) Register a hook provider.
set_basename ( string $basename ) : string Set the plugin basename.
set_directory ( string $directory ) Set the plugin's directory.
set_file ( string $file ) Set the path to the main plugin file.
set_slug ( string $slug ) Set the plugin identifier.
set_url ( string $url ) Set the URL for plugin directory root.

Method Details

get_basename() public method

Retrieve the relative path to the main plugin file from the plugin directory.
Since: 2.0.0
public get_basename ( ) : string
return string

get_directory() public method

Retrieve the plugin directory.
Since: 2.0.0
public get_directory ( ) : string
return string

get_file() public method

Retrieve the absolute path for the main plugin file.
Since: 2.0.0
public get_file ( ) : string
return string

get_path() public method

Retrieve the path to a file in the plugin.
Since: 2.0.0
public get_path ( string $path = '' ) : string
$path string Optional. Path relative to the plugin root.
return string

get_slug() public method

Retrieve the plugin indentifier.
Since: 2.0.0
public get_slug ( ) : string
return string

get_url() public method

Retrieve the URL for a file in the plugin.
Since: 2.0.0
public get_url ( string $path = '' ) : string
$path string Optional. Path relative to the plugin root.
return string

register_hooks() public method

Register a hook provider.
Since: 2.0.0
public register_hooks ( object $provider )
$provider object Hook provider.

set_basename() public method

Set the plugin basename.
Since: 2.0.0
public set_basename ( string $basename ) : string
$basename string Relative path from the main plugin directory.
return string

set_directory() public method

Set the plugin's directory.
Since: 2.0.0
public set_directory ( string $directory )
$directory string Absolute path to the main plugin directory.

set_file() public method

Set the path to the main plugin file.
Since: 2.0.0
public set_file ( string $file )
$file string Absolute path to the main plugin file.

set_slug() public method

Set the plugin identifier.
Since: 2.0.0
public set_slug ( string $slug )
$slug string Plugin identifier.

set_url() public method

Set the URL for plugin directory root.
Since: 2.0.0
public set_url ( string $url )
$url string URL to the root of the plugin directory.

Property Details

$basename protected_oe property

Ex: plugin-name/plugin-name.php
Since: 2.0.0
protected string $basename
return string

$directory protected_oe property

Absolute path to the main plugin directory.
Since: 2.0.0
protected string $directory
return string

$file protected_oe property

Absolute path to the main plugin file.
Since: 2.0.0
protected string $file
return string

$slug protected_oe property

Plugin identifier.
Since: 2.0.0
protected string $slug
return string

$url protected_oe property

URL to the main plugin directory.
Since: 2.0.0
protected string $url
return string