public abstract class Manager

class.manager.php #14

The abstract Manager class provides some generic functions to assist the managers in cataloguing their children. This class defines a number of abstract methods to enable autodiscovery of file based objects such as Datasource, Event, Extension and Text Formatter. Manager classes implement CRUD methods to apply their objects.

Methods

void __construct(Administration $parent)

The constructor for Manager. This sets the $this->_Parent to be an instance of the Administration class.

Parameters
  • $parent AdministrationThe Administration object that this manager has been created from passed by reference

string __getClassName(string $name)

Given a name, return the class name of that object. Symphony objects often have conventions tied to an objects class name that prefix the class with the type of the object. eg. field{Class}, formatter{Class}

string __getClassPath(string $name)

Given a name, return the path to the class of that object

string __getDriverPath(string $name)

Given a name, return the path to the driver of that object

string __getHandleFromFilename(string $filename)

Given a filename, return the handle. This will remove any Symphony conventions such as field.*.php

boolean|array about(string $name)

The about function returns information about a particular object in this manager's pool. It is limited for use on file based objects such as Datasource, Event, Extension and Text Formatter. The function uses the getClassName(), getDriverPath() and getHandleFromFilename() functions to autodiscover the object. There is no confusion between names (ie. does author refer to a Datasource or Field) because the Manager subclass will override the autodiscovery functions to only look for objects of that type.

Parameters
  • $name stringThe name of the object that has the about information. This should be lowercase and free from any Symphony conventions. eg. author, not field.author.php.

Returns

False is object doesn't exist or an associative array of information

object create(string $name)

Creates a new instance of an object by name and returns it by reference.

Parameters
  • $name stringThe name of the Object to be created. Can be used in conjunction with the auto discovery methods to find a class.

Returns

by reference

void flush()

This function will empty the $_pool array.

array listAll()

Returns an array of all the objects that this manager is responsible for. This function is only use on the file based Managers in Symphony such DatasourceManager, EventManager, ExtensionManager, FieldManager and TextformatterManager.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details