CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Team
    • Issues (Github)
    • YouTube Channel
    • Get Involved
    • Bakery
    • Featured Resources
    • Newsletter
    • Certification
    • My CakePHP
    • CakeFest
    • Facebook
    • Twitter
    • Help & Support
    • Forum
    • Stack Overflow
    • IRC
    • Slack
    • Paid Support
CakePHP

C CakePHP 3.8 Red Velvet API

  • Overview
  • Tree
  • Deprecated
  • Version:
    • 3.8
      • 3.8
      • 3.7
      • 3.6
      • 3.5
      • 3.4
      • 3.3
      • 3.2
      • 3.1
      • 3.0
      • 2.10
      • 2.9
      • 2.8
      • 2.7
      • 2.6
      • 2.5
      • 2.4
      • 2.3
      • 2.2
      • 2.1
      • 2.0
      • 1.3
      • 1.2

Namespaces

  • Cake
    • Auth
      • Storage
    • Cache
      • Engine
    • Collection
      • Iterator
    • Command
    • Console
      • Exception
    • Controller
      • Component
      • Exception
    • Core
      • Configure
        • Engine
      • Exception
      • Retry
    • Database
      • Driver
      • Exception
      • Expression
      • Schema
      • Statement
      • Type
    • Datasource
      • Exception
    • Error
      • Middleware
    • Event
      • Decorator
    • Filesystem
    • Form
    • Http
      • Client
        • Adapter
        • Auth
      • Cookie
      • Exception
      • Middleware
      • Session
    • I18n
      • Formatter
      • Middleware
      • Parser
    • Log
      • Engine
    • Mailer
      • Exception
      • Transport
    • Network
      • Exception
    • ORM
      • Association
      • Behavior
        • Translate
      • Exception
      • Locator
      • Rule
    • Routing
      • Exception
      • Filter
      • Middleware
      • Route
    • Shell
      • Helper
      • Task
    • TestSuite
      • Fixture
      • Stub
    • Utility
      • Exception
    • Validation
    • View
      • Exception
      • Form
      • Helper
      • Widget
  • None

Classes

  • Arguments
  • Command
  • CommandCollection
  • CommandFactory
  • CommandRunner
  • ConsoleErrorHandler
  • ConsoleInput
  • ConsoleInputArgument
  • ConsoleInputOption
  • ConsoleInputSubcommand
  • ConsoleIo
  • ConsoleOptionParser
  • ConsoleOutput
  • Helper
  • HelperRegistry
  • HelpFormatter
  • Shell
  • ShellDispatcher
  • TaskRegistry

Interfaces

  • CommandCollectionAwareInterface
  • CommandFactoryInterface

Class Arguments

Provides an interface for interacting with a command's options and arguments.

Namespace: Cake\Console
Location: Console/Arguments.php

Properties summary

  • $argNames protected
    string[]
    Positional argument name map
  • $args protected
    string[]
    Positional arguments.
  • $options protected
    array
    Named options

Method Summary

  • __construct() public
    Constructor
  • getArgument() public
    Check if a positional argument exists by name
  • getArgumentAt() public
    Get positional arguments by index.
  • getArguments() public
    Get all positional arguments.
  • getOption() public
    Get an option's value or null
  • getOptions() public
    Get an array of all the options
  • hasArgument() public
    Check if a positional argument exists by name
  • hasArgumentAt() public
    Check if a positional argument exists
  • hasOption() public
    Check if an option is defined and not null.

Method Detail

__construct() public ¶

__construct( array $args , array $options , array $argNames )

Constructor

Parameters
array $args
Positional arguments
array $options
Named arguments
array $argNames

List of argument names. Order is expected to be the same as $args.

getArgument() public ¶

getArgument( string $name )

Check if a positional argument exists by name

Parameters
string $name
The argument name to check.
Returns
string|null

getArgumentAt() public ¶

getArgumentAt( integer $index )

Get positional arguments by index.

Parameters
integer $index
The argument index to access.
Returns
string|null
The argument value or null

getArguments() public ¶

getArguments( )

Get all positional arguments.

Returns
string[]

getOption() public ¶

getOption( string $name )

Get an option's value or null

Parameters
string $name
The name of the option to check.
Returns
string|integer|boolean|null
The option value or null.

getOptions() public ¶

getOptions( )

Get an array of all the options

Returns
array

hasArgument() public ¶

hasArgument( string $name )

Check if a positional argument exists by name

Parameters
string $name
The argument name to check.
Returns
boolean

hasArgumentAt() public ¶

hasArgumentAt( integer $index )

Check if a positional argument exists

Parameters
integer $index
The argument index to check.
Returns
boolean

hasOption() public ¶

hasOption( string $name )

Check if an option is defined and not null.

Parameters
string $name
The name of the option to check.
Returns
boolean

Properties detail

$argNames ¶

protected string[]

Positional argument name map

$args ¶

protected string[]

Positional arguments.

$options ¶

protected array

Named options

Follow @CakePHP
#IRC
OpenHub
Rackspace
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Logos & Trademarks
  • Community
  • Team
  • Issues (Github)
  • YouTube Channel
  • Get Involved
  • Bakery
  • Featured Resources
  • Newsletter
  • Certification
  • My CakePHP
  • CakeFest
  • Facebook
  • Twitter
  • Help & Support
  • Forum
  • Stack Overflow
  • IRC
  • Slack
  • Paid Support

Generated using CakePHP API Docs