Skip to content

Commit

Permalink
deprecate public _scripts and etc
Browse files Browse the repository at this point in the history
  • Loading branch information
Fedik committed Jun 21, 2019
1 parent 6dd88af commit b7a94f5
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions libraries/src/Document/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ class Document
*
* @var array
* @since 1.7.0
*
* @deprecated 5.0 Will be renamed to $scripts with private visibility
*/
public $_scripts = array();

Expand All @@ -148,13 +150,17 @@ class Document
*
* @var array
* @since 1.7.0
*
* @deprecated 5.0 Will be renamed to $script with private visibility
*/
public $_script = array();

/**
* Array of scripts options
*
* @var array
*
* @since 3.5
*/
protected $scriptOptions = array();

Expand All @@ -163,6 +169,8 @@ class Document
*
* @var array
* @since 1.7.0
*
* @deprecated 5.0 Will be renamed to $styleSheets with private visibility
*/
public $_styleSheets = array();

Expand All @@ -171,6 +179,8 @@ class Document
*
* @var array
* @since 1.7.0
*
* @deprecated 5.0 Will be renamed to $style with private visibility
*/
public $_style = array();

Expand Down Expand Up @@ -531,6 +541,18 @@ public function addScript($url, $options = array(), $attribs = array())
return $this;
}

/**
* Return list of linked scripts
*
* @return array
*
* @since __DEPLOY_VERSION__
*/
public function getScripts()
{
return $this->_scripts;
}

/**
* Adds a script to the page
*
Expand All @@ -555,6 +577,18 @@ public function addScriptDeclaration($content, $type = 'text/javascript')
return $this;
}

/**
* Return list of scripts placed in the header
*
* @return array
*
* @since __DEPLOY_VERSION__
*/
public function getScriptDeclarations()
{
return $this->_script;
}

/**
* Add option for script
*
Expand Down Expand Up @@ -639,6 +673,18 @@ public function addStyleSheet($url, $options = array(), $attribs = array())
return $this;
}

/**
* Return list of linked stylesheets
*
* @return array
*
* @since __DEPLOY_VERSION__
*/
public function getStyleSheets()
{
return $this->_styleSheets;
}

/**
* Adds a stylesheet declaration to the page
*
Expand All @@ -663,6 +709,18 @@ public function addStyleDeclaration($content, $type = 'text/css')
return $this;
}

/**
* Return list of stylesheet declarations
*
* @return array
*
* @since __DEPLOY_VERSION__
*/
public function getStyleDeclarations()
{
return $this->_styleSheets;
}

/**
* Sets the document charset
*
Expand Down

0 comments on commit b7a94f5

Please sign in to comment.